Ejemplo n.º 1
0
        public DelegateSubscription(Delegate handler, SubscriptionOptions options)
        {
            Check.NotNull(handler, nameof(handler));
            Check.NotNull(options, nameof(options));

            _method = new SubscribedMethod(_ => handler.Target, handler.Method, options);
        }
Ejemplo n.º 2
0
        public DelegateSubscription(Delegate handler, SubscriptionOptions options)
        {
            if (handler == null)
            {
                throw new ArgumentNullException(nameof(handler));
            }

            _method = new SubscribedMethod(handler.Target, new SubscribedMethodInfo(handler.Method, options?.Exclusive, options?.Parallel, options?.MaxDegreeOfParallelism));
        }