Class Subscription
Subscription processor that notifies clients about object model changes. There is no point in deserializing the object model here so only the JSON representation is kept here.
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 Subscription : Base
Constructors
Subscription(Connection, ClientInitMessage)
Constructor of the subscription processor
Declaration
public Subscription(Connection conn, ClientInitMessage initMessage)
Parameters
Type | Name | Description |
---|---|---|
Connection | conn | Connection instance |
ClientInitMessage | initMessage | Initialization message |
Fields
SupportedCommands
List of supported commands in this mode
Declaration
public static readonly Type[] SupportedCommands
Field Value
Type | Description |
---|---|
System.Type[] |
Properties
AreClientsConnected
True if any subscribers are connected
Declaration
public static bool AreClientsConnected { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
GetPathNode(Dictionary<String, Object>, Object[])
Get the object from a path node
Declaration
public static object GetPathNode(Dictionary<string, object> root, object[] path)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> | root | Root dictionary |
System.Object[] | path | Path node |
Returns
Type | Description |
---|---|
System.Object | Item at the given path |
Process()
Task that keeps pushing model updates to the client
Declaration
public override Task Process()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Task that represents the lifecycle of a connection |