상속: BehaviorContext, IUnsubscribeContext
예제 #1
0
        public static Task Unsubscribe(IBehaviorContext context, Type eventType, UnsubscribeOptions options)
        {
            var unsubscribeContext = new UnsubscribeContext(
                context,
                eventType,
                options.Context);

            return(unsubscribeContext.InvokePipeline <IUnsubscribeContext>());
        }
예제 #2
0
        public Task Unsubscribe(IBehaviorContext context, Type eventType, UnsubscribeOptions options)
        {
            var unsubscribeContext = new UnsubscribeContext(
                context,
                eventType,
                options.Context);

            MergeDispatchProperties(unsubscribeContext, options.DispatchProperties);

            return(unsubscribePipeline.Invoke(unsubscribeContext));
        }
예제 #3
0
        public static Task Unsubscribe(IBehaviorContext context, Type eventType, UnsubscribeOptions options)
        {
            var cache    = context.Extensions.Get <IPipelineCache>();
            var pipeline = cache.Pipeline <IUnsubscribeContext>();

            var subscribeContext = new UnsubscribeContext(
                context,
                eventType,
                options.Context);

            return(pipeline.Invoke(subscribeContext));
        }
예제 #4
0
        public static Task Unsubscribe(IBehaviorContext context, Type eventType, UnsubscribeOptions options)
        {
            var settings = context.Builder.Build <ReadOnlySettings>();
            var pipeline = new PipelineBase <IUnsubscribeContext>(context.Builder, settings, settings.Get <PipelineConfiguration>().MainPipeline);

            var subscribeContext = new UnsubscribeContext(
                context,
                eventType,
                options);

            return(pipeline.Invoke(subscribeContext));
        }