public DelegateSubscription(Delegate handler, SubscriptionOptions options) { Check.NotNull(handler, nameof(handler)); Check.NotNull(options, nameof(options)); _method = new SubscribedMethod(_ => handler.Target, handler.Method, options); }
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)); }