Table of Contents

Class AssetLinkJsonConverter<TAsset>

Namespace
Uncreated.Warfare.Configuration
Assembly
Uncreated.Warfare.dll
public class AssetLinkJsonConverter<TAsset> : JsonConverter<IAssetLink<TAsset>?> where TAsset : Asset

Type Parameters

TAsset
Inheritance
AssetLinkJsonConverter<TAsset>
Inherited Members

Methods

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads and converts the JSON to type Uncreated.Warfare.Configuration.IAssetLink{`0}.

public override IAssetLink<TAsset>? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

Parameters

reader Utf8JsonReader

The reader.

typeToConvert Type

The type to convert.

options JsonSerializerOptions

An object that specifies serialization options to use.

Returns

IAssetLink<TAsset>

The converted value.

Writes a specified value as JSON.

public override void Write(Utf8JsonWriter writer, IAssetLink<TAsset>? value, JsonSerializerOptions options)

Parameters

writer Utf8JsonWriter

The writer to write to.

value IAssetLink<TAsset>

The value to convert to JSON.

options JsonSerializerOptions

An object that specifies serialization options to use.