public UploadResponse(JToken node) : base(node)
 {
     if (node["uploadTokenId"] != null)
     {
         this._UploadTokenId = node["uploadTokenId"].Value <string>();
     }
     if (node["fileSize"] != null)
     {
         this._FileSize = ParseInt(node["fileSize"].Value <string>());
     }
     if (node["errorCode"] != null)
     {
         this._ErrorCode = (UploadErrorCode)ParseEnum(typeof(UploadErrorCode), node["errorCode"].Value <string>());
     }
     if (node["errorDescription"] != null)
     {
         this._ErrorDescription = node["errorDescription"].Value <string>();
     }
 }
Exemplo n.º 2
0
        public UploadResponse(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "uploadTokenId":
                    this._UploadTokenId = propertyNode.InnerText;
                    continue;

                case "fileSize":
                    this._FileSize = ParseInt(propertyNode.InnerText);
                    continue;

                case "errorCode":
                    this._ErrorCode = (UploadErrorCode)ParseEnum(typeof(UploadErrorCode), propertyNode.InnerText);
                    continue;

                case "errorDescription":
                    this._ErrorDescription = propertyNode.InnerText;
                    continue;
                }
            }
        }