Class NotificationMessage
Represents a notification message.
Implements
Inherited Members
Namespace: Innovt.Notification.Core.Domain
Assembly: Innovt.Notification.Core.dll
Syntax
public class NotificationMessage : IValidatableObject
Constructors
| Edit this page View SourceNotificationMessage(NotificationMessageType)
Initializes a new instance of the NotificationMessage class with the specified type.
Declaration
public NotificationMessage(NotificationMessageType type)
Parameters
Type | Name | Description |
---|---|---|
NotificationMessageType | type | The type of the notification message. |
NotificationMessage(NotificationMessageType, string, string, string)
Initializes a new instance of the NotificationMessage class with the specified type, from address, from name, and subject.
Declaration
public NotificationMessage(NotificationMessageType type, string fromAddress, string fromName, string subject)
Parameters
Type | Name | Description |
---|---|---|
NotificationMessageType | type | The type of the notification message. |
string | fromAddress | The "From" address. |
string | fromName | The "From" name. |
string | subject | The subject of the notification. |
Properties
| Edit this page View SourceBccTo
Gets or sets the list of "Bcc" contact information for the notification message.
Declaration
public IList<NotificationMessageContact> BccTo { get; }
Property Value
Type | Description |
---|---|
IList<NotificationMessageContact> |
Body
Gets or sets the body of the notification message.
Declaration
public NotificationMessageBody Body { get; set; }
Property Value
Type | Description |
---|---|
NotificationMessageBody |
CcTo
Gets or sets the list of "Cc" contact information for the notification message.
Declaration
public IList<NotificationMessageContact> CcTo { get; }
Property Value
Type | Description |
---|---|
IList<NotificationMessageContact> |
From
Gets or sets the "From" contact information for the notification message.
Declaration
public NotificationMessageContact From { get; }
Property Value
Type | Description |
---|---|
NotificationMessageContact |
ReplyToAddresses
Gets or sets the list of "Reply-To" contact information for the notification message.
Declaration
public IList<NotificationMessageContact> ReplyToAddresses { get; }
Property Value
Type | Description |
---|---|
IList<NotificationMessageContact> |
Subject
Gets or sets the subject of the notification message.
Declaration
public NotificationMessageSubject Subject { get; set; }
Property Value
Type | Description |
---|---|
NotificationMessageSubject |
To
Gets or sets the list of "To" contact information for the notification message.
Declaration
public IList<NotificationMessageContact> To { get; }
Property Value
Type | Description |
---|---|
IList<NotificationMessageContact> |
Type
Gets or sets the type of the notification message.
Declaration
public NotificationMessageType Type { get; set; }
Property Value
Type | Description |
---|---|
NotificationMessageType |
Methods
| Edit this page View SourceAddBccTo(string, string)
Adds "Bcc" contact information to the notification message.
Declaration
public virtual NotificationMessage AddBccTo(string address, string name = null)
Parameters
Type | Name | Description |
---|---|---|
string | address | |
string | name |
Returns
Type | Description |
---|---|
NotificationMessage |
AddCcTo(string, string)
Adds "Cc" contact information to the notification message.
Declaration
public virtual NotificationMessage AddCcTo(string address, string name = null)
Parameters
Type | Name | Description |
---|---|---|
string | address | |
string | name |
Returns
Type | Description |
---|---|
NotificationMessage |
AddFrom(string, string)
Adds the "From" contact information to the notification message.
Declaration
public NotificationMessage AddFrom(string address, string name = null)
Parameters
Type | Name | Description |
---|---|---|
string | address | |
string | name |
Returns
Type | Description |
---|---|
NotificationMessage |
AddReplyTo(string, string)
Adds "Reply-To" contact information to the notification message.
Declaration
public virtual NotificationMessage AddReplyTo(string address, string name = null)
Parameters
Type | Name | Description |
---|---|---|
string | address | |
string | name |
Returns
Type | Description |
---|---|
NotificationMessage |
AddSubject(string, string)
Adds the subject to the notification message.
Declaration
public NotificationMessage AddSubject(string subject, string charset = null)
Parameters
Type | Name | Description |
---|---|---|
string | subject | |
string | charset |
Returns
Type | Description |
---|---|
NotificationMessage |
AddTo(string, string)
Adds "To" contact information to the notification message.
Declaration
public NotificationMessage AddTo(string address, string name = null)
Parameters
Type | Name | Description |
---|---|---|
string | address | |
string | name |
Returns
Type | Description |
---|---|
NotificationMessage |
Validate(ValidationContext)
Determines whether the specified object is valid.
Declaration
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
Parameters
Type | Name | Description |
---|---|---|
ValidationContext | validationContext | The validation context. |
Returns
Type | Description |
---|---|
IEnumerable<ValidationResult> | A collection that holds failed-validation information. |