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;
 }
 public FilterWrapper(IMessageBroker messageBroker, IExecutionTimer timer, LightNodeFilterAttribute originalFilter)
 {
     this.originalFilter = originalFilter;
     this.messageBroker = messageBroker;
     this.timer = timer;
 }