Example #1
0
 public MongoDBProviderConfigurator AsEventStore(Action <MongoDBEvenStoreConfigurator> eventStore)
 {
     _builder
     .ConfigureClaptrapDesign(
         _designFilter,
         x =>
     {
         x.EventLoaderFactoryType = typeof(RelationalStoreFactory);
         x.EventSaverFactoryType  = typeof(RelationalStoreFactory);
         var configurator         = new MongoDBEvenStoreConfigurator(x.ClaptrapStorageProviderOptions);
         eventStore(configurator);
     });
     return(this);
 }
 public static IClaptrapBootstrapperBuilder UseDeepClonerStateHolder(
     this IClaptrapBootstrapperBuilder builder,
     Func <IClaptrapDesign, bool> predicate)
 => builder.ConfigureClaptrapDesign(
     predicate,
     x =>
     x.StateHolderFactoryType = typeof(DesignBaseEventHandlerFactory));
Example #3
0
 public static IClaptrapBootstrapperBuilder UseDeepClonerStateHolder(
     this IClaptrapBootstrapperBuilder builder)
 {
     return(builder.ConfigureClaptrapDesign(
                x => true,
                x =>
                x.StateHolderFactoryType = typeof(DesignBaseEventHandlerFactory)));
 }
Example #4
0
 public RabbitMQConfigurator AsEventCenter()
 {
     _builder.ConfigureClaptrapDesign(
         _designFilter,
         x => x.ClaptrapOptions.EventCenterOptions = new EventCenterOptions
     {
         EventCenterType = EventCenterType.RabbitMQ
     });
     return(this);
 }
 public DaprPubsubConfigurator AsEventCenter()
 {
     _builder.ConfigureClaptrapDesign(
         _designFilter,
         x => x.ClaptrapOptions.EventCenterOptions = new EventCenterOptions
     {
         EventCenterType = EventCenterType.DaprPubsub
     });
     return(this);
 }
Example #6
0
 public static void Configure(IClaptrapBootstrapperBuilder builder)
 {
     builder
     .ConfigureClaptrapDesign(
         x => x.ClaptrapOptions.StateSavingOptions == null,
         x => x.ClaptrapOptions.StateSavingOptions = new StateSavingOptions
     {
         SavingWindowTime         = TimeSpan.FromSeconds(10),
         SaveWhenDeactivateAsync  = true,
         SavingWindowVersionLimit = 1000,
     })
     .ConfigureClaptrapDesign(
         x => x.ClaptrapOptions.MinionActivationOptions == null,
         x => x.ClaptrapOptions.MinionActivationOptions = new MinionActivationOptions
     {
         ActivateMinionsAtMasterStart = false
     })
     .ConfigureClaptrapDesign(
         x => x.ClaptrapOptions.EventLoadingOptions == null,
         x => x.ClaptrapOptions.EventLoadingOptions = new EventLoadingOptions
     {
         LoadingCountInOneBatch = 1000
     })
     .ConfigureClaptrapDesign(
         x => x.ClaptrapOptions.StateRecoveryOptions == null,
         x => x.ClaptrapOptions.StateRecoveryOptions = new StateRecoveryOptions
     {
         StateRecoveryStrategy = StateRecoveryStrategy.FromStore
     })
     .ConfigureClaptrapDesign(
         x => x.InitialStateDataFactoryType == null,
         x => x.InitialStateDataFactoryType = typeof(DefaultInitialStateDataFactory))
     .ConfigureClaptrapDesign(
         x => x.StateHolderFactoryType == null,
         x => x.StateHolderFactoryType = typeof(NoChangeStateHolderFactory))
     .ConfigureClaptrapDesign(
         x => x.EventHandlerFactoryFactoryType == null,
         x => x.EventHandlerFactoryFactoryType = typeof(EventHandlerFactoryFactory))
     .ConfigureClaptrapDesign(
         x => x.EventNotifierFactoryType == null,
         x => x.EventNotifierFactoryType = typeof(CompoundEventNotifierFactory))
     .ConfigureClaptrapDesign(
         x => true,
         DisplayInfoFiller.FillDisplayInfo)
     .ConfigureClaptrapDesign(
         x => x.ClaptrapOptions.EventCenterOptions == null,
         x => x.ClaptrapOptions.EventCenterOptions = new EventCenterOptions
     {
         EventCenterType = EventCenterType.None,
     })
     ;
 }
Example #7
0
 public OrleansConfigurator AsEventCenter()
 {
     _builder.ConfigureClaptrapDesign(_designFilter,
                                      x => { x.ClaptrapOptions.EventCenterOptions.EventCenterType = EventCenterType.OrleansClient; });
     return(this);
 }