private HTTPStreamModifierCondition LoadCondition(NameValueItem nviConditionItem, IEnvironment eEnviornment)
        {
            string strKey = nviConditionItem["conditionKey"][0].Value;
            ISubPlugInDefinition <HTTPStreamModifierCondition> conditionDefinition = (ISubPlugInDefinition <HTTPStreamModifierCondition>)eEnviornment.GetPlugInByKey(strKey);

            if (conditionDefinition != null)
            {
                HTTPStreamModifierCondition htCondition = conditionDefinition.Create(nviConditionItem);
                foreach (NameValueItem nviChild in nviConditionItem["condition"])
                {
                    htCondition.AddChildRule(LoadCondition(nviChild, eEnviornment));
                }
                return(htCondition);
            }

            return(null);
        }
Ejemplo n.º 2
0
        private TrafficSplitterRule LoadRule(NameValueItem nviItem, IEnvironment eEnviornment)
        {
            string strKey = nviItem["ruleKey"][0].Value;
            ISubPlugInDefinition <TrafficSplitterRule> ruleDefinition = (ISubPlugInDefinition <TrafficSplitterRule>)eEnviornment.GetPlugInByKey(strKey);

            if (ruleDefinition != null)
            {
                TrafficSplitterRule tsrRule = ruleDefinition.Create(nviItem);
                foreach (NameValueItem nviChild in nviItem["rule"])
                {
                    tsrRule.AddChildRule(LoadRule(nviChild, eEnviornment));
                }
                return(tsrRule);
            }

            return(null);
        }