/// <summary> /// Initializes a new instance of the <see cref="Configuration"/> class. /// </summary> public Configuration() { container.AvoidConstructorsWithPrimitiveTypes() .IfOnlyOneImplementationUseIt() .UseImmediateCommandScheduling() .RegisterSingle <IReservationService>(c => new NoReservations()) .RegisterSingle <IEventBus>(c => new InProcessEventBus()) .Register <ISnapshotRepository>(c => new NoSnapshots()) .RegisterSingle(c => this); }
/// <summary> /// Initializes a new instance of the <see cref="Configuration"/> class. /// </summary> public Configuration() { container.AvoidConstructorsWithPrimitiveTypes() .IfOnlyOneImplementationUseIt() .UseImmediateCommandScheduling() .DefaultToJsonSnapshots() .AddStoreStrategy() .RegisterSingle <IReservationService>(c => NoReservations.Instance) .RegisterSingle <IEventBus>(c => new InProcessEventBus()) .Register <ISnapshotRepository>(c => new NoSnapshots()) .Register <IETagChecker>(c => new NoEventStoreETagVerifications()) .RegisterSingle(c => this); }