コード例 #1
0
 private void enforceType(Json.Type type)
 {
     if (this.type != type)
     {
         JsonException.FromInvalidType("Invalid data type", type, this.type);
     }
 }
コード例 #2
0
 private Json(Json.Type type)
 {
     this.type = type;
 }
コード例 #3
0
 public static void FromInvalidType(string message, Json.Type got, Json.Type actualType)
 {
     throw new JsonException($"{message}: type wanted '{got}' however current type is '{Convert.ToString(actualType)}'");
 }