Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ AssignParent()

void System.Text.Json.Nodes.JsonNode.AssignParent ( JsonNode parent)
inlinepackageinherited

Definition at line 133 of file JsonNode.cs.

134 {
135 if (Parent != null)
136 {
137 ThrowHelper.ThrowInvalidOperationException_NodeAlreadyHasParent();
138 }
139 for (JsonNode jsonNode = parent; jsonNode != null; jsonNode = jsonNode.Parent)
140 {
141 if (jsonNode == this)
142 {
143 ThrowHelper.ThrowInvalidOperationException_NodeCycleDetected();
144 }
145 }
146 Parent = parent;
147 }
JsonNode(JsonNodeOptions? options=null)
Definition JsonNode.cs:78

References System.Text.Json.Nodes.JsonNode.Parent, System.Text.Json.ThrowHelper.ThrowInvalidOperationException_NodeAlreadyHasParent(), and System.Text.Json.ThrowHelper.ThrowInvalidOperationException_NodeCycleDetected().

Referenced by System.Text.Json.Nodes.JsonArray.InitializeFromArray().