Class XboxGameJsonContext
Namespace: XboxAuthNet.Game.Serialization
Assembly: XboxAuthNet.Game.dll
[JsonSourceGenerationOptions(GenerationMode = JsonSourceGenerationMode.Metadata)]
[JsonSerializable(typeof(XboxAuthTokens))]
[JsonSerializable(typeof(XboxAuthResponse))]
[JsonSerializable(typeof(XboxAuthXuiClaims))]
[JsonSerializable(typeof(MicrosoftOAuthResponse))]
[JsonSerializable(typeof(MicrosoftUserPayload))]
[JsonSerializable(typeof(string))]
[JsonSerializable(typeof(int))]
[JsonSerializable(typeof(long))]
[JsonSerializable(typeof(double))]
[JsonSerializable(typeof(bool))]
[JsonSerializable(typeof(DateTime))]
[JsonSerializable(typeof(DateTimeOffset))]
[JsonSerializable(typeof(object))]
[JsonSerializable(typeof(JsonElement))]
[JsonSerializable(typeof(JsonNode))]
[JsonSerializable(typeof(JsonObject))]
public class XboxGameJsonContext : JsonSerializerContext, IJsonTypeInfoResolver
Inheritance
object ← JsonSerializerContext ← XboxGameJsonContext
Implements
Inherited Members
JsonSerializerContext.GetTypeInfo(Type), JsonSerializerContext.Options, JsonSerializerContext.GeneratedSerializerOptions, object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
XboxGameJsonContext()
public XboxGameJsonContext()
XboxGameJsonContext(JsonSerializerOptions)
Creates an instance of System.Text.Json.Serialization.JsonSerializerContext and binds it with the indicated System.Text.Json.JsonSerializerOptions.
public XboxGameJsonContext(JsonSerializerOptions options)
Parameters
options JsonSerializerOptions
The run time provided options for the context instance.
Properties
Boolean
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<bool> Boolean { get; }
Property Value
DateTime
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<DateTime> DateTime { get; }
Property Value
DateTimeOffset
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<DateTimeOffset> DateTimeOffset { get; }
Property Value
Default
The default System.Text.Json.Serialization.JsonSerializerContext associated with a default System.Text.Json.JsonSerializerOptions instance.
public static XboxGameJsonContext Default { get; }
Property Value
Double
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<double> Double { get; }
Property Value
GeneratedSerializerOptions
The source-generated options associated with this context.
protected override JsonSerializerOptions? GeneratedSerializerOptions { get; }
Property Value
Int32
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<int> Int32 { get; }
Property Value
Int64
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<long> Int64 { get; }
Property Value
JsonElement
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<JsonElement> JsonElement { get; }
Property Value
JsonNode
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<JsonNode> JsonNode { get; }
Property Value
JsonObject
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<JsonObject> JsonObject { get; }
Property Value
MicrosoftOAuthResponse
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<MicrosoftOAuthResponse> MicrosoftOAuthResponse { get; }
Property Value
JsonTypeInfo<MicrosoftOAuthResponse>
MicrosoftUserPayload
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<MicrosoftUserPayload> MicrosoftUserPayload { get; }
Property Value
JsonTypeInfo<MicrosoftUserPayload>
Object
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<object> Object { get; }
Property Value
String
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<string> String { get; }
Property Value
StringArray
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<string[]> StringArray { get; }
Property Value
XboxAuthResponse
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<XboxAuthResponse> XboxAuthResponse { get; }
Property Value
JsonTypeInfo<XboxAuthResponse>
XboxAuthTokens
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<XboxAuthTokens> XboxAuthTokens { get; }
Property Value
XboxAuthXuiClaims
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<XboxAuthXuiClaims> XboxAuthXuiClaims { get; }
Property Value
JsonTypeInfo<XboxAuthXuiClaims>
Methods
GetTypeInfo(Type)
Gets metadata for the specified type.
public override JsonTypeInfo? GetTypeInfo(Type type)
Parameters
type Type
The type to fetch metadata for.
Returns
The metadata for the specified type, or null if the context has no metadata for the type.