コード例 #1
0
        public IReadOnlyList<LightNodeFilterAttribute> GetFilters(ILightNodeOptions options, OperationContext context, IReadOnlyList<LightNodeFilterAttribute> originalFilters)
        {
            if (MessageBroker == null || Timer == null) return originalFilters;
            MessageBroker.Publish(context);

            if (originalFilters.Count == 0) return originalFilters;

            var array = new LightNodeFilterAttribute[originalFilters.Count];
            for (int i = 0; i < originalFilters.Count; i++)
            {
                array[i] = new FilterWrapper(MessageBroker, Timer, originalFilters[i]);
            }

            return array;
        }
コード例 #2
0
        public IReadOnlyList <LightNodeFilterAttribute> GetFilters(ILightNodeOptions options, OperationContext context, IReadOnlyList <LightNodeFilterAttribute> originalFilters)
        {
            if (MessageBroker == null || Timer == null)
            {
                return(originalFilters);
            }
            MessageBroker.Publish(context);

            if (originalFilters.Count == 0)
            {
                return(originalFilters);
            }

            var array = new LightNodeFilterAttribute[originalFilters.Count];

            for (int i = 0; i < originalFilters.Count; i++)
            {
                array[i] = new FilterWrapper(MessageBroker, Timer, originalFilters[i]);
            }

            return(array);
        }
コード例 #3
0
 public FilterWrapper(IMessageBroker messageBroker, IExecutionTimer timer, LightNodeFilterAttribute originalFilter)
 {
     this.originalFilter = originalFilter;
     this.messageBroker  = messageBroker;
     this.timer          = timer;
 }
コード例 #4
0
 public FilterWrapper(IMessageBroker messageBroker, IExecutionTimer timer, LightNodeFilterAttribute originalFilter)
 {
     this.originalFilter = originalFilter;
     this.messageBroker = messageBroker;
     this.timer = timer;
 }