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

◆ TryRemoveProperty()

bool System.Text.Json.JsonPropertyDictionary< T >.TryRemoveProperty ( string propertyName,
out T existing )
inline

Definition at line 454 of file JsonPropertyDictionary.cs.

455 {
456 if (IsReadOnly)
457 {
458 ThrowHelper.ThrowNotSupportedException_NodeCollectionIsReadOnly();
459 }
460 if (_propertyDictionary != null)
461 {
463 {
464 return false;
465 }
467 }
468 for (int i = 0; i < _propertyList.Count; i++)
469 {
472 {
474 existing = keyValuePair.Value;
475 return true;
476 }
477 }
478 existing = null;
479 return false;
480 }
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
bool ICollection< KeyValuePair< TKey, TValue > >. Remove(KeyValuePair< TKey, TValue > keyValuePair)
void RemoveAt(int index)
Definition List.cs:824
new bool Equals(object? x, object? y)
readonly List< KeyValuePair< string, T > > _propertyList

References System.Text.Json.JsonPropertyDictionary< T >._propertyDictionary, System.Text.Json.JsonPropertyDictionary< T >._propertyList, System.Text.Json.JsonPropertyDictionary< T >._stringComparer, System.Collections.Generic.List< T >.Count, System.StringComparer.Equals(), System.Text.Json.JsonPropertyDictionary< T >.IsReadOnly, System.Collections.Generic.Dictionary< TKey, TValue >.Remove(), System.Collections.Generic.List< T >.RemoveAt(), System.Text.Json.ThrowHelper.ThrowNotSupportedException_NodeCollectionIsReadOnly(), and System.Collections.Generic.Dictionary< TKey, TValue >.TryGetValue().