Class Alert
Represents an alert generated according to some rules defined in the system.
Inherited Members
Namespace: Nevatech.Vsb.Repository.Entities
Assembly: Nevatech.Vsb.Repository.dll
Syntax
public sealed class Alert : DomainObjectBase, IValidator, IExtensibleDataObject, IEquatable<Alert>
Constructors
Alert()
Declaration
public Alert()
Properties
AlertDateTime
Gets or sets the date and time (UTC) when alert has been generated.
Declaration
public DateTime AlertDateTime { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime |
AlertSourceTypeId
Gets the alert source type identifier.
Declaration
public int AlertSourceTypeId { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
AlertSourceTypeName
Gets the alert source type display name.
Declaration
public string AlertSourceTypeName { get; }
Property Value
Type | Description |
---|---|
System.String |
AlertSubtype
Gets or sets the identifier of alert subtype. The subtype is used to distinguish alerts of the same type. For example, subtype can be X.509 certificate thumbprint telling that alerts are coming from the same or different certificate. Or subtype can be service agreement metric name which allows to subgroup alerts by particular metric within the same alert type. The FrequencyTimeInterval is applied to each individual subtype.
Declaration
public string AlertSubtype { get; set; }
Property Value
Type | Description |
---|---|
System.String |
AlertTypeId
Gets or sets the identifier of alert type.
Declaration
public int AlertTypeId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
AlertTypeName
Gets the alert type display name.
Declaration
public string AlertTypeName { get; }
Property Value
Type | Description |
---|---|
System.String |
Data
Gets collection of the optional properties attached to the alert. For example, it may contain X.509 certificate name or identifier of service agreement violation.
Declaration
public DataPropertyCollection Data { get; }
Property Value
Type | Description |
---|---|
DataPropertyCollection |
Description
Gets or sets the alert text message.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String |
IsObserved
Gets or sets flag indicating that alert has been observed by an administrator (set up manually).
Declaration
public bool IsObserved { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ObjectType
Gets object type identifier.
Declaration
public override EntityType ObjectType { get; }
Property Value
Type | Description |
---|---|
EntityType |
Overrides
Methods
Equals(Alert)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(Alert other)
Parameters
Type | Name | Description |
---|---|---|
Alert | other | The object to compare with the current object. |
Returns
Type | Description |
---|---|
System.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 |
---|---|---|
System.Object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
System.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 |
---|---|
System.Int32 | Hash code of the current instance. |
Overrides
Validate()
Evaluates the state of this object.
Declaration
public override bool Validate()
Returns
Type | Description |
---|---|
System.Boolean | True if state is valid; otherwise, false. |
Overrides
Write(IFormatProvider, String)
Writes alert properties into a string according to the specified template.
Declaration
public string Write(IFormatProvider provider, string format)
Parameters
Type | Name | Description |
---|---|---|
System.IFormatProvider | provider | Format provider that supplies culture-specific formatting information. |
System.String | format | Template string that is used to write alert properties. |
Returns
Type | Description |
---|---|
System.String | String containing alert properties serialized according to the specified template string. |
Remarks
The standard format string tokens:
- {Id} - alert database identifier;
- {TypeId} - alert type database identifier;
- {TypeName} - alert type friendly name;
- {Subtype} - alert subtype;
- {SourceTypeId} - alert source type database identifier;
- {SourceTypeName} - alert source type friendly name;
- {Description} - alert description;
- {DateTime} - alert generation time in the reporting time zone;
- {DateTimeUtc} - alert generation time in UTC;
- {Data} - alert custom (source-specific) properties serialized to XML.
Auditing-specific tokens:
- {Data.EntityId} - database identifier of the changed major entity;
- {Data.EntityKey} - unique identifier of the changed major entity;
- {Data.EntityType} - changed major entity's type;
- {Data.FriendlyEntityType} - changed major entity's type friendly name;
- {Data.FriendlyEntityName} - friendly name of the changed major entity;
- {Data.ChangeSetId} - database identifier of the change set;
- {Data.ChangeSetDescription} - change set's description;
- {Data.ChangeType} - change type (1,2,4);
- {Data.FriendlyChangeType} - change type friendly name ('created','updated','deleted').
Service Agreement violations-specific tokens:
- {Data.ServiceAgreementId} - database identifier of the violated service agreement;
- {Data.ServiceAgreementName} - friendly name of the violated service agreement;
- {Data.ServiceAgreementTimeZone} - service agreement's time zone identifier;
- {Data.ViolationStartDateTimeLocal} - the most recent violation's date and time reported in the service agreement's time zone;
- {Data.ViolationMetricId} - identifier of the metric that triggered the violation;
- {Data.ViolationMetricType} - name of the metric that triggered the violation;
- {Data.ViolationMetricValue} - metric value read when violation was detected.
Developer Portal new user created event tokens:
- {Data.ConsumerId} - database identifier of the consumer account that user belongs to;
- {Data.ConsumerName} - friendly name of the consumer account that user belongs to;
- {Data.UserId} - database identifier of the new user;
- {Data.UserDisplayName} - friendly name of the created user;
- {Data.UserEmail} - email address of the created user;
- {Data.UserName} - login user-name of the created user;
- {Data.UserPassword} - temporary password of the created user.
Developer Portal user reset password event tokens:
- {Data.ConsumerId} - database identifier of the consumer account that user belongs to;
- {Data.ConsumerName} - friendly name of the consumer account that user belongs to;
- {Data.UserId} - database identifier of the user;
- {Data.UserDisplayName} - friendly name of the user;
- {Data.UserEmail} - email address of the user;
- {Data.UserPassword} - temporary password set for the user.
Developer Portal user forgot user-name event tokens:
- {Data.ConsumerId} - database identifier of the consumer account that user belongs to;
- {Data.ConsumerName} - friendly name of the consumer account that user belongs to;
- {Data.UserId} - database identifier of the user;
- {Data.UserDisplayName} - friendly name of the user;
- {Data.UserEmail} - email address of the user;
- {Data.UserName} - login user-name of the user.
Developer Portal new consumer created event tokens:
- {Data.ConsumerId} - database identifier of the new consumer account;
- {Data.ConsumerName} - friendly name of the new consumer account;
- {Data.UserId} - database identifier of the consumer administrator;
- {Data.UserDisplayName} - friendly name of the consumer administrator;
- {Data.UserEmail} - email address of the consumer administrator.
New subscription created or subscription pending activation events tokens:
- {Data.SubscriptionId} - database identifier of the subscription that has been created;
- {Data.SubscriptionName} - friendly name of the subscription that has been created;
- {Data.ConsumerId} - database identifier of the consumer account that subscription belongs to;
- {Data.ConsumerName} - friendly name of the consumer account that subscription belongs to;
- {Data.ProductId} - database identifier of the product that subscription belongs to;
- {Data.ProductName} - friendly name of the product that subscription belongs to.
Subscription activated event tokens:
- {Data.SubscriptionId} - database identifier of the subscription that has been activated;
- {Data.SubscriptionName} - friendly name of the subscription that has been activated;
- {Data.ConsumerId} - database identifier of the consumer account that subscription belongs to;
- {Data.ConsumerName} - friendly name of the consumer account that subscription belongs to;
- {Data.ConsumerEmails} - list of emails of the consumer administrators;
- {Data.ProductId} - database identifier of the product that subscription belongs to;
- {Data.ProductName} - friendly name of the product that subscription belongs to.
Subscription pending expiration event tokens:
- {Data.SubscriptionId} - database identifier of the subscription that is expiring;
- {Data.SubscriptionName} - friendly name of the subscription that is expiring;
- {Data.SubscriptionExpiration} - date/time (UTC) of the subscription expiration;
- {Data.ConsumerId} - database identifier of the consumer account that subscription belongs to;
- {Data.ConsumerName} - friendly name of the consumer account that subscription belongs to;
- {Data.ConsumerEmails} - list of emails of the consumer administrators;
- {Data.ProductId} - database identifier of the product that subscription belongs to;
- {Data.ProductName} - friendly name of the product that subscription belongs to.
Write(TextWriter, String)
Writes alert properties into provided text writer a according to the specified template.
Declaration
public void Write(TextWriter writer, string format)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextWriter | writer | Text writer to write into. |
System.String | format | Template string that is used to write alert properties. |
Remarks
See token's description on method's overload.