diff options
| author | chai <215380520@qq.com> | 2024-05-19 17:03:57 +0800 |
|---|---|---|
| committer | chai <215380520@qq.com> | 2024-05-19 17:03:57 +0800 |
| commit | cf58771365b5953c6eac548b172aae880d1f0acd (patch) | |
| tree | a49757a4b5c447cbf877584d482367a6bfe33b10 /Thronefall_1_57/Decompile/I2.Loc.SimpleJSON/JSONLazyCreator.cs | |
| parent | eed315deae356ddfb17f28305e7cde6cdfc43313 (diff) | |
* rename
Diffstat (limited to 'Thronefall_1_57/Decompile/I2.Loc.SimpleJSON/JSONLazyCreator.cs')
| -rw-r--r-- | Thronefall_1_57/Decompile/I2.Loc.SimpleJSON/JSONLazyCreator.cs | 193 |
1 files changed, 0 insertions, 193 deletions
diff --git a/Thronefall_1_57/Decompile/I2.Loc.SimpleJSON/JSONLazyCreator.cs b/Thronefall_1_57/Decompile/I2.Loc.SimpleJSON/JSONLazyCreator.cs deleted file mode 100644 index 28e23df..0000000 --- a/Thronefall_1_57/Decompile/I2.Loc.SimpleJSON/JSONLazyCreator.cs +++ /dev/null @@ -1,193 +0,0 @@ -namespace I2.Loc.SimpleJSON; - -internal class JSONLazyCreator : JSONNode -{ - private JSONNode m_Node; - - private string m_Key; - - public override JSONNode this[int aIndex] - { - get - { - return new JSONLazyCreator(this); - } - set - { - JSONArray jSONArray = new JSONArray(); - jSONArray.Add(value); - Set(jSONArray); - } - } - - public override JSONNode this[string aKey] - { - get - { - return new JSONLazyCreator(this, aKey); - } - set - { - JSONClass jSONClass = new JSONClass(); - jSONClass.Add(aKey, value); - Set(jSONClass); - } - } - - public override int AsInt - { - get - { - JSONData aVal = new JSONData(0); - Set(aVal); - return 0; - } - set - { - JSONData aVal = new JSONData(value); - Set(aVal); - } - } - - public override float AsFloat - { - get - { - JSONData aVal = new JSONData(0f); - Set(aVal); - return 0f; - } - set - { - JSONData aVal = new JSONData(value); - Set(aVal); - } - } - - public override double AsDouble - { - get - { - JSONData aVal = new JSONData(0.0); - Set(aVal); - return 0.0; - } - set - { - JSONData aVal = new JSONData(value); - Set(aVal); - } - } - - public override bool AsBool - { - get - { - JSONData aVal = new JSONData(aData: false); - Set(aVal); - return false; - } - set - { - JSONData aVal = new JSONData(value); - Set(aVal); - } - } - - public override JSONArray AsArray - { - get - { - JSONArray jSONArray = new JSONArray(); - Set(jSONArray); - return jSONArray; - } - } - - public override JSONClass AsObject - { - get - { - JSONClass jSONClass = new JSONClass(); - Set(jSONClass); - return jSONClass; - } - } - - public JSONLazyCreator(JSONNode aNode) - { - m_Node = aNode; - m_Key = null; - } - - public JSONLazyCreator(JSONNode aNode, string aKey) - { - m_Node = aNode; - m_Key = aKey; - } - - private void Set(JSONNode aVal) - { - if (m_Key == null) - { - m_Node.Add(aVal); - } - else - { - m_Node.Add(m_Key, aVal); - } - m_Node = null; - } - - public override void Add(JSONNode aItem) - { - JSONArray jSONArray = new JSONArray(); - jSONArray.Add(aItem); - Set(jSONArray); - } - - public override void Add(string aKey, JSONNode aItem) - { - JSONClass jSONClass = new JSONClass(); - jSONClass.Add(aKey, aItem); - Set(jSONClass); - } - - public static bool operator ==(JSONLazyCreator a, object b) - { - if (b == null) - { - return true; - } - return (object)a == b; - } - - public static bool operator !=(JSONLazyCreator a, object b) - { - return !(a == b); - } - - public override bool Equals(object obj) - { - if (obj == null) - { - return true; - } - return (object)this == obj; - } - - public override int GetHashCode() - { - return base.GetHashCode(); - } - - public override string ToString() - { - return ""; - } - - public override string ToString(string aPrefix) - { - return ""; - } -} |
