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

            return(unsubscribeContext.InvokePipeline <IUnsubscribeContext>());
        }
Example #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));
        }
Example #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));
        }
Example #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));
        }