public DeliveryProfile(JToken node) : base(node) { if (node["id"] != null) { this._Id = ParseInt(node["id"].Value <string>()); } if (node["partnerId"] != null) { this._PartnerId = ParseInt(node["partnerId"].Value <string>()); } if (node["name"] != null) { this._Name = node["name"].Value <string>(); } if (node["type"] != null) { this._Type = (DeliveryProfileType)StringEnum.Parse(typeof(DeliveryProfileType), node["type"].Value <string>()); } if (node["systemName"] != null) { this._SystemName = node["systemName"].Value <string>(); } if (node["description"] != null) { this._Description = node["description"].Value <string>(); } if (node["createdAt"] != null) { this._CreatedAt = ParseInt(node["createdAt"].Value <string>()); } if (node["updatedAt"] != null) { this._UpdatedAt = ParseInt(node["updatedAt"].Value <string>()); } if (node["streamerType"] != null) { this._StreamerType = (PlaybackProtocol)StringEnum.Parse(typeof(PlaybackProtocol), node["streamerType"].Value <string>()); } if (node["url"] != null) { this._Url = node["url"].Value <string>(); } if (node["hostName"] != null) { this._HostName = node["hostName"].Value <string>(); } if (node["status"] != null) { this._Status = (DeliveryStatus)ParseEnum(typeof(DeliveryStatus), node["status"].Value <string>()); } if (node["recognizer"] != null) { this._Recognizer = ObjectFactory.Create <UrlRecognizer>(node["recognizer"]); } if (node["tokenizer"] != null) { this._Tokenizer = ObjectFactory.Create <UrlTokenizer>(node["tokenizer"]); } if (node["isDefault"] != null) { this._IsDefault = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["isDefault"].Value <string>()); } if (node["parentId"] != null) { this._ParentId = ParseInt(node["parentId"].Value <string>()); } if (node["mediaProtocols"] != null) { this._MediaProtocols = node["mediaProtocols"].Value <string>(); } if (node["priority"] != null) { this._Priority = ParseInt(node["priority"].Value <string>()); } if (node["extraParams"] != null) { this._ExtraParams = node["extraParams"].Value <string>(); } if (node["supplementaryAssetsFilter"] != null) { this._SupplementaryAssetsFilter = ObjectFactory.Create <AssetFilter>(node["supplementaryAssetsFilter"]); } }
public DeliveryProfile(XmlElement node) : base(node) { foreach (XmlElement propertyNode in node.ChildNodes) { switch (propertyNode.Name) { case "id": this._Id = ParseInt(propertyNode.InnerText); continue; case "partnerId": this._PartnerId = ParseInt(propertyNode.InnerText); continue; case "name": this._Name = propertyNode.InnerText; continue; case "type": this._Type = (DeliveryProfileType)StringEnum.Parse(typeof(DeliveryProfileType), propertyNode.InnerText); continue; case "systemName": this._SystemName = propertyNode.InnerText; continue; case "description": this._Description = propertyNode.InnerText; continue; case "createdAt": this._CreatedAt = ParseInt(propertyNode.InnerText); continue; case "updatedAt": this._UpdatedAt = ParseInt(propertyNode.InnerText); continue; case "streamerType": this._StreamerType = (PlaybackProtocol)StringEnum.Parse(typeof(PlaybackProtocol), propertyNode.InnerText); continue; case "url": this._Url = propertyNode.InnerText; continue; case "hostName": this._HostName = propertyNode.InnerText; continue; case "status": this._Status = (DeliveryStatus)ParseEnum(typeof(DeliveryStatus), propertyNode.InnerText); continue; case "recognizer": this._Recognizer = ObjectFactory.Create <UrlRecognizer>(propertyNode); continue; case "tokenizer": this._Tokenizer = ObjectFactory.Create <UrlTokenizer>(propertyNode); continue; case "isDefault": this._IsDefault = (NullableBoolean)ParseEnum(typeof(NullableBoolean), propertyNode.InnerText); continue; case "parentId": this._ParentId = ParseInt(propertyNode.InnerText); continue; case "mediaProtocols": this._MediaProtocols = propertyNode.InnerText; continue; case "priority": this._Priority = ParseInt(propertyNode.InnerText); continue; case "extraParams": this._ExtraParams = propertyNode.InnerText; continue; case "supplementaryAssetsFilter": this._SupplementaryAssetsFilter = ObjectFactory.Create <AssetFilter>(propertyNode); continue; } } }