48 references to TokenType
System.Text.Json (48)
System\Text\Json\Document\JsonDocument.cs (32)
127Debug.Assert(!isPropertyName || row.TokenType is JsonTokenType.PropertyName); 138CheckExpectedType(JsonTokenType.StartArray, row.TokenType); 149CheckExpectedType(JsonTokenType.StartObject, row.TokenType); 160CheckExpectedType(JsonTokenType.StartArray, row.TokenType); 236if (includeQuotes && row.TokenType == JsonTokenType.String) 258Debug.Assert(row.TokenType == JsonTokenType.PropertyName); 271if (row.TokenType == JsonTokenType.String) 291JsonTokenType tokenType = row.TokenType; 351row.TokenType); 393Debug.Assert(row.TokenType is JsonTokenType.PropertyName); 404CheckExpectedType(JsonTokenType.String, row.TokenType); 425CheckExpectedType(JsonTokenType.Number, row.TokenType); 447CheckExpectedType(JsonTokenType.Number, row.TokenType); 469CheckExpectedType(JsonTokenType.Number, row.TokenType); 491CheckExpectedType(JsonTokenType.Number, row.TokenType); 513CheckExpectedType(JsonTokenType.Number, row.TokenType); 535CheckExpectedType(JsonTokenType.Number, row.TokenType); 557CheckExpectedType(JsonTokenType.Number, row.TokenType); 579CheckExpectedType(JsonTokenType.Number, row.TokenType); 601CheckExpectedType(JsonTokenType.Number, row.TokenType); 623CheckExpectedType(JsonTokenType.Number, row.TokenType); 645CheckExpectedType(JsonTokenType.Number, row.TokenType); 667CheckExpectedType(JsonTokenType.String, row.TokenType); 702CheckExpectedType(JsonTokenType.String, row.TokenType); 737CheckExpectedType(JsonTokenType.String, row.TokenType); 804switch (row.TokenType) 831Debug.Fail($"Unexpected encounter with JsonTokenType {row.TokenType}"); 843switch (row.TokenType) 877Debug.Fail($"Unexpected encounter with JsonTokenType {row.TokenType}"); 883Debug.Assert(row.TokenType == JsonTokenType.String || row.TokenType == JsonTokenType.PropertyName); 914Debug.Assert(row.TokenType == JsonTokenType.PropertyName);
System\Text\Json\Document\JsonDocument.DbRow.cs (1)
73internal bool IsSimpleValue => TokenType >= JsonTokenType.PropertyName;
System\Text\Json\Document\JsonDocument.MetadataDb.cs (9)
321if (row.IsUnknownSize && row.TokenType == lookupType) 359if (start.TokenType == JsonTokenType.StartObject) 362end.TokenType == JsonTokenType.EndObject, 363$"StartObject paired with {end.TokenType}"); 365else if (start.TokenType == JsonTokenType.StartArray) 368end.TokenType == JsonTokenType.EndArray, 369$"StartArray paired with {end.TokenType}"); 375$"{start.TokenType} should have been one row"); 388if (start.TokenType == JsonTokenType.String)
System\Text\Json\Document\JsonDocument.TryGetProperty.cs (6)
17CheckExpectedType(JsonTokenType.StartObject, row.TokenType); 59Debug.Assert(row.TokenType != JsonTokenType.PropertyName); 73Debug.Assert(row.TokenType == JsonTokenType.PropertyName); 117CheckExpectedType(JsonTokenType.StartObject, row.TokenType); 150Debug.Assert(row.TokenType != JsonTokenType.PropertyName); 164Debug.Assert(row.TokenType == JsonTokenType.PropertyName);