Newtonsoft.Json.Schema.JsonSchemaBuilder.ProcessIdentity C# (CSharp) Méthode

ProcessIdentity() private méthode

private ProcessIdentity ( ) : void
Résultat void
    private void ProcessIdentity()
    {
      CurrentSchema.Identity = new List<string>();

      switch (_reader.TokenType)
      {
        case JsonToken.String:
          CurrentSchema.Identity.Add(_reader.Value.ToString());
          break;
        case JsonToken.StartArray:
          while (_reader.Read() && _reader.TokenType != JsonToken.EndArray)
          {
            if (_reader.TokenType != JsonToken.String)
              throw new Exception("Exception JSON property name string token, got {0}.".FormatWith(CultureInfo.InvariantCulture, _reader.TokenType));

            CurrentSchema.Identity.Add(_reader.Value.ToString());
          }
          break;
        default:
          throw new Exception("Expected array or JSON property name string token, got {0}.".FormatWith(CultureInfo.InvariantCulture, _reader.TokenType));
      }
    }