public Cielo24JobProviderData(XmlElement node) : base(node) { foreach (XmlElement propertyNode in node.ChildNodes) { switch (propertyNode.Name) { case "entryId": this._EntryId = propertyNode.InnerText; continue; case "flavorAssetId": this._FlavorAssetId = propertyNode.InnerText; continue; case "captionAssetFormats": this._CaptionAssetFormats = propertyNode.InnerText; continue; case "priority": this._Priority = (Cielo24Priority)StringEnum.Parse(typeof(Cielo24Priority), propertyNode.InnerText); continue; case "fidelity": this._Fidelity = (Cielo24Fidelity)StringEnum.Parse(typeof(Cielo24Fidelity), propertyNode.InnerText); continue; case "username": this._Username = propertyNode.InnerText; continue; case "password": this._Password = propertyNode.InnerText; continue; case "baseUrl": this._BaseUrl = propertyNode.InnerText; continue; case "spokenLanguage": this._SpokenLanguage = (Language)StringEnum.Parse(typeof(Language), propertyNode.InnerText); continue; case "replaceMediaContent": this._ReplaceMediaContent = ParseBool(propertyNode.InnerText); continue; case "additionalParameters": this._AdditionalParameters = propertyNode.InnerText; continue; } } }
public Cielo24JobProviderData(JToken node) : base(node) { if (node["entryId"] != null) { this._EntryId = node["entryId"].Value <string>(); } if (node["flavorAssetId"] != null) { this._FlavorAssetId = node["flavorAssetId"].Value <string>(); } if (node["captionAssetFormats"] != null) { this._CaptionAssetFormats = node["captionAssetFormats"].Value <string>(); } if (node["priority"] != null) { this._Priority = (Cielo24Priority)StringEnum.Parse(typeof(Cielo24Priority), node["priority"].Value <string>()); } if (node["fidelity"] != null) { this._Fidelity = (Cielo24Fidelity)StringEnum.Parse(typeof(Cielo24Fidelity), node["fidelity"].Value <string>()); } if (node["username"] != null) { this._Username = node["username"].Value <string>(); } if (node["password"] != null) { this._Password = node["password"].Value <string>(); } if (node["baseUrl"] != null) { this._BaseUrl = node["baseUrl"].Value <string>(); } if (node["spokenLanguage"] != null) { this._SpokenLanguage = (Language)StringEnum.Parse(typeof(Language), node["spokenLanguage"].Value <string>()); } if (node["replaceMediaContent"] != null) { this._ReplaceMediaContent = ParseBool(node["replaceMediaContent"].Value <string>()); } if (node["additionalParameters"] != null) { this._AdditionalParameters = node["additionalParameters"].Value <string>(); } }