Пример #1
0
        /// <summary>
        /// Initializes a new empty instance of the <see cref="MethodUrlsSubset"/> class.
        /// </summary>
        /// <param name="_engine">The engine.</param>
        internal BistroMethod(EngineControllerDispatcher _engine)
        {
            bindPointsList = new List<IMethodsBindPointDesc>();
            bindingsList = new List<MethodBinding>();
			pointBindRelation = new Dictionary<IMethodsBindPointDesc, List<MethodBinding>>();
            engine = _engine;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="GenBindingTuple"/> class.
        /// </summary>
        /// <param name="_verbNormalizedUrl">The bind url with verb in form verb/url (i.e. GET/a/b/c/).</param>
        /// <param name="_engine">The methods engine.</param>
        internal MethodBindingTuple(string _verbNormalizedUrl ,EngineControllerDispatcher _engine)
        {
            PositiveBind = new MethodBinding(_verbNormalizedUrl, true, _engine);
            NegativeBind = new MethodBinding(_verbNormalizedUrl, false, _engine);
            Processed = false;

            engine = _engine;
        }
Пример #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MethodUrlsSubset"/> class. 
        /// Copies contents of the old bindings list and adds new to the new list GenBinding.
        /// </summary>
        /// <param name="_engine">The engine.</param>
        /// <param name="oldBindingsList">Old bindings list.</param>
        /// <param name="newBinding">The new binding.</param>
        private BistroMethod(EngineControllerDispatcher _engine, List<MethodBinding> oldBindingsList, MethodBinding newBinding)
        {
            engine = _engine;
            
            bindingsList = new List<MethodBinding>(oldBindingsList);
            bindingsList.Add(newBinding);


        }
        /// <summary>
        /// Initializes a new instance of the <see cref="SubSetsProcessor"/> class.
        /// </summary>
        /// <param name="_engine">The engine.</param>
        public MethodsProcessor(EngineControllerDispatcher _engine)
        {
            engine = _engine;
            allMethods = new List<BistroMethod>();
            allBindings = new List<MethodBindingTuple>();
            // We need to have at least one empty method. Otherwise it will be impossible to create new non-empty methods.
            allMethods.Add(new BistroMethod(_engine));


        }
        /// <summary>
        /// The only constructor, which splits url to the items.
        /// </summary>
        /// <param name="_verbNormalizedUrl">The bind url with verb in form verb/url (i.e. GET/a/b/c/).</param>
        /// <param name="_matchStatus">status - whether target half of the url field must match this bind, or not.</param>
        public MethodBinding(string _verbNormalizedUrl, bool _matchStatus, EngineControllerDispatcher _engine)
        {
            engine = _engine;
            InitialUrl = _verbNormalizedUrl;
            MatchStatus = _matchStatus;

            items = GetSplitItems(InitialUrl, out totalLength, out lengthWithoutEndParams);

        }