public static Task Unsubscribe(IBehaviorContext context, Type eventType, UnsubscribeOptions options) { var unsubscribeContext = new UnsubscribeContext( context, eventType, options.Context); return(unsubscribeContext.InvokePipeline <IUnsubscribeContext>()); }
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)); }
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)); }
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)); }