Table of Contents

Class ConnectionContext

Namespace
DuetAPI.Connection
Assembly
DuetAPI.dll

Context for JSON handling of connection classes

[JsonSerializable(typeof(CodeStreamInitMessage))]
[JsonSerializable(typeof(CommandInitMessage))]
[JsonSerializable(typeof(InterceptInitMessage))]
[JsonSerializable(typeof(PluginServiceInitMessage))]
[JsonSerializable(typeof(ServerInitMessage))]
[JsonSerializable(typeof(SubscribeInitMessage))]
[JsonSourceGenerationOptions(PreferredObjectCreationHandling = JsonObjectCreationHandling.Populate, PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)]
public sealed class ConnectionContext : JsonSerializerContext, IJsonTypeInfoResolver
Inheritance
ConnectionContext
Implements
Inherited Members

Constructors

ConnectionContext()

public ConnectionContext()

ConnectionContext(JsonSerializerOptions)

public ConnectionContext(JsonSerializerOptions options)

Parameters

options JsonSerializerOptions

Properties

Boolean

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

public JsonTypeInfo<bool> Boolean { get; }

Property Value

JsonTypeInfo<bool>

CodeChannel

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

public JsonTypeInfo<CodeChannel> CodeChannel { get; }

Property Value

JsonTypeInfo<CodeChannel>

CodeStreamInitMessage

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

public JsonTypeInfo<CodeStreamInitMessage> CodeStreamInitMessage { get; }

Property Value

JsonTypeInfo<CodeStreamInitMessage>

CommandInitMessage

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

public JsonTypeInfo<CommandInitMessage> CommandInitMessage { get; }

Property Value

JsonTypeInfo<CommandInitMessage>

ConnectionMode

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

public JsonTypeInfo<ConnectionMode> ConnectionMode { get; }

Property Value

JsonTypeInfo<ConnectionMode>

Default

The default JsonSerializerContext associated with a default JsonSerializerOptions instance.

public static ConnectionContext Default { get; }

Property Value

ConnectionContext

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>

InterceptInitMessage

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

public JsonTypeInfo<InterceptInitMessage> InterceptInitMessage { get; }

Property Value

JsonTypeInfo<InterceptInitMessage>

InterceptionMode

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

public JsonTypeInfo<InterceptionMode> InterceptionMode { get; }

Property Value

JsonTypeInfo<InterceptionMode>

ListCodeChannel

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

public JsonTypeInfo<List<CodeChannel>> ListCodeChannel { get; }

Property Value

JsonTypeInfo<List<CodeChannel>>

ListString

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

public JsonTypeInfo<List<string>> ListString { get; }

Property Value

JsonTypeInfo<List<string>>

NullableCodeChannel

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

public JsonTypeInfo<CodeChannel?> NullableCodeChannel { get; }

Property Value

JsonTypeInfo<CodeChannel?>

PluginServiceInitMessage

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

public JsonTypeInfo<PluginServiceInitMessage> PluginServiceInitMessage { get; }

Property Value

JsonTypeInfo<PluginServiceInitMessage>

ServerInitMessage

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

public JsonTypeInfo<ServerInitMessage> ServerInitMessage { get; }

Property Value

JsonTypeInfo<ServerInitMessage>

String

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

public JsonTypeInfo<string> String { get; }

Property Value

JsonTypeInfo<string>

SubscribeInitMessage

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

public JsonTypeInfo<SubscribeInitMessage> SubscribeInitMessage { get; }

Property Value

JsonTypeInfo<SubscribeInitMessage>

SubscriptionMode

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

public JsonTypeInfo<SubscriptionMode> SubscriptionMode { get; }

Property Value

JsonTypeInfo<SubscriptionMode>

Methods

GetTypeInfo(Type)

public override JsonTypeInfo? GetTypeInfo(Type type)

Parameters

type Type

Returns

JsonTypeInfo