Class AlertHandler
Represents an alert handler assignment to particular alert type or alert group. The entity contains configuration of that alert handler.
Inherited Members
Namespace: Nevatech.Vsb.Repository.Entities
Assembly: Nevatech.Vsb.Repository.dll
Syntax
public sealed class AlertHandler : DomainObjectBase, IValidator, IExtensibleDataObject, IEquatable<AlertHandler>
Constructors
AlertHandler()
Initializes an empty instance.
Declaration
public AlertHandler()
AlertHandler(AlertHandler)
Initializes a new instance by copying all properties from the provided alert handler.
Declaration
public AlertHandler(AlertHandler alertHandler)
Parameters
Type | Name | Description |
---|---|---|
AlertHandler | alertHandler | Alert handler to be initialized from. |
Properties
AlertGroupId
Gets or sets the identifier of alert group that handler must process. AlertGroupId and AlertTypeId are mutually exclusive, but AlertSubtype can be used with both.
Declaration
public int? AlertGroupId { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Int32> |
AlertHandlerTypeId
Gets or sets the identifier of the alert handler type that needs to be instantiated.
Declaration
public int AlertHandlerTypeId { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
AlertSubtype
Gets or sets the identifier of alert type subtype that handler must process. AlertGroupId and AlertTypeId are mutually exclusive, but AlertSubtype can be used with both.
Declaration
public string AlertSubtype { get; set; }
Property Value
Type | Description |
---|---|
String |
AlertTypeId
Gets or sets the identifier of alert type that handler must process. AlertGroupId and AlertTypeId are mutually exclusive, but AlertSubtype can be used with both.
Declaration
public int? AlertTypeId { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Int32> |
Configuration
Gets or sets the handler's private configuration.
Declaration
public string Configuration { get; set; }
Property Value
Type | Description |
---|---|
String |
ExecutionTimeInterval
Gets or sets the minimum time interval length between two subsequent handler executions. Handler is provided with alerts generated since its last execution.
Declaration
public int ExecutionTimeInterval { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
ExecutionTimeUnit
Gets or sets the measure units of the minimum time interval between two subsequent handler executions. Handler is provided with alerts generated since its last execution.
Declaration
public TimeUnit ExecutionTimeUnit { get; set; }
Property Value
Type | Description |
---|---|
TimeUnit |
IsEnabled
Gets or sets flag indicating that handler is currently enabled and can process alerts.
Declaration
public bool IsEnabled { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
LastExecutionTime
Gets date and time of the handler's last execution.
Declaration
public DateTime? LastExecutionTime { get; }
Property Value
Type | Description |
---|---|
Nullable<DateTime> |
ObjectType
Gets object type identifier.
Declaration
public override EntityType ObjectType { get; }
Property Value
Type | Description |
---|---|
EntityType |
Overrides
Methods
Equals(AlertHandler)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(AlertHandler other)
Parameters
Type | Name | Description |
---|---|---|
AlertHandler | other | The object to compare with the current object. |
Returns
Type | Description |
---|---|
Boolean | True, if objects are equal. False, if objects are not equal. |
Equals(AlertHandler, Boolean)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(AlertHandler other, bool useXmlComparison)
Parameters
Type | Name | Description |
---|---|---|
AlertHandler | other | The object to compare with the current object. |
Boolean | useXmlComparison | Flag indicating that Configuration property contains XML, so XML-based comparison should be used. If False then simple string comparison is used. |
Returns
Type | Description |
---|---|
Boolean | True, if objects are equal. False, if objects are not equal. |
Equals(Object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
Boolean | True, if objects are equal. False, if objects are not equal. |
Overrides
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | Hash code of the current instance. |
Overrides
Validate()
Evaluates the state of this object.
Declaration
public override bool Validate()
Returns
Type | Description |
---|---|
Boolean | True if state is valid; otherwise, false. |