public YouTubeApiCaptionDistributionInfo(JToken node) : base(node)
 {
     if (node["language"] != null)
     {
         this._Language = node["language"].Value <string>();
     }
     if (node["label"] != null)
     {
         this._Label = node["label"].Value <string>();
     }
     if (node["filePath"] != null)
     {
         this._FilePath = node["filePath"].Value <string>();
     }
     if (node["remoteId"] != null)
     {
         this._RemoteId = node["remoteId"].Value <string>();
     }
     if (node["action"] != null)
     {
         this._Action = (YouTubeApiDistributionCaptionAction)ParseEnum(typeof(YouTubeApiDistributionCaptionAction), node["action"].Value <string>());
     }
     if (node["version"] != null)
     {
         this._Version = node["version"].Value <string>();
     }
     if (node["assetId"] != null)
     {
         this._AssetId = node["assetId"].Value <string>();
     }
 }
Beispiel #2
0
        public YouTubeApiCaptionDistributionInfo(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "language":
                    this._Language = propertyNode.InnerText;
                    continue;

                case "label":
                    this._Label = propertyNode.InnerText;
                    continue;

                case "filePath":
                    this._FilePath = propertyNode.InnerText;
                    continue;

                case "remoteId":
                    this._RemoteId = propertyNode.InnerText;
                    continue;

                case "action":
                    this._Action = (YouTubeApiDistributionCaptionAction)ParseEnum(typeof(YouTubeApiDistributionCaptionAction), propertyNode.InnerText);
                    continue;

                case "version":
                    this._Version = propertyNode.InnerText;
                    continue;

                case "assetId":
                    this._AssetId = propertyNode.InnerText;
                    continue;
                }
            }
        }