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

◆ InitializeIfRequired()

void System.Text.Json.Nodes.JsonObject.InitializeIfRequired ( )
inlineprivate

Definition at line 314 of file JsonObject.cs.

315 {
316 if (_dictionary != null)
317 {
318 return;
319 }
320 bool caseInsensitive = base.Options.HasValue && base.Options.Value.PropertyNameCaseInsensitive;
322 if (_jsonElement.HasValue)
323 {
324 foreach (JsonProperty item in _jsonElement.Value.EnumerateObject())
325 {
327 if (jsonNode != null)
328 {
329 jsonNode.Parent = this;
330 }
332 }
333 _jsonElement = null;
334 }
336 }
void Add(TKey key, TValue value)
JsonNode(JsonNodeOptions? options=null)
Definition JsonNode.cs:78
JsonPropertyDictionary< JsonNode > _dictionary
Definition JsonObject.cs:80
static JsonNode Create(JsonElement element, JsonNodeOptions? options)
ObjectEnumerator EnumerateObject()

References System.Text.Json.Nodes.JsonObject._dictionary, System.Text.Json.Nodes.JsonObject._jsonElement, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Text.Json.Serialization.Converters.JsonNodeConverter.Create(), System.Text.Json.Dictionary, System.Text.Json.JsonElement.EnumerateObject(), and System.item.

Referenced by System.Text.Json.Nodes.JsonObject.Add(), System.Text.Json.Nodes.JsonObject.Contains(), System.Text.Json.Nodes.JsonObject.ContainsKey(), System.Text.Json.Nodes.JsonObject.CopyTo(), System.Text.Json.Nodes.JsonObject.DetachParent(), System.Text.Json.Nodes.JsonObject.GetEnumerator(), System.Text.Json.Nodes.JsonObject.GetPath(), System.Text.Json.Nodes.JsonObject.Remove(), System.Text.Json.Nodes.JsonObject.SetItem(), and System.Text.Json.Nodes.JsonObject.TryGetValue().