Class MoongateHttpJsonContext
[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
optionsJsonSerializerOptionsThe 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
Default
The default JsonSerializerContext associated with a default JsonSerializerOptions instance.
public static MoongateHttpJsonContext Default { get; }
Property Value
GeneratedSerializerOptions
The source-generated options associated with this context.
protected override JsonSerializerOptions? GeneratedSerializerOptions { get; }
Property Value
MoongateHttpLoginRequest
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<MoongateHttpLoginRequest> MoongateHttpLoginRequest { get; }
Property Value
MoongateHttpLoginResponse
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<MoongateHttpLoginResponse> MoongateHttpLoginResponse { get; }
Property Value
String
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<string> String { get; }
Property Value
Methods
GetTypeInfo(Type)
Gets metadata for the specified type.
public override JsonTypeInfo? GetTypeInfo(Type type)
Parameters
typeTypeThe type to fetch metadata for.
Returns
- JsonTypeInfo
The metadata for the specified type, or null if the context has no metadata for the type.