public static void SetProjection(this IState state, Projection projection)
 {
     state.Replace(StateKeys.Projection, projection);
 }
Пример #2
0
        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);
        }