Table of Contents

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

IJsonTypeInfoResolver

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

JsonTypeInfo<bool>

DateTime

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<DateTime> DateTime { get; }

Property Value

JsonTypeInfo<DateTime>

DateTimeOffset

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<DateTimeOffset> DateTimeOffset { get; }

Property Value

JsonTypeInfo<DateTimeOffset>

Default

The default System.Text.Json.Serialization.JsonSerializerContext associated with a default System.Text.Json.JsonSerializerOptions instance.

public static XboxGameJsonContext Default { get; }

Property Value

XboxGameJsonContext

Double

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<double> Double { get; }

Property Value

JsonTypeInfo<double>

GeneratedSerializerOptions

The source-generated options associated with this context.

protected override JsonSerializerOptions? GeneratedSerializerOptions { get; }

Property Value

JsonSerializerOptions?

Int32

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<int> Int32 { get; }

Property Value

JsonTypeInfo<int>

Int64

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<long> Int64 { get; }

Property Value

JsonTypeInfo<long>

JsonElement

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<JsonElement> JsonElement { get; }

Property Value

JsonTypeInfo<JsonElement>

JsonNode

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<JsonNode> JsonNode { get; }

Property Value

JsonTypeInfo<JsonNode>

JsonObject

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<JsonObject> JsonObject { get; }

Property Value

JsonTypeInfo<JsonObject>

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

JsonTypeInfo<object>

String

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<string> String { get; }

Property Value

JsonTypeInfo<string>

StringArray

Defines the source generated JSON serialization contract metadata for a given type.

public JsonTypeInfo<string[]> StringArray { get; }

Property Value

JsonTypeInfo<string[]>

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

JsonTypeInfo<XboxAuthTokens>

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

JsonTypeInfo?

The metadata for the specified type, or null if the context has no metadata for the type.