Click or drag to resize

Alert Class

A user alert object for alerts managed in the xot_alerts table.
Inheritance Hierarchy
SystemObject
  NetQuarry.ServicesAlert

Namespace:  NetQuarry.Services
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public class Alert

The Alert type exposes the following members.

Constructors
  NameDescription
Public methodAlert(IAppContext)
Standard constructor.
Public methodAlert(IAppContext, String, String, AlertAttrs)
Standard constructor for creating an alert for use in a page message.
Top
Properties
  NameDescription
Public propertyAttributes
Gets/sets the AlertAttrs for this alert. This corresponds to the xot_alerts.attr_bits column.
Public propertyAutoCloseSeconds
The number of seconds the message should be displayed before being closed automatically. Set to zero if no auto-close is desired. Set to -1 to use the alert service default if one is specified.
Public propertyCreated
The UTC date/time the alert was created.
Public propertyCssClass
The CSS class to be added to the top level HTML presentation element for the message.
Public propertyDeliveryType
The delivery method for the message.
Public propertyID
Gets the ID of this alert. This corresponds to the xot_alerts.alert_pkid IDENTITY column and is currently populated only if a new alert is created via Save or an existing alert is loaded using LoadFirst(String, String).
Public propertyLinkText
The text caption for the LinkURL. If no such caption is provided a generic caption will be provided.
Public propertyPriority
Gets/sets the alert's priority. Note that a higher number causes the alert to be delivered before alerts with a lower priority. A priority of zero is the default and is considered neutral.
Top
Methods
  NameDescription
Public methodStatic memberConstruct(IAppContext, DateTime, String, String, NameValueCollection, String)
Creates an alert object from the supplied parameters
Public methodStatic memberConstruct(IAppContext, DateTime, String, String, String, String)
Creates an alert object from the supplied parameters
Public methodCreate
Sends an alert internally. The value returned is the unique ID for this alert.
Public methodDelete
Delete this alert. Requires that ID is known.
Public methodStatic memberDelete(IAppContext, Int32)
Deletes a single alert
Public methodStatic memberDeleteRelated
Deletes all alerts related to the key
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodLoadFirst
Loads the first deliverable alert matching ths specified filter. Alerts that have a future delivery date or a past expiration date are NOT considered deliverable.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSave
Save (insert or update as appropriate) this alert to the xot_alerts table.
Public methodToJson
Convert the alert into a JSON object suitable for use in the EAP.DeliverMsg() javascript method. Note that this is a non-standard serialization which includes custom alert object logic.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Fields
  NameDescription
Public fieldBody
Gets/Sets the body of the alert
Public fieldDeliveryDateUTC
Gets/Sets the delivery time. If null, the alert is delivered immediately.
Public fieldExpireDateUTC
Gets/Sets the expiration date. If null, the alert will not expire.
Public fieldLinkURL
Gets/Sets the URL (typically handler.ashx?req=nav&mop=[MOP]&pk=[pk]). See LinkText.
Public fieldMOP
Gets/Sets the MOP (if this is set along with the PrimaryKey, the LinkURL is automatically constructed.)
Public fieldPrimaryKey
Gets/Sets the PrimaryKey value (used in the LinkURL)
Public fieldRelatedID
Gets/Sets the RelatedID (string, int, Guid).
Public fieldRelatedType
Gets/Sets the type of the RelatedID as it should be stored in the database.
Public fieldSubject
Gets/Sets the subject of the alert.
Public fieldUserID
Gets/Sets the UserID who will receive the alert.
Top
Extension Methods
  NameDescription
Public Extension MethodEqualValue
Determines if the object value is equal to another object. If the two objects are null, then this returns true. There is special handling for guid comparisons (since a guid could be a string formatted in up to 3 different ways). If the special guid handling is not performed, then the object.Equals method is used.
(Defined by EAPUtil.)
Top
See Also