Exemplo n.º 1
0
 public LiveEntryRecordingOptions(JToken node) : base(node)
 {
     if (node["shouldCopyEntitlement"] != null)
     {
         this._ShouldCopyEntitlement = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["shouldCopyEntitlement"].Value <string>());
     }
     if (node["shouldCopyScheduling"] != null)
     {
         this._ShouldCopyScheduling = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["shouldCopyScheduling"].Value <string>());
     }
     if (node["shouldCopyThumbnail"] != null)
     {
         this._ShouldCopyThumbnail = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["shouldCopyThumbnail"].Value <string>());
     }
     if (node["shouldMakeHidden"] != null)
     {
         this._ShouldMakeHidden = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["shouldMakeHidden"].Value <string>());
     }
     if (node["shouldAutoArchive"] != null)
     {
         this._ShouldAutoArchive = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["shouldAutoArchive"].Value <string>());
     }
     if (node["nonDeletedCuePointsTags"] != null)
     {
         this._NonDeletedCuePointsTags = node["nonDeletedCuePointsTags"].Value <string>();
     }
     if (node["archiveVodSuffixTimezone"] != null)
     {
         this._ArchiveVodSuffixTimezone = node["archiveVodSuffixTimezone"].Value <string>();
     }
 }
        public CaptionParams(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "language":
                    this._Language = (Language)StringEnum.Parse(typeof(Language), propertyNode.InnerText);
                    continue;

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

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

                case "format":
                    this._Format = (CaptionType)StringEnum.Parse(typeof(CaptionType), propertyNode.InnerText);
                    continue;

                case "sourceParamsId":
                    this._SourceParamsId = ParseInt(propertyNode.InnerText);
                    continue;
                }
            }
        }
 public QuestionCuePoint(JToken node) : base(node)
 {
     if (node["optionalAnswers"] != null)
     {
         this._OptionalAnswers = new List <OptionalAnswer>();
         foreach (var arrayNode in node["optionalAnswers"].Children())
         {
             this._OptionalAnswers.Add(ObjectFactory.Create <OptionalAnswer>(arrayNode));
         }
     }
     if (node["hint"] != null)
     {
         this._Hint = node["hint"].Value <string>();
     }
     if (node["question"] != null)
     {
         this._Question = node["question"].Value <string>();
     }
     if (node["explanation"] != null)
     {
         this._Explanation = node["explanation"].Value <string>();
     }
     if (node["questionType"] != null)
     {
         this._QuestionType = (QuestionType)ParseEnum(typeof(QuestionType), node["questionType"].Value <string>());
     }
     if (node["presentationOrder"] != null)
     {
         this._PresentationOrder = ParseInt(node["presentationOrder"].Value <string>());
     }
     if (node["excludeFromScore"] != null)
     {
         this._ExcludeFromScore = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["excludeFromScore"].Value <string>());
     }
 }
        public MediaEntry(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "mediaType":
                    this._MediaType = (MediaType)ParseEnum(typeof(MediaType), propertyNode.InnerText);
                    continue;

                case "conversionQuality":
                    this._ConversionQuality = propertyNode.InnerText;
                    continue;

                case "sourceType":
                    this._SourceType = (SourceType)StringEnum.Parse(typeof(SourceType), propertyNode.InnerText);
                    continue;

                case "searchProviderType":
                    this._SearchProviderType = (SearchProviderType)ParseEnum(typeof(SearchProviderType), propertyNode.InnerText);
                    continue;

                case "searchProviderId":
                    this._SearchProviderId = propertyNode.InnerText;
                    continue;

                case "creditUserName":
                    this._CreditUserName = propertyNode.InnerText;
                    continue;

                case "creditUrl":
                    this._CreditUrl = propertyNode.InnerText;
                    continue;

                case "mediaDate":
                    this._MediaDate = ParseInt(propertyNode.InnerText);
                    continue;

                case "dataUrl":
                    this._DataUrl = propertyNode.InnerText;
                    continue;

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

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

                case "streams":
                    this._Streams = new List <StreamContainer>();
                    foreach (XmlElement arrayNode in propertyNode.ChildNodes)
                    {
                        this._Streams.Add(ObjectFactory.Create <StreamContainer>(arrayNode));
                    }
                    continue;
                }
            }
        }
        public AssetParamsBaseFilter(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "idEqual":
                    this._IdEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "idIn":
                    this._IdIn = propertyNode.InnerText;
                    continue;

                case "systemNameEqual":
                    this._SystemNameEqual = propertyNode.InnerText;
                    continue;

                case "systemNameIn":
                    this._SystemNameIn = propertyNode.InnerText;
                    continue;

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

                case "tagsEqual":
                    this._TagsEqual = propertyNode.InnerText;
                    continue;
                }
            }
        }
Exemplo n.º 6
0
 public BaseEntryFilter(JToken node) : base(node)
 {
     if (node["freeText"] != null)
     {
         this._FreeText = node["freeText"].Value <string>();
     }
     if (node["excludedFreeTextGroups"] != null)
     {
         this._ExcludedFreeTextGroups = node["excludedFreeTextGroups"].Value <string>();
     }
     if (node["descriptionLike"] != null)
     {
         this._DescriptionLike = node["descriptionLike"].Value <string>();
     }
     if (node["isRoot"] != null)
     {
         this._IsRoot = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["isRoot"].Value <string>());
     }
     if (node["categoriesFullNameIn"] != null)
     {
         this._CategoriesFullNameIn = node["categoriesFullNameIn"].Value <string>();
     }
     if (node["categoryAncestorIdIn"] != null)
     {
         this._CategoryAncestorIdIn = node["categoryAncestorIdIn"].Value <string>();
     }
     if (node["redirectFromEntryId"] != null)
     {
         this._RedirectFromEntryId = node["redirectFromEntryId"].Value <string>();
     }
     if (node["orderBy"] != null)
     {
         this._OrderBy = (BaseEntryOrderBy)StringEnum.Parse(typeof(BaseEntryOrderBy), node["orderBy"].Value <string>());
     }
 }
Exemplo n.º 7
0
 public EntryCaptionAdvancedFilter(JToken node) : base(node)
 {
     if (node["hasCaption"] != null)
     {
         this._HasCaption = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["hasCaption"].Value <string>());
     }
 }
        public FlavorAsset(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "flavorParamsId":
                    this._FlavorParamsId = ParseInt(propertyNode.InnerText);
                    continue;

                case "width":
                    this._Width = ParseInt(propertyNode.InnerText);
                    continue;

                case "height":
                    this._Height = ParseInt(propertyNode.InnerText);
                    continue;

                case "bitrate":
                    this._Bitrate = ParseInt(propertyNode.InnerText);
                    continue;

                case "frameRate":
                    this._FrameRate = ParseFloat(propertyNode.InnerText);
                    continue;

                case "isOriginal":
                    this._IsOriginal = ParseBool(propertyNode.InnerText);
                    continue;

                case "isWeb":
                    this._IsWeb = ParseBool(propertyNode.InnerText);
                    continue;

                case "containerFormat":
                    this._ContainerFormat = propertyNode.InnerText;
                    continue;

                case "videoCodecId":
                    this._VideoCodecId = propertyNode.InnerText;
                    continue;

                case "status":
                    this._Status = (FlavorAssetStatus)ParseEnum(typeof(FlavorAssetStatus), propertyNode.InnerText);
                    continue;

                case "language":
                    this._Language = (Language)StringEnum.Parse(typeof(Language), propertyNode.InnerText);
                    continue;

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

                case "isDefault":
                    this._IsDefault = (NullableBoolean)ParseEnum(typeof(NullableBoolean), propertyNode.InnerText);
                    continue;
                }
            }
        }
Exemplo n.º 9
0
        public UserEntryFilter(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "userIdEqualCurrent":
                    this._UserIdEqualCurrent = (NullableBoolean)ParseEnum(typeof(NullableBoolean), propertyNode.InnerText);
                    continue;

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

                case "privacyContextEqual":
                    this._PrivacyContextEqual = propertyNode.InnerText;
                    continue;

                case "privacyContextIn":
                    this._PrivacyContextIn = propertyNode.InnerText;
                    continue;

                case "orderBy":
                    this._OrderBy = (UserEntryOrderBy)StringEnum.Parse(typeof(UserEntryOrderBy), propertyNode.InnerText);
                    continue;
                }
            }
        }
Exemplo n.º 10
0
        public BaseEntryFilter(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "freeText":
                    this._FreeText = propertyNode.InnerText;
                    continue;

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

                case "categoriesFullNameIn":
                    this._CategoriesFullNameIn = propertyNode.InnerText;
                    continue;

                case "categoryAncestorIdIn":
                    this._CategoryAncestorIdIn = propertyNode.InnerText;
                    continue;

                case "redirectFromEntryId":
                    this._RedirectFromEntryId = propertyNode.InnerText;
                    continue;

                case "orderBy":
                    this._OrderBy = (BaseEntryOrderBy)StringEnum.Parse(typeof(BaseEntryOrderBy), propertyNode.InnerText);
                    continue;
                }
            }
        }
 public AssetParamsBaseFilter(JToken node) : base(node)
 {
     if (node["idEqual"] != null)
     {
         this._IdEqual = ParseInt(node["idEqual"].Value <string>());
     }
     if (node["idIn"] != null)
     {
         this._IdIn = node["idIn"].Value <string>();
     }
     if (node["systemNameEqual"] != null)
     {
         this._SystemNameEqual = node["systemNameEqual"].Value <string>();
     }
     if (node["systemNameIn"] != null)
     {
         this._SystemNameIn = node["systemNameIn"].Value <string>();
     }
     if (node["isSystemDefaultEqual"] != null)
     {
         this._IsSystemDefaultEqual = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["isSystemDefaultEqual"].Value <string>());
     }
     if (node["tagsEqual"] != null)
     {
         this._TagsEqual = node["tagsEqual"].Value <string>();
     }
 }
Exemplo n.º 12
0
 public QuizAdvancedFilter(JToken node) : base(node)
 {
     if (node["isQuiz"] != null)
     {
         this._IsQuiz = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["isQuiz"].Value <string>());
     }
 }
        public LiveReportInputFilter(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "entryIds":
                    this._EntryIds = propertyNode.InnerText;
                    continue;

                case "fromTime":
                    this._FromTime = ParseInt(propertyNode.InnerText);
                    continue;

                case "toTime":
                    this._ToTime = ParseInt(propertyNode.InnerText);
                    continue;

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

                case "orderBy":
                    this._OrderBy = (LiveReportOrderBy)StringEnum.Parse(typeof(LiveReportOrderBy), propertyNode.InnerText);
                    continue;
                }
            }
        }
Exemplo n.º 14
0
 public UserEntryFilter(JToken node) : base(node)
 {
     if (node["userIdEqualCurrent"] != null)
     {
         this._UserIdEqualCurrent = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["userIdEqualCurrent"].Value <string>());
     }
     if (node["isAnonymous"] != null)
     {
         this._IsAnonymous = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["isAnonymous"].Value <string>());
     }
     if (node["privacyContextEqual"] != null)
     {
         this._PrivacyContextEqual = node["privacyContextEqual"].Value <string>();
     }
     if (node["privacyContextIn"] != null)
     {
         this._PrivacyContextIn = node["privacyContextIn"].Value <string>();
     }
     if (node["partnerId"] != null)
     {
         this._PartnerId = ParseInt(node["partnerId"].Value <string>());
     }
     if (node["orderBy"] != null)
     {
         this._OrderBy = (UserEntryOrderBy)StringEnum.Parse(typeof(UserEntryOrderBy), node["orderBy"].Value <string>());
     }
 }
Exemplo n.º 15
0
 public MediaEntry(JToken node) : base(node)
 {
     if (node["mediaType"] != null)
     {
         this._MediaType = (MediaType)ParseEnum(typeof(MediaType), node["mediaType"].Value <string>());
     }
     if (node["conversionQuality"] != null)
     {
         this._ConversionQuality = node["conversionQuality"].Value <string>();
     }
     if (node["sourceType"] != null)
     {
         this._SourceType = (SourceType)StringEnum.Parse(typeof(SourceType), node["sourceType"].Value <string>());
     }
     if (node["sourceVersion"] != null)
     {
         this._SourceVersion = node["sourceVersion"].Value <string>();
     }
     if (node["searchProviderType"] != null)
     {
         this._SearchProviderType = (SearchProviderType)ParseEnum(typeof(SearchProviderType), node["searchProviderType"].Value <string>());
     }
     if (node["searchProviderId"] != null)
     {
         this._SearchProviderId = node["searchProviderId"].Value <string>();
     }
     if (node["creditUserName"] != null)
     {
         this._CreditUserName = node["creditUserName"].Value <string>();
     }
     if (node["creditUrl"] != null)
     {
         this._CreditUrl = node["creditUrl"].Value <string>();
     }
     if (node["mediaDate"] != null)
     {
         this._MediaDate = ParseInt(node["mediaDate"].Value <string>());
     }
     if (node["dataUrl"] != null)
     {
         this._DataUrl = node["dataUrl"].Value <string>();
     }
     if (node["flavorParamsIds"] != null)
     {
         this._FlavorParamsIds = node["flavorParamsIds"].Value <string>();
     }
     if (node["isTrimDisabled"] != null)
     {
         this._IsTrimDisabled = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["isTrimDisabled"].Value <string>());
     }
     if (node["streams"] != null)
     {
         this._Streams = new List <StreamContainer>();
         foreach (var arrayNode in node["streams"].Children())
         {
             this._Streams.Add(ObjectFactory.Create <StreamContainer>(arrayNode));
         }
     }
 }
 public AssetParams(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["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["isSystemDefault"] != null)
     {
         this._IsSystemDefault = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["isSystemDefault"].Value <string>());
     }
     if (node["tags"] != null)
     {
         this._Tags = node["tags"].Value <string>();
     }
     if (node["requiredPermissions"] != null)
     {
         this._RequiredPermissions = new List <String>();
         foreach (var arrayNode in node["requiredPermissions"].Children())
         {
             this._RequiredPermissions.Add(ObjectFactory.Create <String>(arrayNode));
         }
     }
     if (node["sourceRemoteStorageProfileId"] != null)
     {
         this._SourceRemoteStorageProfileId = ParseInt(node["sourceRemoteStorageProfileId"].Value <string>());
     }
     if (node["remoteStorageProfileIds"] != null)
     {
         this._RemoteStorageProfileIds = ParseInt(node["remoteStorageProfileIds"].Value <string>());
     }
     if (node["mediaParserType"] != null)
     {
         this._MediaParserType = (MediaParserType)StringEnum.Parse(typeof(MediaParserType), node["mediaParserType"].Value <string>());
     }
     if (node["sourceAssetParamsIds"] != null)
     {
         this._SourceAssetParamsIds = node["sourceAssetParamsIds"].Value <string>();
     }
 }
Exemplo n.º 17
0
 public static bool ToBoolean(NullableBoolean nb, bool defaultValue)
 {
     if (nb == null)
     {
         return(defaultValue);
     }
     return(nb.Value);
 }
Exemplo n.º 18
0
        protected override bool ProcessDialogKey(Keys keyData)
        {
            Keys key = (keyData & Keys.KeyCode);

            if (key == Keys.Return)
            {
                if (_realtimeChange == false)
                {
                    CommitChanges(true);
                }
                else
                {
                    // Reset the initial value to the new one
                    if (IsBooleanValue)
                    {
                        _initialBooleanValue = (NullableBoolean)_booleanValue.Clone();
                    }
                    else if (IsEnumValue)
                    {
                        _initialEnumValue = _enumValue;
                    }
                    else
                    {
                        _initialCollectionValue = (ArrayList)_collectionValue.Clone();
                    }
                }
            }
            else if (keyData == Keys.Escape)
            {
                // Restore the old value
                if (IsBooleanValue)
                {
                    _booleanValue = (NullableBoolean)_initialBooleanValue.Clone();
                }
                else if (IsEnumValue)
                {
                    _enumValue = _initialEnumValue;
                }
                else
                {
                    _collectionValue = (ArrayList)_initialCollectionValue.Clone();
                }

                _multipleValues = _initialMultipleValues;

                CommitChanges(true);
            }

            if (Focused)
            {
                return(base.ProcessDialogKey(keyData));
            }
            else
            {
                return(true);
            }
        }
Exemplo n.º 19
0
            public object Clone()
            {
                NullableBoolean nb = new NullableBoolean();
                nb._isNull = this.IsNull;
                if (!nb._isNull)
                    nb._value = this.Value;

                return nb;
            }
Exemplo n.º 20
0
        public Rule(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "description":
                    this._Description = propertyNode.InnerText;
                    continue;

                case "ruleData":
                    this._RuleData = propertyNode.InnerText;
                    continue;

                case "message":
                    this._Message = propertyNode.InnerText;
                    continue;

                case "code":
                    this._Code = propertyNode.InnerText;
                    continue;

                case "actions":
                    this._Actions = new List <RuleAction>();
                    foreach (XmlElement arrayNode in propertyNode.ChildNodes)
                    {
                        this._Actions.Add(ObjectFactory.Create <RuleAction>(arrayNode));
                    }
                    continue;

                case "conditions":
                    this._Conditions = new List <Condition>();
                    foreach (XmlElement arrayNode in propertyNode.ChildNodes)
                    {
                        this._Conditions.Add(ObjectFactory.Create <Condition>(arrayNode));
                    }
                    continue;

                case "contexts":
                    this._Contexts = new List <ContextTypeHolder>();
                    foreach (XmlElement arrayNode in propertyNode.ChildNodes)
                    {
                        this._Contexts.Add(ObjectFactory.Create <ContextTypeHolder>(arrayNode));
                    }
                    continue;

                case "stopProcessing":
                    this._StopProcessing = ParseBool(propertyNode.InnerText);
                    continue;

                case "forceAdminValidation":
                    this._ForceAdminValidation = (NullableBoolean)ParseEnum(typeof(NullableBoolean), propertyNode.InnerText);
                    continue;
                }
            }
        }
        public GenericDistributionProviderBaseFilter(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "idEqual":
                    this._IdEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "idIn":
                    this._IdIn = propertyNode.InnerText;
                    continue;

                case "createdAtGreaterThanOrEqual":
                    this._CreatedAtGreaterThanOrEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "createdAtLessThanOrEqual":
                    this._CreatedAtLessThanOrEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "updatedAtGreaterThanOrEqual":
                    this._UpdatedAtGreaterThanOrEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "updatedAtLessThanOrEqual":
                    this._UpdatedAtLessThanOrEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "partnerIdEqual":
                    this._PartnerIdEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "partnerIdIn":
                    this._PartnerIdIn = propertyNode.InnerText;
                    continue;

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

                case "isDefaultIn":
                    this._IsDefaultIn = propertyNode.InnerText;
                    continue;

                case "statusEqual":
                    this._StatusEqual = (GenericDistributionProviderStatus)ParseEnum(typeof(GenericDistributionProviderStatus), propertyNode.InnerText);
                    continue;

                case "statusIn":
                    this._StatusIn = propertyNode.InnerText;
                    continue;
                }
            }
        }
        public ConversionProfileAssetParams(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "conversionProfileId":
                    this._ConversionProfileId = ParseInt(propertyNode.InnerText);
                    continue;

                case "assetParamsId":
                    this._AssetParamsId = ParseInt(propertyNode.InnerText);
                    continue;

                case "readyBehavior":
                    this._ReadyBehavior = (FlavorReadyBehaviorType)ParseEnum(typeof(FlavorReadyBehaviorType), propertyNode.InnerText);
                    continue;

                case "origin":
                    this._Origin = (AssetParamsOrigin)ParseEnum(typeof(AssetParamsOrigin), propertyNode.InnerText);
                    continue;

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

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

                case "deletePolicy":
                    this._DeletePolicy = (AssetParamsDeletePolicy)ParseEnum(typeof(AssetParamsDeletePolicy), propertyNode.InnerText);
                    continue;

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

                case "contentAwareness":
                    this._ContentAwareness = ParseFloat(propertyNode.InnerText);
                    continue;

                case "chunkedEncodeMode":
                    this._ChunkedEncodeMode = ParseInt(propertyNode.InnerText);
                    continue;

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

                case "tags":
                    this._Tags = propertyNode.InnerText;
                    continue;
                }
            }
        }
 public FlavorAsset(JToken node) : base(node)
 {
     if (node["flavorParamsId"] != null)
     {
         this._FlavorParamsId = ParseInt(node["flavorParamsId"].Value <string>());
     }
     if (node["width"] != null)
     {
         this._Width = ParseInt(node["width"].Value <string>());
     }
     if (node["height"] != null)
     {
         this._Height = ParseInt(node["height"].Value <string>());
     }
     if (node["bitrate"] != null)
     {
         this._Bitrate = ParseInt(node["bitrate"].Value <string>());
     }
     if (node["frameRate"] != null)
     {
         this._FrameRate = ParseFloat(node["frameRate"].Value <string>());
     }
     if (node["isOriginal"] != null)
     {
         this._IsOriginal = ParseBool(node["isOriginal"].Value <string>());
     }
     if (node["isWeb"] != null)
     {
         this._IsWeb = ParseBool(node["isWeb"].Value <string>());
     }
     if (node["containerFormat"] != null)
     {
         this._ContainerFormat = node["containerFormat"].Value <string>();
     }
     if (node["videoCodecId"] != null)
     {
         this._VideoCodecId = node["videoCodecId"].Value <string>();
     }
     if (node["status"] != null)
     {
         this._Status = (FlavorAssetStatus)ParseEnum(typeof(FlavorAssetStatus), node["status"].Value <string>());
     }
     if (node["language"] != null)
     {
         this._Language = (Language)StringEnum.Parse(typeof(Language), node["language"].Value <string>());
     }
     if (node["label"] != null)
     {
         this._Label = node["label"].Value <string>();
     }
     if (node["isDefault"] != null)
     {
         this._IsDefault = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["isDefault"].Value <string>());
     }
 }
Exemplo n.º 24
0
 public ConversionProfileAssetParams(JToken node) : base(node)
 {
     if (node["conversionProfileId"] != null)
     {
         this._ConversionProfileId = ParseInt(node["conversionProfileId"].Value <string>());
     }
     if (node["assetParamsId"] != null)
     {
         this._AssetParamsId = ParseInt(node["assetParamsId"].Value <string>());
     }
     if (node["readyBehavior"] != null)
     {
         this._ReadyBehavior = (FlavorReadyBehaviorType)ParseEnum(typeof(FlavorReadyBehaviorType), node["readyBehavior"].Value <string>());
     }
     if (node["origin"] != null)
     {
         this._Origin = (AssetParamsOrigin)ParseEnum(typeof(AssetParamsOrigin), node["origin"].Value <string>());
     }
     if (node["systemName"] != null)
     {
         this._SystemName = node["systemName"].Value <string>();
     }
     if (node["forceNoneComplied"] != null)
     {
         this._ForceNoneComplied = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["forceNoneComplied"].Value <string>());
     }
     if (node["deletePolicy"] != null)
     {
         this._DeletePolicy = (AssetParamsDeletePolicy)ParseEnum(typeof(AssetParamsDeletePolicy), node["deletePolicy"].Value <string>());
     }
     if (node["isEncrypted"] != null)
     {
         this._IsEncrypted = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["isEncrypted"].Value <string>());
     }
     if (node["contentAwareness"] != null)
     {
         this._ContentAwareness = ParseFloat(node["contentAwareness"].Value <string>());
     }
     if (node["chunkedEncodeMode"] != null)
     {
         this._ChunkedEncodeMode = ParseInt(node["chunkedEncodeMode"].Value <string>());
     }
     if (node["twoPass"] != null)
     {
         this._TwoPass = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["twoPass"].Value <string>());
     }
     if (node["tags"] != null)
     {
         this._Tags = node["tags"].Value <string>();
     }
     if (node["overloadParams"] != null)
     {
         this._OverloadParams = node["overloadParams"].Value <string>();
     }
 }
 public DropFolderFilter(JToken node) : base(node)
 {
     if (node["currentDc"] != null)
     {
         this._CurrentDc = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["currentDc"].Value <string>());
     }
     if (node["orderBy"] != null)
     {
         this._OrderBy = (DropFolderOrderBy)StringEnum.Parse(typeof(DropFolderOrderBy), node["orderBy"].Value <string>());
     }
 }
Exemplo n.º 26
0
 public LiveChannel(JToken node) : base(node)
 {
     if (node["playlistId"] != null)
     {
         this._PlaylistId = node["playlistId"].Value <string>();
     }
     if (node["repeat"] != null)
     {
         this._Repeat = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["repeat"].Value <string>());
     }
 }
 public AccessControlServeRemoteEdgeServerAction(JToken node) : base(node)
 {
     if (node["edgeServerIds"] != null)
     {
         this._EdgeServerIds = node["edgeServerIds"].Value <string>();
     }
     if (node["seamlessFallbackEnabled"] != null)
     {
         this._SeamlessFallbackEnabled = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["seamlessFallbackEnabled"].Value <string>());
     }
 }
 public DeliveryProfileFilter(JToken node) : base(node)
 {
     if (node["isLive"] != null)
     {
         this._IsLive = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["isLive"].Value <string>());
     }
     if (node["orderBy"] != null)
     {
         this._OrderBy = (DeliveryProfileOrderBy)StringEnum.Parse(typeof(DeliveryProfileOrderBy), node["orderBy"].Value <string>());
     }
 }
 public EntryContext(JToken node) : base(node)
 {
     if (node["entryId"] != null)
     {
         this._EntryId = node["entryId"].Value <string>();
     }
     if (node["followEntryRedirect"] != null)
     {
         this._FollowEntryRedirect = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["followEntryRedirect"].Value <string>());
     }
 }
Exemplo n.º 30
0
            public object Clone()
            {
                NullableBoolean nb = new NullableBoolean();

                nb._isNull = this.IsNull;
                if (!nb._isNull)
                {
                    nb._value = this.Value;
                }

                return(nb);
            }
 public QuizAdvancedFilter(XmlElement node) : base(node)
 {
     foreach (XmlElement propertyNode in node.ChildNodes)
     {
         switch (propertyNode.Name)
         {
         case "isQuiz":
             this._IsQuiz = (NullableBoolean)ParseEnum(typeof(NullableBoolean), propertyNode.InnerText);
             continue;
         }
     }
 }
Exemplo n.º 32
0
        public virtual PropertyValue.ValueValidationResult CommitChanges(bool final)
        {
            bool changed = false;
            
            // Check to see if the value actually changed
            object currentValue = _ownerPropertyEnum.Property.Value.GetValue();

            if (IsBooleanValue)
            {
                if (_booleanValue.IsNull == false)
                {
                    if (_ownerPropertyEnum.Property.Value.HasMultipleValues || ((bool)currentValue != _booleanValue.Value))
                        changed = true;
                }
            }
            else if (IsEnumValue)
            {
                if (_ownerPropertyEnum.Property.Value.HasMultipleValues)
                {
                    if (!_multipleValues)
                        changed = true;
                }
                else if (_enumValue.Equals(currentValue) == false)
                    changed = true;
            }
            else
            {
                if (_ownerPropertyEnum.Property.Value.HasMultipleValues)
                {
                    if (!_multipleValues)
                        changed = true;
                }
                else
                {
                    changed = false;
                    ArrayList currentValueArray = (currentValue as ArrayList);
                    if ((currentValueArray == null) && (_collectionValue == null))
                        changed = false;
                    else
                    {
                        if ((currentValueArray == null) || (_collectionValue == null))
                            changed = true;
                        else if (currentValueArray.Count != _collectionValue.Count)
                            changed = true;
                        else
                        {
                            for (int i = 0; i < _collectionValue.Count; i++)
                            {
                                if (currentValueArray[i].Equals(_collectionValue[i]) == false)
                                    changed = true;
                            }
                        }
                    }
                }
            }

            if (changed)
            {
                _ownerPropertyEnum.Property.Value.PreviousValue = currentValue;

                if (IsBooleanValue)
                {
                    _ownerPropertyEnum.Property.Value.SetValueFromInPlaceCtrl(_booleanValue.Value);
                    if (final)
                        _initialBooleanValue = (NullableBoolean)_booleanValue.Clone(); 
                }
                else if (IsEnumValue)
                {
                    _ownerPropertyEnum.Property.Value.SetValueFromInPlaceCtrl(_enumValue.ToString());
                    if (final)
                        _initialEnumValue = _enumValue;
                }
                else
                {
                    _ownerPropertyEnum.Property.Value.SetValueFromInPlaceCtrl(_collectionValue.Clone());
                    if (final)
                        _initialCollectionValue = (ArrayList)_collectionValue.Clone();
                }

                if (final)
                    _initialMultipleValues = false;

                _ownerPropertyEnum.Property.ParentGrid.NotifyPropertyChanged(new PropertyChangedEventArgs(_ownerPropertyEnum));

                Parent.Invalidate();
            }

            Invalidate();

            return (changed ? PropertyValue.ValueValidationResult.Validated : PropertyValue.ValueValidationResult.PreviousValueRestored);
        }
Exemplo n.º 33
0
		protected override bool ProcessDialogKey(Keys keyData)
        {
            Keys key = (keyData & Keys.KeyCode);

            if (key == Keys.Return)
            {
                if (_realtimeChange == false)
                    CommitChanges(true);
                else
                {
                    // Reset the initial value to the new one
                    if (IsBooleanValue)
                        _initialBooleanValue = (NullableBoolean)_booleanValue.Clone();
                    else if (IsEnumValue)
                        _initialEnumValue = _enumValue;
                    else
                        _initialCollectionValue = (ArrayList)_collectionValue.Clone();
                }
            }
            else if (keyData == Keys.Escape)
            {
                // Restore the old value
                if (IsBooleanValue)
                    _booleanValue = (NullableBoolean)_initialBooleanValue.Clone();
                else if (IsEnumValue)
                    _enumValue = _initialEnumValue;
                else
                    _collectionValue = (ArrayList)_initialCollectionValue.Clone();

                _multipleValues = _initialMultipleValues;

                CommitChanges(true);
            }

            if (Focused)
                return base.ProcessDialogKey(keyData);
            else
                return true;
        }