Inheritance: 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
ファイル: BusOperations.cs プロジェクト: KqSMea8/gueslang
        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));
        }