Пример #1
0
        /// <summary>
        /// Bind rule
        /// </summary>
        /// <param name="rule"></param>
        /// <returns></returns>
        public IContextRule BindRule(IRule rule)
        {
            ContextRule contextRule = new ContextRule(rule);

            contextRule.Subscribe(this);

            _rules.Add(contextRule);
            return(contextRule);
        }
Пример #2
0
        /// <summary>
        ///     Bind rule
        /// </summary>
        /// <param name="rule"></param>
        /// <returns></returns>
        public IContextRule BindRule(IRule rule)
        {
            ContextRule contextRule = new ContextRule(rule);
            contextRule.Subscribe(this);

            this._rules.Add(contextRule);
            return contextRule;
        }