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

            return(subscribeContext.InvokePipeline <ISubscribeContext>());
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }