public TypedProjectionRegistration(IProjectionRegistry <TProjection> projectionRegistry, IContextualProvider <TProjection> projectionProvider) { if (projectionRegistry == null) { throw new ArgumentNullException(nameof(projectionRegistry)); } if (projectionProvider == null) { throw new ArgumentNullException(nameof(projectionProvider)); } _handlerRegistry = projectionRegistry; Projection = projectionProvider; _handlerRegistry.Register(Projection); }
public EventDispatcherBootstrapper(IProjectionRegistry projectionRegistry) { this.projectionRegistry = projectionRegistry; }
public EventDispatcherBootstrapper(IProjectionRegistry projectionRegistry) { this.projectionRegistry = projectionRegistry; }
/// <summary> /// Asynchronously registers the specified handler in the specified handler registry and returns a handler registration. /// </summary> /// <typeparam name="THandler">The type of handler.</typeparam> /// <param name="handlerRegistry">The handler registry that the handler shall be registered to.</param> /// <param name="handlerProvider">A contextual provider that provides instances of the to be registered handler.</param> /// <returns>A task representing the asynchronous operation.</returns> public static IProjectionRegistration <THandler> CreateRegistration <THandler>( this IProjectionRegistry <THandler> handlerRegistry, IContextualProvider <THandler> handlerProvider) { return(new TypedProjectionRegistration <THandler>(handlerRegistry, handlerProvider)); }