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

◆ GetResourceString() [1/2]

static string System.Text.Json.ThrowHelper.GetResourceString ( ExceptionResource resource,
int currentDepth,
byte token,
JsonTokenType tokenType )
inlinestaticprivate

Definition at line 490 of file ThrowHelper.cs.

491 {
492 string result = "";
493 switch (resource)
494 {
495 case ExceptionResource.MismatchedObjectArray:
496 result = ((tokenType == JsonTokenType.PropertyName) ? System.SR.Format(System.SR.CannotWriteEndAfterProperty, (char)token) : System.SR.Format(System.SR.MismatchedObjectArray, (char)token));
497 break;
498 case ExceptionResource.DepthTooLarge:
500 break;
501 case ExceptionResource.CannotStartObjectArrayWithoutProperty:
503 break;
504 case ExceptionResource.CannotStartObjectArrayAfterPrimitiveOrClose:
506 break;
507 case ExceptionResource.CannotWriteValueWithinObject:
509 break;
510 case ExceptionResource.CannotWritePropertyWithinArray:
511 result = ((tokenType == JsonTokenType.PropertyName) ? System.SR.Format(System.SR.CannotWritePropertyAfterProperty) : System.SR.Format(System.SR.CannotWritePropertyWithinArray, tokenType));
512 break;
513 case ExceptionResource.CannotWriteValueAfterPrimitiveOrClose:
515 break;
516 }
517 return result;
518 }
static string CannotWriteValueWithinObject
Definition SR.cs:40
static string CannotWriteValueAfterPrimitiveOrClose
Definition SR.cs:38
static string CannotStartObjectArrayAfterPrimitiveOrClose
Definition SR.cs:20
static string CannotWriteEndAfterProperty
Definition SR.cs:98
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string CannotWritePropertyWithinArray
Definition SR.cs:34
static string CannotWritePropertyAfterProperty
Definition SR.cs:36
static string DepthTooLarge
Definition SR.cs:42
static string CannotStartObjectArrayWithoutProperty
Definition SR.cs:22
Definition SR.cs:7

References System.SR.CannotStartObjectArrayAfterPrimitiveOrClose, System.SR.CannotStartObjectArrayWithoutProperty, System.SR.CannotWriteEndAfterProperty, System.SR.CannotWritePropertyAfterProperty, System.SR.CannotWritePropertyWithinArray, System.SR.CannotWriteValueAfterPrimitiveOrClose, System.SR.CannotWriteValueWithinObject, System.SR.DepthTooLarge, System.Text.Json.Dictionary, System.SR.Format(), and System.SR.MismatchedObjectArray.