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
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
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 MicrosoftAuthJsonContext Default { get; }
Property Value
GeneratedSerializerOptions
The source-generated options associated with this context.
protected override JsonSerializerOptions? GeneratedSerializerOptions { get; }
Property Value
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
Int64
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<long> Int64 { get; }
Property Value
JEProfile
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<JEProfile> JEProfile { get; }
Property Value
JEProfileCape
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<JEProfileCape> JEProfileCape { get; }
Property Value
JEProfileSkin
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<JEProfileSkin> JEProfileSkin { get; }
Property Value
JEToken
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<JEToken> JEToken { get; }
Property Value
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
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
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.