This repository was archived by the owner on Jul 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Nuclei.Communication = Interaction
Petrik van der Velde edited this page May 30, 2014
·
1 revision
A command set defines one or more commands that a remote endpoint can send to the command-owning endpoint.
- A command set consist of an interface, deriving from
ICommandSet
and a class that implements the interface. The class is used by the owning endpoint to execute the requested command invocations. The interface is presented to the remote endpoints to be used by them as the definition of the command set. - On the remote end a proxy is generated from the command interface. This proxy is used by the remote endpoint to invoke the commands. Upon invocation the proxy sends a message describing the invocation parameters to the owning endpoint.
- All command interfaces must comply with the following rules:
- A command set may only contain methods, no properties or events.
- Each method must return either a
Task
if there is no actual return value or aTask<T>
if there is a return value. If the return type is aTask<T>
then the type ofT
should be a closed constructed type that is serializable. - All method parameters should be serializable.
- Method parameters are not allowed be
out
orref
parameters.
A notification set defines one or more events which are published by the owning endpoint and provided to one or more remote endpoints which can elect to be notified if one of the events is raised.
- A notification set consists of an interface, deriving from
INotificationSet
and a class that implements the interface. The owning endpoint subscribes to the events published by the class. The interface is presented to the remote endpoints to be used by them as the definition of the notification set. - On the remote end a proxy is generated from the notification interface. This proxy raises the events as they are raised by the owning endpoint. Note that events are only raised if there is at least one subscriber to the event.
- All notification interfaces must comply with the following rules:
- A notification set may only have events, no properties or methods.
- Each event must be based on the
EventHandler<T>
delegate, no other delegates may be used. - The event arguments must be of a closed constructed type that is serializable.