Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ClusterResponseEventArgs.cs
1using System;
2using System.Threading.Tasks;
3
5{
9 public class ClusterResponseEventArgs<ResponseType> : EventArgs
10 {
11 private readonly IClusterCommand command;
12 private readonly EndpointResponse<ResponseType>[] responses;
13 private readonly object state;
14
22 : base()
23 {
24 this.command = Command;
25 this.responses = Responses;
26 this.state = State;
27 }
28
32 public IClusterCommand Command => this.command;
33
37 public EndpointResponse<ResponseType>[] Responses => this.responses;
38
42 public object State => this.state;
43
47 public bool Ok
48 {
49 get
50 {
51 foreach (EndpointResponse<ResponseType> P in this.responses)
52 {
53 if (!P.Ok)
54 return false;
55 }
56
57 return true;
58 }
59 }
60 }
61}
Event arguments for cluster message acknowledgement events.
ClusterResponseEventArgs(IClusterCommand Command, EndpointResponse< ResponseType >[] Responses, object State)
Event arguments for cluster message acknowledgement events.
bool Ok
If the command was executed without error on all endpoints.
IClusterCommand Command
Cluster command object.
EndpointResponse< ResponseType >[] Responses
Command execution responses.
object State
State object passed on to the original request.
Contains the response from one of the endpoints in the cluster.
bool Ok
If the command was executed without error on the endpoint.
Interface for cluster commands.