public static Task Subscribe(IBehaviorContext context, Type eventType, SubscribeOptions options) { var subscribeContext = new SubscribeContext( context, eventType, options.Context); return(subscribeContext.InvokePipeline <ISubscribeContext>()); }
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)); }
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)); }
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)); }