public BulkUploadJobData(JToken node) : base(node) { if (node["userId"] != null) { this._UserId = node["userId"].Value <string>(); } if (node["uploadedBy"] != null) { this._UploadedBy = node["uploadedBy"].Value <string>(); } if (node["conversionProfileId"] != null) { this._ConversionProfileId = ParseInt(node["conversionProfileId"].Value <string>()); } if (node["resultsFileLocalPath"] != null) { this._ResultsFileLocalPath = node["resultsFileLocalPath"].Value <string>(); } if (node["resultsFileUrl"] != null) { this._ResultsFileUrl = node["resultsFileUrl"].Value <string>(); } if (node["numOfEntries"] != null) { this._NumOfEntries = ParseInt(node["numOfEntries"].Value <string>()); } if (node["numOfObjects"] != null) { this._NumOfObjects = ParseInt(node["numOfObjects"].Value <string>()); } if (node["filePath"] != null) { this._FilePath = node["filePath"].Value <string>(); } if (node["bulkUploadObjectType"] != null) { this._BulkUploadObjectType = (BulkUploadObjectType)StringEnum.Parse(typeof(BulkUploadObjectType), node["bulkUploadObjectType"].Value <string>()); } if (node["fileName"] != null) { this._FileName = node["fileName"].Value <string>(); } if (node["objectData"] != null) { this._ObjectData = ObjectFactory.Create <BulkUploadObjectData>(node["objectData"]); } if (node["type"] != null) { this._Type = (BulkUploadType)StringEnum.Parse(typeof(BulkUploadType), node["type"].Value <string>()); } if (node["emailRecipients"] != null) { this._EmailRecipients = node["emailRecipients"].Value <string>(); } if (node["numOfErrorObjects"] != null) { this._NumOfErrorObjects = ParseInt(node["numOfErrorObjects"].Value <string>()); } if (node["privileges"] != null) { this._Privileges = node["privileges"].Value <string>(); } }
public BulkUploadJobData(XmlElement node) : base(node) { foreach (XmlElement propertyNode in node.ChildNodes) { switch (propertyNode.Name) { case "userId": this._UserId = propertyNode.InnerText; continue; case "uploadedBy": this._UploadedBy = propertyNode.InnerText; continue; case "conversionProfileId": this._ConversionProfileId = ParseInt(propertyNode.InnerText); continue; case "resultsFileLocalPath": this._ResultsFileLocalPath = propertyNode.InnerText; continue; case "resultsFileUrl": this._ResultsFileUrl = propertyNode.InnerText; continue; case "numOfEntries": this._NumOfEntries = ParseInt(propertyNode.InnerText); continue; case "numOfObjects": this._NumOfObjects = ParseInt(propertyNode.InnerText); continue; case "filePath": this._FilePath = propertyNode.InnerText; continue; case "bulkUploadObjectType": this._BulkUploadObjectType = (BulkUploadObjectType)StringEnum.Parse(typeof(BulkUploadObjectType), propertyNode.InnerText); continue; case "fileName": this._FileName = propertyNode.InnerText; continue; case "objectData": this._ObjectData = ObjectFactory.Create <BulkUploadObjectData>(propertyNode); continue; case "type": this._Type = (BulkUploadType)StringEnum.Parse(typeof(BulkUploadType), propertyNode.InnerText); continue; case "emailRecipients": this._EmailRecipients = propertyNode.InnerText; continue; case "numOfErrorObjects": this._NumOfErrorObjects = ParseInt(propertyNode.InnerText); continue; } } }