Table of Contents

Class CommandContext

Namespace
DuetAPI.Commands
Assembly
DuetAPI.dll

Context for JSON handling of IPC commands

[JsonSerializable(typeof(Code), TypeInfoPropertyName = "dcsCode")]
[JsonSerializable(typeof(Cancel))]
[JsonSerializable(typeof(Ignore))]
[JsonSerializable(typeof(Resolve))]
[JsonSerializable(typeof(Rewrite))]
[JsonSerializable(typeof(GetFileInfo))]
[JsonSerializable(typeof(ResolvePath))]
[JsonSerializable(typeof(CheckPassword))]
[JsonSerializable(typeof(EvaluateExpression))]
[JsonSerializable(typeof(Flush))]
[JsonSerializable(typeof(InvalidateChannel))]
[JsonSerializable(typeof(SetUpdateStatus))]
[JsonSerializable(typeof(SimpleCode))]
[JsonSerializable(typeof(WriteMessage))]
[JsonSerializable(typeof(SendHttpResponse))]
[JsonSerializable(typeof(AddHttpEndpoint))]
[JsonSerializable(typeof(ReceivedHttpRequest))]
[JsonSerializable(typeof(RemoveHttpEndpoint))]
[JsonSerializable(typeof(Acknowledge))]
[JsonSerializable(typeof(GetObjectModel))]
[JsonSerializable(typeof(QueryObjectModel))]
[JsonSerializable(typeof(LockObjectModel))]
[JsonSerializable(typeof(PatchObjectModel))]
[JsonSerializable(typeof(SetNetworkProtocol))]
[JsonSerializable(typeof(SetObjectModel))]
[JsonSerializable(typeof(SyncObjectModel))]
[JsonSerializable(typeof(UnlockObjectModel))]
[JsonSerializable(typeof(InstallSystemPackage))]
[JsonSerializable(typeof(UninstallSystemPackage))]
[JsonSerializable(typeof(InstallPlugin))]
[JsonSerializable(typeof(NotifyPluginStarted))]
[JsonSerializable(typeof(ReloadPlugin))]
[JsonSerializable(typeof(ResolvePluginProcess))]
[JsonSerializable(typeof(SetPluginData))]
[JsonSerializable(typeof(SetPluginProcess))]
[JsonSerializable(typeof(StartPlugin))]
[JsonSerializable(typeof(StartPlugins))]
[JsonSerializable(typeof(StopPlugin))]
[JsonSerializable(typeof(StopPlugins))]
[JsonSerializable(typeof(UninstallPlugin))]
[JsonSerializable(typeof(AddUserSession))]
[JsonSerializable(typeof(RemoveUserSession))]
[JsonSerializable(typeof(BaseResponse))]
[JsonSerializable(typeof(ErrorResponse))]
[JsonSerializable(typeof(bool))]
[JsonSerializable(typeof(int))]
[JsonSerializable(typeof(string))]
[JsonSerializable(typeof(JsonElement))]
[JsonSourceGenerationOptions(PreferredObjectCreationHandling = JsonObjectCreationHandling.Populate, PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)]
public sealed class CommandContext : JsonSerializerContext, IJsonTypeInfoResolver
Inheritance
CommandContext
Implements
Inherited Members

Constructors

CommandContext()

public CommandContext()

CommandContext(JsonSerializerOptions)

public CommandContext(JsonSerializerOptions options)

Parameters

options JsonSerializerOptions

Properties

AccessLevel

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

public JsonTypeInfo<AccessLevel> AccessLevel { get; }

Property Value

JsonTypeInfo<AccessLevel>

Acknowledge

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

public JsonTypeInfo<Acknowledge> Acknowledge { get; }

Property Value

JsonTypeInfo<Acknowledge>

AddHttpEndpoint

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

public JsonTypeInfo<AddHttpEndpoint> AddHttpEndpoint { get; }

Property Value

JsonTypeInfo<AddHttpEndpoint>

AddUserSession

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

public JsonTypeInfo<AddUserSession> AddUserSession { get; }

Property Value

JsonTypeInfo<AddUserSession>

BaseResponse

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

public JsonTypeInfo<BaseResponse> BaseResponse { get; }

Property Value

JsonTypeInfo<BaseResponse>

Boolean

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

public JsonTypeInfo<bool> Boolean { get; }

Property Value

JsonTypeInfo<bool>

Byte

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

public JsonTypeInfo<byte> Byte { get; }

Property Value

JsonTypeInfo<byte>

Cancel

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

public JsonTypeInfo<Cancel> Cancel { get; }

Property Value

JsonTypeInfo<Cancel>

CheckPassword

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

public JsonTypeInfo<CheckPassword> CheckPassword { get; }

Property Value

JsonTypeInfo<CheckPassword>

CodeChannel

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

public JsonTypeInfo<CodeChannel> CodeChannel { get; }

Property Value

JsonTypeInfo<CodeChannel>

CodeFlags

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

public JsonTypeInfo<CodeFlags> CodeFlags { get; }

Property Value

JsonTypeInfo<CodeFlags>

CodeParameter

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

public JsonTypeInfo<CodeParameter> CodeParameter { get; }

Property Value

JsonTypeInfo<CodeParameter>

CodeType

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

public JsonTypeInfo<CodeType> CodeType { get; }

Property Value

JsonTypeInfo<CodeType>

DateTime

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

public JsonTypeInfo<DateTime> DateTime { get; }

Property Value

JsonTypeInfo<DateTime>

Default

The default JsonSerializerContext associated with a default JsonSerializerOptions instance.

public static CommandContext Default { get; }

Property Value

CommandContext

DictionaryStringString

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

public JsonTypeInfo<Dictionary<string, string>> DictionaryStringString { get; }

Property Value

JsonTypeInfo<Dictionary<string, string>>

ErrorResponse

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

public JsonTypeInfo<ErrorResponse> ErrorResponse { get; }

Property Value

JsonTypeInfo<ErrorResponse>

EvaluateExpression

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

public JsonTypeInfo<EvaluateExpression> EvaluateExpression { get; }

Property Value

JsonTypeInfo<EvaluateExpression>

EventLogLevel

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

public JsonTypeInfo<EventLogLevel> EventLogLevel { get; }

Property Value

JsonTypeInfo<EventLogLevel>

FileDirectory

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

public JsonTypeInfo<FileDirectory> FileDirectory { get; }

Property Value

JsonTypeInfo<FileDirectory>

Flush

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

public JsonTypeInfo<Flush> Flush { get; }

Property Value

JsonTypeInfo<Flush>

GeneratedSerializerOptions

The source-generated options associated with this context.

protected override JsonSerializerOptions? GeneratedSerializerOptions { get; }

Property Value

JsonSerializerOptions

GetFileInfo

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

public JsonTypeInfo<GetFileInfo> GetFileInfo { get; }

Property Value

JsonTypeInfo<GetFileInfo>

GetObjectModel

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

public JsonTypeInfo<GetObjectModel> GetObjectModel { get; }

Property Value

JsonTypeInfo<GetObjectModel>

HttpEndpointType

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

public JsonTypeInfo<HttpEndpointType> HttpEndpointType { get; }

Property Value

JsonTypeInfo<HttpEndpointType>

HttpResponseType

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

public JsonTypeInfo<HttpResponseType> HttpResponseType { get; }

Property Value

JsonTypeInfo<HttpResponseType>

Ignore

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

public JsonTypeInfo<Ignore> Ignore { get; }

Property Value

JsonTypeInfo<Ignore>

InstallPlugin

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

public JsonTypeInfo<InstallPlugin> InstallPlugin { get; }

Property Value

JsonTypeInfo<InstallPlugin>

InstallSystemPackage

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

public JsonTypeInfo<InstallSystemPackage> InstallSystemPackage { get; }

Property Value

JsonTypeInfo<InstallSystemPackage>

Int32

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

public JsonTypeInfo<int> Int32 { 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>

InvalidateChannel

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

public JsonTypeInfo<InvalidateChannel> InvalidateChannel { get; }

Property Value

JsonTypeInfo<InvalidateChannel>

JsonElement

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

public JsonTypeInfo<JsonElement> JsonElement { get; }

Property Value

JsonTypeInfo<JsonElement>

KeywordType

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

public JsonTypeInfo<KeywordType> KeywordType { get; }

Property Value

JsonTypeInfo<KeywordType>

ListCodeParameter

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

public JsonTypeInfo<List<CodeParameter>> ListCodeParameter { get; }

Property Value

JsonTypeInfo<List<CodeParameter>>

LockObjectModel

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

public JsonTypeInfo<LockObjectModel> LockObjectModel { get; }

Property Value

JsonTypeInfo<LockObjectModel>

Message

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

public JsonTypeInfo<Message> Message { get; }

Property Value

JsonTypeInfo<Message>

MessageType

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

public JsonTypeInfo<MessageType> MessageType { get; }

Property Value

JsonTypeInfo<MessageType>

NetworkProtocol

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

public JsonTypeInfo<NetworkProtocol> NetworkProtocol { get; }

Property Value

JsonTypeInfo<NetworkProtocol>

NotifyPluginStarted

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

public JsonTypeInfo<NotifyPluginStarted> NotifyPluginStarted { get; }

Property Value

JsonTypeInfo<NotifyPluginStarted>

NullableEventLogLevel

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

public JsonTypeInfo<EventLogLevel?> NullableEventLogLevel { get; }

Property Value

JsonTypeInfo<EventLogLevel?>

NullableFileDirectory

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

public JsonTypeInfo<FileDirectory?> NullableFileDirectory { get; }

Property Value

JsonTypeInfo<FileDirectory?>

NullableInt32

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

public JsonTypeInfo<int?> NullableInt32 { get; }

Property Value

JsonTypeInfo<int?>

NullableInt64

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

public JsonTypeInfo<long?> NullableInt64 { get; }

Property Value

JsonTypeInfo<long?>

PatchObjectModel

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

public JsonTypeInfo<PatchObjectModel> PatchObjectModel { get; }

Property Value

JsonTypeInfo<PatchObjectModel>

QueryObjectModel

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

public JsonTypeInfo<QueryObjectModel> QueryObjectModel { get; }

Property Value

JsonTypeInfo<QueryObjectModel>

ReceivedHttpRequest

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

public JsonTypeInfo<ReceivedHttpRequest> ReceivedHttpRequest { get; }

Property Value

JsonTypeInfo<ReceivedHttpRequest>

ReloadPlugin

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

public JsonTypeInfo<ReloadPlugin> ReloadPlugin { get; }

Property Value

JsonTypeInfo<ReloadPlugin>

RemoveHttpEndpoint

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

public JsonTypeInfo<RemoveHttpEndpoint> RemoveHttpEndpoint { get; }

Property Value

JsonTypeInfo<RemoveHttpEndpoint>

RemoveUserSession

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

public JsonTypeInfo<RemoveUserSession> RemoveUserSession { get; }

Property Value

JsonTypeInfo<RemoveUserSession>

Resolve

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

public JsonTypeInfo<Resolve> Resolve { get; }

Property Value

JsonTypeInfo<Resolve>

ResolvePath

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

public JsonTypeInfo<ResolvePath> ResolvePath { get; }

Property Value

JsonTypeInfo<ResolvePath>

ResolvePluginProcess

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

public JsonTypeInfo<ResolvePluginProcess> ResolvePluginProcess { get; }

Property Value

JsonTypeInfo<ResolvePluginProcess>

Rewrite

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

public JsonTypeInfo<Rewrite> Rewrite { get; }

Property Value

JsonTypeInfo<Rewrite>

SendHttpResponse

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

public JsonTypeInfo<SendHttpResponse> SendHttpResponse { get; }

Property Value

JsonTypeInfo<SendHttpResponse>

SessionType

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

public JsonTypeInfo<SessionType> SessionType { get; }

Property Value

JsonTypeInfo<SessionType>

SetNetworkProtocol

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

public JsonTypeInfo<SetNetworkProtocol> SetNetworkProtocol { get; }

Property Value

JsonTypeInfo<SetNetworkProtocol>

SetObjectModel

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

public JsonTypeInfo<SetObjectModel> SetObjectModel { get; }

Property Value

JsonTypeInfo<SetObjectModel>

SetPluginData

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

public JsonTypeInfo<SetPluginData> SetPluginData { get; }

Property Value

JsonTypeInfo<SetPluginData>

SetPluginProcess

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

public JsonTypeInfo<SetPluginProcess> SetPluginProcess { get; }

Property Value

JsonTypeInfo<SetPluginProcess>

SetUpdateStatus

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

public JsonTypeInfo<SetUpdateStatus> SetUpdateStatus { get; }

Property Value

JsonTypeInfo<SetUpdateStatus>

SimpleCode

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

public JsonTypeInfo<SimpleCode> SimpleCode { get; }

Property Value

JsonTypeInfo<SimpleCode>

StartPlugin

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

public JsonTypeInfo<StartPlugin> StartPlugin { get; }

Property Value

JsonTypeInfo<StartPlugin>

StartPlugins

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

public JsonTypeInfo<StartPlugins> StartPlugins { get; }

Property Value

JsonTypeInfo<StartPlugins>

StopPlugin

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

public JsonTypeInfo<StopPlugin> StopPlugin { get; }

Property Value

JsonTypeInfo<StopPlugin>

StopPlugins

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

public JsonTypeInfo<StopPlugins> StopPlugins { get; }

Property Value

JsonTypeInfo<StopPlugins>

String

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

public JsonTypeInfo<string> String { get; }

Property Value

JsonTypeInfo<string>

SyncObjectModel

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

public JsonTypeInfo<SyncObjectModel> SyncObjectModel { get; }

Property Value

JsonTypeInfo<SyncObjectModel>

UninstallPlugin

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

public JsonTypeInfo<UninstallPlugin> UninstallPlugin { get; }

Property Value

JsonTypeInfo<UninstallPlugin>

UninstallSystemPackage

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

public JsonTypeInfo<UninstallSystemPackage> UninstallSystemPackage { get; }

Property Value

JsonTypeInfo<UninstallSystemPackage>

UnlockObjectModel

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

public JsonTypeInfo<UnlockObjectModel> UnlockObjectModel { get; }

Property Value

JsonTypeInfo<UnlockObjectModel>

WriteMessage

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

public JsonTypeInfo<WriteMessage> WriteMessage { get; }

Property Value

JsonTypeInfo<WriteMessage>

dcsCode

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

public JsonTypeInfo<Code> dcsCode { get; }

Property Value

JsonTypeInfo<Code>

Methods

GetTypeInfo(Type)

public override JsonTypeInfo? GetTypeInfo(Type type)

Parameters

type Type

Returns

JsonTypeInfo