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

◆ ThrowUnexpectedMetadataException()

static void System.Text.Json.ThrowHelper.ThrowUnexpectedMetadataException ( ReadOnlySpan< byte > propertyName,
ref Utf8JsonReader reader,
ref ReadStack state )
inlinestaticpackage

Definition at line 1195 of file ThrowHelper.cs.

1196 {
1197 if (state.Current.JsonTypeInfo.PropertyInfoForTypeInfo.ConverterBase.ConstructorIsParameterized)
1198 {
1200 }
1201 switch (JsonSerializer.GetMetadataPropertyName(propertyName))
1202 {
1203 case MetadataPropertyName.Id:
1205 break;
1206 case MetadataPropertyName.Ref:
1208 break;
1209 default:
1211 break;
1212 }
1213 }
static void ThrowNotSupportedException_ObjectWithParameterizedCtorRefMetadataNotHonored(ReadOnlySpan< byte > propertyName, ref Utf8JsonReader reader, ref ReadStack state)
static void ThrowJsonException_MetadataReferenceObjectCannotContainOtherProperties()
static void ThrowJsonException_MetadataInvalidPropertyWithLeadingDollarSign(ReadOnlySpan< byte > propertyName, ref ReadStack state, in Utf8JsonReader reader)
static void ThrowJsonException_MetadataIdIsNotFirstProperty(ReadOnlySpan< byte > propertyName, ref ReadStack state)

References System.Text.Json.Dictionary, System.Text.Json.JsonSerializer.GetMetadataPropertyName(), System.state, System.Text.Json.ThrowHelper.ThrowJsonException_MetadataIdIsNotFirstProperty(), System.Text.Json.ThrowHelper.ThrowJsonException_MetadataInvalidPropertyWithLeadingDollarSign(), System.Text.Json.ThrowHelper.ThrowJsonException_MetadataReferenceObjectCannotContainOtherProperties(), and System.Text.Json.ThrowHelper.ThrowNotSupportedException_ObjectWithParameterizedCtorRefMetadataNotHonored().

Referenced by System.Text.Json.JsonSerializer.GetPropertyName(), and System.Text.Json.Serialization.JsonDictionaryConverter< TDictionary, TKey, TValue >.OnTryRead().