31 references to JsonValueType
Microsoft.Analyzers.Local (31)
ApiLifecycle\Json\JsonValue.cs (31)
26public static readonly JsonValue Null = new(JsonValueType.Null, default, null); 42Type = JsonValueType.Boolean; 59Type = JsonValueType.Number; 76Type = JsonValueType.String; 93Type = JsonValueType.Object; 110Type = JsonValueType.Array; 127private JsonValue(JsonValueType type, double value, object? reference) 138public JsonValueType Type { get; } 144public bool IsNull => Type == JsonValueType.Null; 150public bool IsBoolean => Type == JsonValueType.Boolean; 164public bool IsNumber => Type == JsonValueType.Number; 170public bool IsString => Type == JsonValueType.String; 176public bool IsJsonObject => Type == JsonValueType.Object; 182public bool IsJsonArray => Type == JsonValueType.Array; 196JsonValueType.Boolean => _value == 1, 197JsonValueType.Number => _value != 0, 198JsonValueType.String => !string.IsNullOrEmpty((string?)_reference), 199JsonValueType.Object or JsonValueType.Array => true, 233JsonValueType.Boolean => _value == 1 ? 1 : 0, 234JsonValueType.Number => _value, 235JsonValueType.String => double.TryParse((string?)_reference, NumberStyles.Float, CultureInfo.InvariantCulture, out var number) 247JsonValueType.Boolean => (_value == 1) 250JsonValueType.Number => _value.ToString(CultureInfo.InvariantCulture), 251JsonValueType.String => (string?)_reference, 283JsonValueType.Boolean or JsonValueType.Number => _value, 284JsonValueType.String or JsonValueType.Object or JsonValueType.Array => _reference, 616public JsonValueType Type => _jsonValue.Type;