Class Base
Base class for connection interpreters
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: DuetControlServer.IPC.Processors
Assembly: DuetControlServer.dll
Syntax
public class Base
Constructors
Base(Connection)
Base constructor for connection interpreters. Invoke this from any derived class
Declaration
public Base(Connection conn)
Parameters
Type | Name | Description |
---|---|---|
Connection | conn | Connection instance |
Properties
Connection
Connection to the IPC client served by this processor
Declaration
protected Connection Connection { get; }
Property Value
Type | Description |
---|---|
Connection |
Methods
AddSupportedCommands(IEnumerable<Type>)
Add a list of supported commands
Declaration
protected static void AddSupportedCommands(IEnumerable<Type> supportedCommands)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Type> | supportedCommands | List of supported commands |
GetCommandType(String)
Get the corresponding command type
Declaration
public static Type GetCommandType(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the command |
Returns
Type | Description |
---|---|
System.Type | Command type or null if not found |
Process()
Worker method for a given connection. No System.Threading.CancellationToken is passed here, use CancellationToken instead. Once this task exits the connection is terminated.
Declaration
public virtual Task Process()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Task that represents the worker lifecycle |
Exceptions
Type | Condition |
---|---|
System.NotImplementedException | Thrown if this method is not overridden |