Example #1
0
        public EmailNotificationDispatchJobData(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "fromEmail":
                    this._FromEmail = propertyNode.InnerText;
                    continue;

                case "fromName":
                    this._FromName = propertyNode.InnerText;
                    continue;

                case "to":
                    this._To = ObjectFactory.Create <EmailNotificationRecipientJobData>(propertyNode);
                    continue;

                case "cc":
                    this._Cc = ObjectFactory.Create <EmailNotificationRecipientJobData>(propertyNode);
                    continue;

                case "bcc":
                    this._Bcc = ObjectFactory.Create <EmailNotificationRecipientJobData>(propertyNode);
                    continue;

                case "replyTo":
                    this._ReplyTo = ObjectFactory.Create <EmailNotificationRecipientJobData>(propertyNode);
                    continue;

                case "priority":
                    this._Priority = (EmailNotificationTemplatePriority)ParseEnum(typeof(EmailNotificationTemplatePriority), propertyNode.InnerText);
                    continue;

                case "confirmReadingTo":
                    this._ConfirmReadingTo = propertyNode.InnerText;
                    continue;

                case "hostname":
                    this._Hostname = propertyNode.InnerText;
                    continue;

                case "messageID":
                    this._MessageID = propertyNode.InnerText;
                    continue;

                case "customHeaders":
                    this._CustomHeaders = new List <KeyValue>();
                    foreach (XmlElement arrayNode in propertyNode.ChildNodes)
                    {
                        this._CustomHeaders.Add(ObjectFactory.Create <KeyValue>(arrayNode));
                    }
                    continue;
                }
            }
        }
Example #2
0
 public EmailNotificationDispatchJobData(JToken node) : base(node)
 {
     if (node["fromEmail"] != null)
     {
         this._FromEmail = node["fromEmail"].Value <string>();
     }
     if (node["fromName"] != null)
     {
         this._FromName = node["fromName"].Value <string>();
     }
     if (node["to"] != null)
     {
         this._To = ObjectFactory.Create <EmailNotificationRecipientJobData>(node["to"]);
     }
     if (node["cc"] != null)
     {
         this._Cc = ObjectFactory.Create <EmailNotificationRecipientJobData>(node["cc"]);
     }
     if (node["bcc"] != null)
     {
         this._Bcc = ObjectFactory.Create <EmailNotificationRecipientJobData>(node["bcc"]);
     }
     if (node["replyTo"] != null)
     {
         this._ReplyTo = ObjectFactory.Create <EmailNotificationRecipientJobData>(node["replyTo"]);
     }
     if (node["priority"] != null)
     {
         this._Priority = (EmailNotificationTemplatePriority)ParseEnum(typeof(EmailNotificationTemplatePriority), node["priority"].Value <string>());
     }
     if (node["confirmReadingTo"] != null)
     {
         this._ConfirmReadingTo = node["confirmReadingTo"].Value <string>();
     }
     if (node["hostname"] != null)
     {
         this._Hostname = node["hostname"].Value <string>();
     }
     if (node["messageID"] != null)
     {
         this._MessageID = node["messageID"].Value <string>();
     }
     if (node["customHeaders"] != null)
     {
         this._CustomHeaders = new List <KeyValue>();
         foreach (var arrayNode in node["customHeaders"].Children())
         {
             this._CustomHeaders.Add(ObjectFactory.Create <KeyValue>(arrayNode));
         }
     }
 }