Table of Contents

Class PluginManifestContext

Namespace
Hi3Helper.Plugin.Core.Update
Assembly
Hi3Helper.Plugin.Core.dll
[JsonSerializable(typeof(PluginManifest))]
[JsonSourceGenerationOptions(IndentSize = 2, NewLine = "\n", WriteIndented = true, IndentCharacter = ' ')]
public class PluginManifestContext : JsonSerializerContext, IJsonTypeInfoResolver
Inheritance
PluginManifestContext
Implements
Inherited Members

Constructors

PluginManifestContext()

public PluginManifestContext()

PluginManifestContext(JsonSerializerOptions)

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

public PluginManifestContext(JsonSerializerOptions options)

Parameters

options JsonSerializerOptions

The run time provided options for the context instance.

Properties

ByteArray

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

public JsonTypeInfo<byte[]> ByteArray { get; }

Property Value

JsonTypeInfo<byte[]>

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

Property Value

PluginManifestContext

GameVersion

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

public JsonTypeInfo<GameVersion> GameVersion { get; }

Property Value

JsonTypeInfo<GameVersion>

GeneratedSerializerOptions

The source-generated options associated with this context.

protected override JsonSerializerOptions? GeneratedSerializerOptions { get; }

Property Value

JsonSerializerOptions

Int32

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

public JsonTypeInfo<int> Int32 { get; }

Property Value

JsonTypeInfo<int>

Int32Array

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

public JsonTypeInfo<int[]> Int32Array { 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>

ListPluginManifestAssetInfo

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

public JsonTypeInfo<List<PluginManifestAssetInfo>> ListPluginManifestAssetInfo { get; }

Property Value

JsonTypeInfo<List<PluginManifestAssetInfo>>

PluginManifest

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

public JsonTypeInfo<PluginManifest> PluginManifest { get; }

Property Value

JsonTypeInfo<PluginManifest>

PluginManifestAssetInfo

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

public JsonTypeInfo<PluginManifestAssetInfo> PluginManifestAssetInfo { get; }

Property Value

JsonTypeInfo<PluginManifestAssetInfo>

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.