Example #1
0
 public PortalCredentials(StoredPortalCredentials owner, XmlNode xmlNode)
 {
     this.Owner    = owner;
     this.Host     = xmlNode.Attributes["Host"].Value;
     this.Username = xmlNode.Attributes["Username"].Value;
     this.Password = xmlNode.Attributes["Password"].Value;
 }
Example #2
0
        public PortalCredentials(StoredPortalCredentials owner, string host, string username, string password)
        {
            this.Owner    = owner;
            this.Host     = host;
            this.Username = username;
            this.Password = password;

            this.Owner.Document.DocumentElement.InnerXml += string.Format(
                "<Credentials Host=\"{0}\" Username=\"{1}\" Password=\"{2}\" />",
                host,
                username,
                password
                );

            this.Owner.Save();
        }