public static void SetProjection(this IState state, Projection projection) { state.Replace(StateKeys.Projection, projection); }
public static IComponentResolver AddEventHandler <TEventHandler>(this IComponentResolver resolver, Projection projection) where TEventHandler : class { Guard.AgainstNull(resolver, nameof(resolver)); Guard.AgainstNull(projection, nameof(projection)); projection.AddEventHandler(resolver.Resolve <TEventHandler>()); return(resolver); }