Inheritance: BehaviorContext, ISubscribeContext
Beispiel #1
0
        public static Task Subscribe(IBehaviorContext context, Type eventType, SubscribeOptions options)
        {
            var subscribeContext = new SubscribeContext(
                context,
                eventType,
                options.Context);

            return(subscribeContext.InvokePipeline <ISubscribeContext>());
        }
Beispiel #2
0
        public Task Subscribe(IBehaviorContext context, Type[] eventTypes, SubscribeOptions options)
        {
            var subscribeContext = new SubscribeContext(
                context,
                eventTypes,
                options.Context);

            MergeDispatchProperties(subscribeContext, options.DispatchProperties);

            return(subscribePipeline.Invoke(subscribeContext));
        }
Beispiel #3
0
        public static Task Subscribe(IBehaviorContext context, Type eventType, SubscribeOptions options)
        {
            var cache    = context.Extensions.Get <IPipelineCache>();
            var pipeline = cache.Pipeline <ISubscribeContext>();

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

            return(pipeline.Invoke(subscribeContext));
        }
Beispiel #4
0
        public static Task Subscribe(IBehaviorContext context, Type eventType, SubscribeOptions options)
        {
            var settings = context.Builder.Build <ReadOnlySettings>();
            var pipeline = new PipelineBase <ISubscribeContext>(context.Builder, settings, settings.Get <PipelineConfiguration>().MainPipeline);

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

            return(pipeline.Invoke(subscribeContext));
        }