//Constructors #region MailSender public MailSender(XmlNode senderNode) { this.For = (MailSenderTypes)Enum.Parse(typeof(MailSenderTypes), senderNode.Attributes["for"].Value); this.Address = new MailAddress(senderNode.Attributes["address"].Value); String temp = senderNode.Attributes["password"].Value; this.Password = YoumotoSettings.Decrypt(temp); }
//Methods #region Create /// <summary> /// Creates a configuration section handler. /// </summary> /// <param name="parent">Parent object.</param> /// <param name="configContext">Configuration context object.</param> /// <param name="section">Section XML node.</param> /// <returns>The created section handler object.</returns> public Object Create(Object parent, Object configContext, XmlNode section) { YoumotoSettings result = new YoumotoSettings(); result.Mailer = new MailerSettings(section["mailer"]); result.BlobStorage = new BlobStorage(section["blobstorage"]); result.Admin = YoumotoSettings.Decrypt(section["admin"].Attributes["user"].Value); result.AdminPassword = YoumotoSettings.Decrypt(section["admin"].Attributes["pass"].Value); return(result); }