Class PluginManifestContext
[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
optionsJsonSerializerOptionsThe 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
Default
The default JsonSerializerContext associated with a default JsonSerializerOptions instance.
public static PluginManifestContext Default { get; }
Property Value
GameVersion
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<GameVersion> GameVersion { get; }
Property Value
GeneratedSerializerOptions
The source-generated options associated with this context.
protected override JsonSerializerOptions? GeneratedSerializerOptions { get; }
Property Value
Int32
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<int> Int32 { get; }
Property Value
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
ListPluginManifestAssetInfo
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<PluginManifestAssetInfo>> ListPluginManifestAssetInfo { get; }
Property Value
PluginManifest
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<PluginManifest> PluginManifest { get; }
Property Value
PluginManifestAssetInfo
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<PluginManifestAssetInfo> PluginManifestAssetInfo { 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.