Interhaptics SDK for Unity 1.6
Loading...
Searching...
No Matches
SimpleJSON.JSONNode.Enumerator Struct Reference

Public Member Functions

 Enumerator (List< JSONNode >.Enumerator aArrayEnum)
 
 Enumerator (Dictionary< string, JSONNode >.Enumerator aDictEnum)
 
bool MoveNext ()
 

Properties

bool IsValid [get]
 
KeyValuePair< string, JSONNodeCurrent [get]
 

Detailed Description

Definition at line 66 of file SimpleJSON.cs.

Constructor & Destructor Documentation

◆ Enumerator() [1/2]

SimpleJSON.JSONNode.Enumerator.Enumerator ( List< JSONNode >.Enumerator aArrayEnum)

Definition at line 73 of file SimpleJSON.cs.

74 {
75 type = Type.Array;
76 m_Object = default(Dictionary<string, JSONNode>.Enumerator);
77 m_Array = aArrayEnum;
78 }
Enumerator(List< JSONNode >.Enumerator aArrayEnum)
Definition SimpleJSON.cs:73

◆ Enumerator() [2/2]

SimpleJSON.JSONNode.Enumerator.Enumerator ( Dictionary< string, JSONNode >.Enumerator aDictEnum)

Definition at line 79 of file SimpleJSON.cs.

80 {
81 type = Type.Object;
82 m_Object = aDictEnum;
83 m_Array = default(List<JSONNode>.Enumerator);
84 }

Member Function Documentation

◆ MoveNext()

bool SimpleJSON.JSONNode.Enumerator.MoveNext ( )

Definition at line 96 of file SimpleJSON.cs.

97 {
98 if (type == Type.Array)
99 return m_Array.MoveNext();
100 else if (type == Type.Object)
101 return m_Object.MoveNext();
102 return false;
103 }

References SimpleJSON.JSONNode.Enumerator.MoveNext().

Referenced by SimpleJSON.JSONNode.Enumerator.MoveNext(), SimpleJSON.JSONNode.KeyEnumerator.MoveNext(), SimpleJSON.JSONNode.LinqEnumerator.MoveNext(), and SimpleJSON.JSONNode.ValueEnumerator.MoveNext().

Property Documentation

◆ Current

KeyValuePair<string, JSONNode> SimpleJSON.JSONNode.Enumerator.Current
get

Definition at line 85 of file SimpleJSON.cs.

86 {
87 get
88 {
89 if (type == Type.Array)
90 return new KeyValuePair<string, JSONNode>(string.Empty, m_Array.Current);
91 else if (type == Type.Object)
92 return m_Object.Current;
93 return new KeyValuePair<string, JSONNode>(string.Empty, null);
94 }
95 }
KeyValuePair< string, JSONNode > Current
Definition SimpleJSON.cs:86

◆ IsValid

bool SimpleJSON.JSONNode.Enumerator.IsValid
get

Definition at line 72 of file SimpleJSON.cs.

72{ get { return type != Type.None; } }

The documentation for this struct was generated from the following file: