예제 #1
0
 public OutboundMatchItem(Item innerItem)
     : base(innerItem)
 {
     _BaseMatchItem          = new BaseMatchItem(innerItem);
     _MatchScopeItem         = new MatchScopeTypeItem(innerItem);
     _OutboundMatchScopeItem = new OutboundMatchScopeItem(innerItem);
 }
예제 #2
0
 public OutboundMatchItem(Item innerItem)
     : base(innerItem)
 {
     _BaseMatchItem = new BaseMatchItem(innerItem);
     _MatchScopeItem = new MatchScopeTypeItem(innerItem);
     _OutboundMatchScopeItem = new OutboundMatchScopeItem(innerItem);
 }
예제 #3
0
 public BaseRuleItem(Item innerItem)
     : base(innerItem)
 {
     _BaseUrlRewriteItem = new BaseUrlRewriteItem(innerItem);
     _ConditionLogicalGroupingItem = new ConditionLogicalGroupingItem(innerItem);
     _BaseMatchItem = new BaseMatchItem(innerItem);
     _BaseEnabledItem = new BaseEnabledItem(innerItem);
 }
예제 #4
0
        private static void SetBaseMatch(BaseMatchItem baseMatchItem, IBaseMatch baseMatch)
        {
            baseMatch.IgnoreCase = baseMatchItem.MatchIgnoreCaseItem.IgnoreCase.Checked;
            baseMatch.Pattern = baseMatchItem.MatchPatternItem.Pattern.Value;

            var matchTypeItem = baseMatchItem.MatchMatchTypeItem.MatchType.TargetItem;
            MatchType? matchType = null;
            if (matchTypeItem != null)
            {
                var requestUrlItemId = matchTypeItem.ID.ToString();
                switch (requestUrlItemId)
                {
                    case Constants.MatchType_MatchesThePattern_ItemId:
                        matchType = MatchType.MatchesThePattern;
                        break;
                    case Constants.MatchType_DoesNotMatchThePattern_ItemId:
                        matchType = MatchType.DoesNotMatchThePattern;
                        break;
                    default:
                        break;
                }
            }
            baseMatch.MatchType = matchType;

            var usingItem = baseMatchItem.MatchUsingItem.Using.TargetItem;
            Using? usingType = null;
            if (usingItem != null)
            {
                var usingItemId = usingItem.ID.ToString();
                switch (usingItemId)
                {
                    case Constants.UsingType_RegularExpressions_ItemId:
                        usingType = Using.RegularExpressions;
                        break;
                    case Constants.UsingType_Wildcards_ItemId:
                        usingType = Using.Wildcards;
                        break;
                    case Constants.UsingType_ExactMatch_ItemId:
                        usingType = Using.ExactMatch;
                        break;
                    default:
                        break;
                }
            }
            baseMatch.Using = usingType;
        }