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

                case "port":
                    this._Port = ParseInt(propertyNode.InnerText);
                    continue;

                case "protocol":
                    this._Protocol = (ActivitiBusinessProcessServerProtocol)StringEnum.Parse(typeof(ActivitiBusinessProcessServerProtocol), propertyNode.InnerText);
                    continue;

                case "username":
                    this._Username = propertyNode.InnerText;
                    continue;

                case "password":
                    this._Password = propertyNode.InnerText;
                    continue;
                }
            }
        }
 public ActivitiBusinessProcessServer(JToken node) : base(node)
 {
     if (node["host"] != null)
     {
         this._Host = node["host"].Value <string>();
     }
     if (node["port"] != null)
     {
         this._Port = ParseInt(node["port"].Value <string>());
     }
     if (node["protocol"] != null)
     {
         this._Protocol = (ActivitiBusinessProcessServerProtocol)StringEnum.Parse(typeof(ActivitiBusinessProcessServerProtocol), node["protocol"].Value <string>());
     }
     if (node["username"] != null)
     {
         this._Username = node["username"].Value <string>();
     }
     if (node["password"] != null)
     {
         this._Password = node["password"].Value <string>();
     }
 }