Table of Contents

Class TokenJsonContext

Namespace
Arc4u.OAuth2.TokenProvider
Assembly
Arc4u.OAuth2.Blazor.dll

The source generated JSON serialization context used to read the token returned by the server.

[JsonSerializable(typeof(string))]
public class TokenJsonContext : JsonSerializerContext, IJsonTypeInfoResolver
Inheritance
TokenJsonContext
Implements
Inherited Members

Constructors

TokenJsonContext()

public TokenJsonContext()

TokenJsonContext(JsonSerializerOptions)

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

public TokenJsonContext(JsonSerializerOptions options)

Parameters

options JsonSerializerOptions

The run time provided options for the context instance.

Properties

Default

The default JsonSerializerContext associated with a default JsonSerializerOptions instance.

public static TokenJsonContext Default { get; }

Property Value

TokenJsonContext

GeneratedSerializerOptions

The source-generated options associated with this context.

protected override JsonSerializerOptions? GeneratedSerializerOptions { get; }

Property Value

JsonSerializerOptions

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.