Table of Contents

Class MicrosoftAuthJsonContext

Namespace: CmlLib.Core.Auth.Microsoft.Serialization
Assembly: CmlLib.Core.Auth.Microsoft.dll

[JsonSourceGenerationOptions(GenerationMode = JsonSourceGenerationMode.Metadata)]
[JsonSerializable(typeof(JEToken))]
[JsonSerializable(typeof(JEProfile))]
[JsonSerializable(typeof(JEProfileSkin))]
[JsonSerializable(typeof(JEProfileCape))]
[JsonSerializable(typeof(MojangXboxAccessTokenPayload))]
public class MicrosoftAuthJsonContext : JsonSerializerContext, IJsonTypeInfoResolver

Inheritance

object ← JsonSerializerContext ← MicrosoftAuthJsonContext

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

MicrosoftAuthJsonContext()

public MicrosoftAuthJsonContext()

MicrosoftAuthJsonContext(JsonSerializerOptions)

Creates an instance of System.Text.Json.Serialization.JsonSerializerContext and binds it with the indicated System.Text.Json.JsonSerializerOptions.

public MicrosoftAuthJsonContext(JsonSerializerOptions options)

Parameters

options JsonSerializerOptions

The run time provided options for the context instance.

Properties

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 MicrosoftAuthJsonContext Default { get; }

Property Value

MicrosoftAuthJsonContext

GeneratedSerializerOptions

The source-generated options associated with this context.

protected override JsonSerializerOptions? GeneratedSerializerOptions { get; }

Property Value

JsonSerializerOptions?

IReadOnlyCollectionJEProfileCape

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

public JsonTypeInfo<IReadOnlyCollection<JEProfileCape>> IReadOnlyCollectionJEProfileCape { get; }

Property Value

JsonTypeInfo<IReadOnlyCollection<JEProfileCape>>

IReadOnlyCollectionJEProfileSkin

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

public JsonTypeInfo<IReadOnlyCollection<JEProfileSkin>> IReadOnlyCollectionJEProfileSkin { get; }

Property Value

JsonTypeInfo<IReadOnlyCollection<JEProfileSkin>>

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>

JEProfile

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

public JsonTypeInfo<JEProfile> JEProfile { get; }

Property Value

JsonTypeInfo<JEProfile>

JEProfileCape

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

public JsonTypeInfo<JEProfileCape> JEProfileCape { get; }

Property Value

JsonTypeInfo<JEProfileCape>

JEProfileSkin

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

public JsonTypeInfo<JEProfileSkin> JEProfileSkin { get; }

Property Value

JsonTypeInfo<JEProfileSkin>

JEToken

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

public JsonTypeInfo<JEToken> JEToken { get; }

Property Value

JsonTypeInfo<JEToken>

MojangXboxAccessTokenPayload

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

public JsonTypeInfo<MojangXboxAccessTokenPayload> MojangXboxAccessTokenPayload { get; }

Property Value

JsonTypeInfo<MojangXboxAccessTokenPayload>

NullableDateTimeOffset

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

public JsonTypeInfo<DateTimeOffset?> NullableDateTimeOffset { get; }

Property Value

JsonTypeInfo<DateTimeOffset?>

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[]>

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.