Exemple #1
0
 internal static InvalidOperationException GetJsonElementWrongTypeException(
     string expectedTypeName,
     JsonTokenType actualType)
 {
     return(GetInvalidOperationException(
                SR.Format(SR.JsonElementHasWrongType, expectedTypeName, actualType.ToValueKind())));
 }
 internal static InvalidOperationException GetJsonElementWrongTypeException(
     JsonTokenType expectedType,
     JsonTokenType actualType)
 {
     return(GetJsonElementWrongTypeException(expectedType.ToValueKind(), actualType.ToValueKind()));
 }
Exemple #3
0
 internal static void ThrowJsonElementWrongTypeException(
     JsonTokenType expectedType,
     JsonTokenType actualType)
 {
     throw GetJsonElementWrongTypeException(expectedType.ToValueKind(), actualType.ToValueKind());
 }