Table of Contents

Class MoongateHttpJsonContext

Namespace
Moongate.Server.Http.Json
Assembly
Moongate.Server.Http.dll
[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)]
[JsonSerializable(typeof(MoongateHttpLoginRequest))]
[JsonSerializable(typeof(MoongateHttpLoginResponse))]
public class MoongateHttpJsonContext : JsonSerializerContext, IJsonTypeInfoResolver
Inheritance
MoongateHttpJsonContext
Implements
Inherited Members

Constructors

MoongateHttpJsonContext()

public MoongateHttpJsonContext()

MoongateHttpJsonContext(JsonSerializerOptions)

Creates an instance of JsonSerializerContext and binds it with the indicated JsonSerializerOptions.

public MoongateHttpJsonContext(JsonSerializerOptions options)

Parameters

options JsonSerializerOptions

The run time provided options for the context instance.

Properties

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 JsonSerializerContext associated with a default JsonSerializerOptions instance.

public static MoongateHttpJsonContext Default { get; }

Property Value

MoongateHttpJsonContext

GeneratedSerializerOptions

The source-generated options associated with this context.

protected override JsonSerializerOptions? GeneratedSerializerOptions { get; }

Property Value

JsonSerializerOptions

MoongateHttpLoginRequest

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

public JsonTypeInfo<MoongateHttpLoginRequest> MoongateHttpLoginRequest { get; }

Property Value

JsonTypeInfo<MoongateHttpLoginRequest>

MoongateHttpLoginResponse

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

public JsonTypeInfo<MoongateHttpLoginResponse> MoongateHttpLoginResponse { get; }

Property Value

JsonTypeInfo<MoongateHttpLoginResponse>

String

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

public JsonTypeInfo<string> String { 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.