예제 #1
0
 /// <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);
 }
예제 #2
0
 /// <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);
 }