public TranscriptAsset(JToken node) : base(node) { if (node["accuracy"] != null) { this._Accuracy = ParseFloat(node["accuracy"].Value <string>()); } if (node["humanVerified"] != null) { this._HumanVerified = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["humanVerified"].Value <string>()); } if (node["language"] != null) { this._Language = (Language)StringEnum.Parse(typeof(Language), node["language"].Value <string>()); } if (node["providerType"] != null) { this._ProviderType = (TranscriptProviderType)StringEnum.Parse(typeof(TranscriptProviderType), node["providerType"].Value <string>()); } }
public TranscriptAsset(XmlElement node) : base(node) { foreach (XmlElement propertyNode in node.ChildNodes) { switch (propertyNode.Name) { case "accuracy": this._Accuracy = ParseFloat(propertyNode.InnerText); continue; case "humanVerified": this._HumanVerified = (NullableBoolean)ParseEnum(typeof(NullableBoolean), propertyNode.InnerText); continue; case "language": this._Language = (Language)StringEnum.Parse(typeof(Language), propertyNode.InnerText); continue; case "providerType": this._ProviderType = (TranscriptProviderType)StringEnum.Parse(typeof(TranscriptProviderType), propertyNode.InnerText); continue; } } }