示例#1
0
 public ConversionProfile(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["status"] != null)
     {
         this._Status = (ConversionProfileStatus)StringEnum.Parse(typeof(ConversionProfileStatus), node["status"].Value <string>());
     }
     if (node["type"] != null)
     {
         this._Type = (ConversionProfileType)StringEnum.Parse(typeof(ConversionProfileType), node["type"].Value <string>());
     }
     if (node["name"] != null)
     {
         this._Name = node["name"].Value <string>();
     }
     if (node["systemName"] != null)
     {
         this._SystemName = node["systemName"].Value <string>();
     }
     if (node["tags"] != null)
     {
         this._Tags = node["tags"].Value <string>();
     }
     if (node["description"] != null)
     {
         this._Description = node["description"].Value <string>();
     }
     if (node["defaultEntryId"] != null)
     {
         this._DefaultEntryId = node["defaultEntryId"].Value <string>();
     }
     if (node["createdAt"] != null)
     {
         this._CreatedAt = ParseInt(node["createdAt"].Value <string>());
     }
     if (node["flavorParamsIds"] != null)
     {
         this._FlavorParamsIds = node["flavorParamsIds"].Value <string>();
     }
     if (node["isDefault"] != null)
     {
         this._IsDefault = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["isDefault"].Value <string>());
     }
     if (node["isPartnerDefault"] != null)
     {
         this._IsPartnerDefault = ParseBool(node["isPartnerDefault"].Value <string>());
     }
     if (node["cropDimensions"] != null)
     {
         this._CropDimensions = ObjectFactory.Create <CropDimensions>(node["cropDimensions"]);
     }
     if (node["clipStart"] != null)
     {
         this._ClipStart = ParseInt(node["clipStart"].Value <string>());
     }
     if (node["clipDuration"] != null)
     {
         this._ClipDuration = ParseInt(node["clipDuration"].Value <string>());
     }
     if (node["xslTransformation"] != null)
     {
         this._XslTransformation = node["xslTransformation"].Value <string>();
     }
     if (node["storageProfileId"] != null)
     {
         this._StorageProfileId = ParseInt(node["storageProfileId"].Value <string>());
     }
     if (node["mediaParserType"] != null)
     {
         this._MediaParserType = (MediaParserType)StringEnum.Parse(typeof(MediaParserType), node["mediaParserType"].Value <string>());
     }
     if (node["calculateComplexity"] != null)
     {
         this._CalculateComplexity = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["calculateComplexity"].Value <string>());
     }
     if (node["collectionTags"] != null)
     {
         this._CollectionTags = node["collectionTags"].Value <string>();
     }
     if (node["conditionalProfiles"] != null)
     {
         this._ConditionalProfiles = node["conditionalProfiles"].Value <string>();
     }
     if (node["detectGOP"] != null)
     {
         this._DetectGOP = ParseInt(node["detectGOP"].Value <string>());
     }
     if (node["mediaInfoXslTransformation"] != null)
     {
         this._MediaInfoXslTransformation = node["mediaInfoXslTransformation"].Value <string>();
     }
     if (node["defaultReplacementOptions"] != null)
     {
         this._DefaultReplacementOptions = ObjectFactory.Create <EntryReplacementOptions>(node["defaultReplacementOptions"]);
     }
     if (node["defaultAudioLang"] != null)
     {
         this._DefaultAudioLang = (Language)StringEnum.Parse(typeof(Language), node["defaultAudioLang"].Value <string>());
     }
 }
示例#2
0
        public ConversionProfile(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 "status":
                    this._Status = (ConversionProfileStatus)StringEnum.Parse(typeof(ConversionProfileStatus), propertyNode.InnerText);
                    continue;

                case "type":
                    this._Type = (ConversionProfileType)StringEnum.Parse(typeof(ConversionProfileType), propertyNode.InnerText);
                    continue;

                case "name":
                    this._Name = propertyNode.InnerText;
                    continue;

                case "systemName":
                    this._SystemName = propertyNode.InnerText;
                    continue;

                case "tags":
                    this._Tags = propertyNode.InnerText;
                    continue;

                case "description":
                    this._Description = propertyNode.InnerText;
                    continue;

                case "defaultEntryId":
                    this._DefaultEntryId = propertyNode.InnerText;
                    continue;

                case "createdAt":
                    this._CreatedAt = ParseInt(propertyNode.InnerText);
                    continue;

                case "flavorParamsIds":
                    this._FlavorParamsIds = propertyNode.InnerText;
                    continue;

                case "isDefault":
                    this._IsDefault = (NullableBoolean)ParseEnum(typeof(NullableBoolean), propertyNode.InnerText);
                    continue;

                case "isPartnerDefault":
                    this._IsPartnerDefault = ParseBool(propertyNode.InnerText);
                    continue;

                case "cropDimensions":
                    this._CropDimensions = ObjectFactory.Create <CropDimensions>(propertyNode);
                    continue;

                case "clipStart":
                    this._ClipStart = ParseInt(propertyNode.InnerText);
                    continue;

                case "clipDuration":
                    this._ClipDuration = ParseInt(propertyNode.InnerText);
                    continue;

                case "xslTransformation":
                    this._XslTransformation = propertyNode.InnerText;
                    continue;

                case "storageProfileId":
                    this._StorageProfileId = ParseInt(propertyNode.InnerText);
                    continue;

                case "mediaParserType":
                    this._MediaParserType = (MediaParserType)StringEnum.Parse(typeof(MediaParserType), propertyNode.InnerText);
                    continue;

                case "calculateComplexity":
                    this._CalculateComplexity = (NullableBoolean)ParseEnum(typeof(NullableBoolean), propertyNode.InnerText);
                    continue;

                case "collectionTags":
                    this._CollectionTags = propertyNode.InnerText;
                    continue;

                case "conditionalProfiles":
                    this._ConditionalProfiles = propertyNode.InnerText;
                    continue;

                case "detectGOP":
                    this._DetectGOP = ParseInt(propertyNode.InnerText);
                    continue;

                case "mediaInfoXslTransformation":
                    this._MediaInfoXslTransformation = propertyNode.InnerText;
                    continue;

                case "defaultReplacementOptions":
                    this._DefaultReplacementOptions = ObjectFactory.Create <EntryReplacementOptions>(propertyNode);
                    continue;

                case "defaultAudioLang":
                    this._DefaultAudioLang = (Language)StringEnum.Parse(typeof(Language), propertyNode.InnerText);
                    continue;
                }
            }
        }