Table of Contents

Class NotificationMessage

Namespace
ArcanaDevelopment.adTempus.Shared.Notification
Assembly
ArcanaDevelopment.adTempus.Shared.dll

Represents a Notification Message to be sent by adTempus.

[DataContract]
[KnownType(typeof(NotificationMessage))]
[KnownType(typeof(NotificationRecipient))]
[KnownType(typeof(NotificationAttachment))]
public class NotificationMessage : INotificationMessage
Inheritance
object
NotificationMessage
Implements

Constructors

NotificationMessage()

public NotificationMessage()

Properties

AdditionalHeaders

Additional headers to be added to SMTP messages.

[DataMember]
public string AdditionalHeaders { get; set; }

Property Value

string

Remarks

Specify headers in RFC822 format, with newlines between headers: header-name-1: value 1 header-name-2: value 2

AddressMode

The type of addressing to use for recipients.

[DataMember]
public MessageAddressMode AddressMode { get; set; }

Property Value

MessageAddressMode

Attachments

The attachments for the message

[DataMember]
public List<INotificationAttachment> Attachments { get; }

Property Value

List<INotificationAttachment>

BodyFormat

The format of the Message.

[DataMember]
public TextType BodyFormat { get; set; }

Property Value

TextType

ExecutionHistoryItemOID

The OID of the instance that generated the message.

[DataMember]
public Guid? ExecutionHistoryItemOID { get; set; }

Property Value

Guid?

ExecutionHistoryStepOID

The OID of the step instance that generated the message.

[DataMember]
public Guid? ExecutionHistoryStepOID { get; set; }

Property Value

Guid?

FromAddress

The e-mail address of the sender.

[DataMember]
public string FromAddress { get; set; }

Property Value

string

FromName

The name of the sender.

[DataMember]
public string FromName { get; set; }

Property Value

string

InstanceID

The instance ID of the instance that generated the message.

[DataMember]
public int? InstanceID { get; set; }

Property Value

int?

JobOID

The OID of the job that generated the message.

[DataMember]
public Guid? JobOID { get; set; }

Property Value

Guid?

Message

The body of the message.

[DataMember]
public string Message { get; set; }

Property Value

string

MessageSeverity

The notification severity of the message.

[DataMember]
public int MessageSeverity { get; set; }

Property Value

int

Remarks

Specify the severity from 1 (lowest) to 9 (highest). Default is 5. Notification Recipients may specify rules for notification based on the severity of the message.

MessageTimestamp

The timestamp of the message.

[DataMember]
public DateTimeOffset MessageTimestamp { get; set; }

Property Value

DateTimeOffset

Remarks

Defaults to the current time.

Recipients

The recipients for this message.

[DataMember]
public List<INotificationRecipient> Recipients { get; }

Property Value

List<INotificationRecipient>

StepNumber

The step number that generated the message.

[DataMember]
public int? StepNumber { get; set; }

Property Value

int?

Subject

The subject of the message.

[DataMember]
public string Subject { get; set; }

Property Value

string

Methods

AddAttachment(string, string)

Adds an attachment to the message.

public NotificationAttachment AddAttachment(string fileLocation, string displayName = null)

Parameters

NameTypeDescription
fileLocation string

The name of the file to attach.

displayName string

The name that should be used for the attachment, if different from the original file name.

Returns

NotificationAttachment

AddMailRecipient(string, string, MessageRecipientType)

Adds an e-mail recipient to the message.

public NotificationRecipient AddMailRecipient(string name, string address, MessageRecipientType recipientType = MessageRecipientType.To)

Parameters

NameTypeDescription
name string

The name of the recipient. Can be empty.

address string

The e-mail address of the recipient. Required.

recipientType MessageRecipientType

The type of recipient (To, CC, BCC).

Returns

NotificationRecipient

Clone()

public NotificationMessage Clone()

Returns

NotificationMessage