Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ServiceFailureActions.cs
1
using
System
;
2
using
System.Collections.Generic
;
3
using
System.Text;
4
using
Waher.IoTGateway.Svc.ServiceManagement.Structures
;
5
6
namespace
Waher.IoTGateway.Svc.ServiceManagement.Classes
7
{
15
public
class
ServiceFailureActions(TimeSpan resetPeriod, string rebootMessage,
16
string restartCommand, IReadOnlyCollection<
ScAction
> actions)
17
: IEquatable<ServiceFailureActions>
18
{
22
public
TimeSpan ResetPeriod {
get
; } = resetPeriod;
23
27
public
string
RebootMessage {
get
; } = rebootMessage;
28
32
public
string
RestartCommand {
get
; } = restartCommand;
33
37
public
IReadOnlyCollection<ScAction> Actions {
get
; } = actions;
38
40
public
override
bool
Equals(
object
obj)
41
{
42
if
(obj is
null
)
43
return
false
;
44
45
return
obj is ServiceFailureActions Typed && this.Equals(Typed);
46
}
47
48
50
public
override
int
GetHashCode()
51
{
52
int
h1 = this.ResetPeriod.GetHashCode();
53
int
h2 = this.RebootMessage.GetHashCode();
54
55
h1 = ((h1 << 5) + h1) ^ h2;
56
57
h2 = this.RestartCommand.GetHashCode();
58
h1 = ((h1 << 5) + h1) ^ h2;
59
60
foreach
(
ScAction
Action
in
this.Actions)
61
{
62
h2 =
Action
.GetHashCode();
63
h1 = ((h1 << 5) + h1) ^ h2;
64
}
65
66
return
h1;
67
}
68
74
public
bool
Equals(ServiceFailureActions Other)
75
{
76
if
(Other is
null
)
77
return
false
;
78
79
return
this.GetHashCode() == Other.GetHashCode();
80
}
81
}
82
}
System.Collections.Generic
Definition:
ImplTypes.g.cs:4970
System
Definition:
Adapters.g.cs:58
Waher.Content.Dsn.Action
Action
The Action field indicates the action performed by the Reporting-MTA as a result of its attempt to de...
Definition:
PerRecipientFields.cs:13
Waher.IoTGateway.Svc.ServiceManagement.Classes
Definition:
ServiceControlManager.cs:9
Waher.IoTGateway.Svc.ServiceManagement.Structures
Definition:
ScAction.cs:6
Waher.IoTGateway.Svc.ServiceManagement.Structures.ScAction
Service controller action
Definition:
ScAction.cs:12
IoTGateway
Waher.IoTGateway.Svc
ServiceManagement
Classes
ServiceFailureActions.cs
Generated by
1.9.5