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
optionsJsonSerializerOptions
Properties
Boolean
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<bool> Boolean { get; }
Property Value
CodeChannel
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<CodeChannel> CodeChannel { get; }
Property Value
CodeStreamInitMessage
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<CodeStreamInitMessage> CodeStreamInitMessage { get; }
Property Value
CommandInitMessage
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<CommandInitMessage> CommandInitMessage { get; }
Property Value
ConnectionMode
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<ConnectionMode> ConnectionMode { get; }
Property Value
Default
The default JsonSerializerContext associated with a default JsonSerializerOptions instance.
public static ConnectionContext Default { 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
InterceptInitMessage
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<InterceptInitMessage> InterceptInitMessage { get; }
Property Value
InterceptionMode
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<InterceptionMode> InterceptionMode { get; }
Property Value
ListCodeChannel
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<CodeChannel>> ListCodeChannel { get; }
Property Value
ListString
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<List<string>> ListString { get; }
Property Value
NullableCodeChannel
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<CodeChannel?> NullableCodeChannel { get; }
Property Value
PluginServiceInitMessage
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<PluginServiceInitMessage> PluginServiceInitMessage { get; }
Property Value
ServerInitMessage
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<ServerInitMessage> ServerInitMessage { get; }
Property Value
String
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<string> String { get; }
Property Value
SubscribeInitMessage
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<SubscribeInitMessage> SubscribeInitMessage { get; }
Property Value
SubscriptionMode
Defines the source generated JSON serialization contract metadata for a given type.
public JsonTypeInfo<SubscriptionMode> SubscriptionMode { get; }
Property Value
Methods
GetTypeInfo(Type)
public override JsonTypeInfo? GetTypeInfo(Type type)
Parameters
typeType