public static void RegisterInMemoryModule(this IBusFactoryConfigurator configurator, IServiceProvider provider) { // add backend consumers... configurator.RegisterScopedConsumer <BackEnd.CommandHandlers.Files.AddAggregatedPropertiesCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.CommandHandlers.Files.AddFieldsCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.CommandHandlers.Files.UpdateTotalRecordsCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.CommandHandlers.Records.AddImageCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.CommandHandlers.Records.AddIssuesCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.CommandHandlers.Records.AddPropertiesCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.CommandHandlers.Records.ChangeStatusCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.CommandHandlers.Records.CreateInvalidRecordEventHandlers>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.CommandHandlers.Records.DeleteCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.CommandHandlers.Records.SetAccessPermissionsCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.CommandHandlers.Records.UpdateFieldsCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.EventHandlers.Nodes.RecordEventHandlers>(provider, null, c => c.UseCqrsLite()); // add persistence consumers... configurator.RegisterConsumer <Persistence.CommandHandlers.AggregatePropertiesCommandHandler>(provider); configurator.RegisterConsumer <Persistence.EventHandlers.Files.FilesEventHandlers>(provider); configurator.RegisterConsumer <Persistence.EventHandlers.Files.NodesEventHandlers>(provider); configurator.RegisterConsumer <Persistence.EventHandlers.Records.NodesEventHandlers>(provider); configurator.RegisterConsumer <Persistence.EventHandlers.Records.RecordsEventHandlers>(provider); }
public static void RegisterInMemoryModule(this IBusFactoryConfigurator configurator, IServiceProvider provider) { configurator.RegisterConsumer <Persistence.EventHandlers.NodesEventHandlers>(provider); configurator.RegisterConsumer <Persistence.EventHandlers.FilesEventHandlers>(provider); // register state machines... configurator.RegisterStateMachine <MicroscopyFileProcessingStateMachine, MicroscopyFileProcessingState>(provider); }
public static void RegisterInMemoryModule(this IBusFactoryConfigurator configurator, IServiceProvider provider) { configurator.RegisterScopedConsumer <BackEnd.CommandHandlers.CreateReactionCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterConsumer <Persistence.EventHandlers.NodesEventHandlers>(provider); configurator.RegisterConsumer <Persistence.EventHandlers.RecordsEventHandlers>(provider); configurator.RegisterStateMachine <ReactionFileProcessingStateMachine, ReactionFileProcessingState>(provider); configurator.RegisterStateMachine <ReactionProcessingStateMachine, ReactionProcessingState>(provider); }
public static void RegisterInMemoryModule(this IBusFactoryConfigurator configurator, IServiceProvider provider) { configurator.RegisterScopedConsumer <BackEnd.CommandHandlers.AddMetadataCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.CommandHandlers.UpdatePdfCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterConsumer <Persistence.EventHandlers.NodesEventHandlers>(provider); configurator.RegisterConsumer <Persistence.EventHandlers.FilesEventHandlers>(provider); configurator.RegisterStateMachine <OfficeFileProcessingStateMachine, OfficeFileProcessingState>(provider); }
public static void RegisterInMemoryModule(this IBusFactoryConfigurator bus, IServiceProvider provider) { bus.RegisterScopedConsumer <BackEnd.CommandHandlers.CreateSubstanceCommandHandler>(provider, null, c => c.UseCqrsLite()); bus.RegisterConsumer <Persistence.EventHandlers.NodesEventHandlers>(provider); bus.RegisterConsumer <Persistence.EventHandlers.RecordsEventHandlers>(provider); bus.RegisterStateMachine <ChemicalFileProcessingStateMachine, ChemicalFileProcessingState>(provider); bus.RegisterStateMachine <InvalidSubstanceProcessingStateMachine, InvalidSubstanceProcessingState>(provider); bus.RegisterStateMachine <SubstanceProcessingStateMachine, SubstanceProcessingState>(provider); }
public static void RegisterInMemoryModule(this IBusFactoryConfigurator configurator, IServiceProvider provider) { // register backend consumers... configurator.RegisterScopedConsumer <BackEnd.CommandHandlers.CategoryTreeCommandHandler>(provider, null, c => c.UseCqrsLite()); // register persistence consumers... configurator.RegisterConsumer <Persistence.EventHandlers.CategoryTreeEventHandlers>(provider); }
public static void RegisterInMemoryModule(this IBusFactoryConfigurator configurator, IServiceProvider provider) { // register frontend consumers configurator.RegisterScopedConsumer <FrontEnd.CommandHandlers.FilesCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <FrontEnd.CommandHandlers.FoldersCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <FrontEnd.CommandHandlers.UsersCommandHandler>(provider, null, c => c.UseCqrsLite()); // register backend consumers... configurator.RegisterScopedConsumer <BackEnd.CommandHandlers.Files.AddImageCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.CommandHandlers.Files.UpdateMetadataCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.CommandHandlers.Files.ChangeStatusCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.CommandHandlers.Files.GrantAccessCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.CommandHandlers.Folders.GrantAccessCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.CommandHandlers.UserNotifications.DeleteUserNotificationCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.EventHandlers.Nodes.FilesEventHandlers>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.EventHandlers.Nodes.FoldersEventHandlers>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.EventHandlers.BlobEventHandlers>(provider, null, c => c.UseCqrsLite()); // register persistence consumers... configurator.RegisterConsumer <Persistence.EventHandlers.Files.FileEventHandlers>(provider); configurator.RegisterConsumer <Persistence.EventHandlers.Folders.FolderEventHandlers>(provider); configurator.RegisterConsumer <Persistence.EventHandlers.Nodes.FileEventHandlers>(provider); configurator.RegisterConsumer <Persistence.EventHandlers.Nodes.FolderContentEventHandlers>(provider); configurator.RegisterConsumer <Persistence.EventHandlers.Nodes.UserEventHandlers>(provider); configurator.RegisterConsumer <Persistence.EventHandlers.Users.UserEventHandlers>(provider); configurator.RegisterConsumer <Persistence.EventHandlers.UserNotifications.UserNotificationEventHandler>(provider); // register state machines... configurator.RegisterStateMachine <GenericFileProcessingStateMachine, GenericFileProcessingState>(provider); }
public static Task RegisterConsumers(this IBusFactoryConfigurator configurator, IServiceProvider provider, params Assembly[] assemblies) { var consumers = assemblies.SelectMany(a => a.GetTypes()).Where(t => t.GetInterfaces().Any(i => i.GetTypeInfo().IsGenericType&& i.GetGenericTypeDefinition() == typeof(IConsumer <>))).ToList(); foreach (var t in consumers) { configurator.RegisterConsumer(t, provider); } return(Task.CompletedTask); }
public static void RegisterInMemoryModule(this IBusFactoryConfigurator configurator, IServiceProvider provider) { // register backend consumers... configurator.RegisterScopedConsumer <BackEnd.AddImageCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.ChangeStatusCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.CreateModelCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.DeleteModelCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.MoveModelCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.UpdateModelBlobCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.UpdateModelNameCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.GrantAccessCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.SetTargetsCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.SetConsensusWeightCommandHandler>(provider, null, c => c.UseCqrsLite()); configurator.RegisterScopedConsumer <BackEnd.UpdateModelPropertiesCommandHandler>(provider, null, c => c.UseCqrsLite()); // register persistence consumers... configurator.RegisterConsumer <Persistence.EventHandlers.ModelsEventHandlers>(provider); configurator.RegisterConsumer <Persistence.EventHandlers.NodesEventHandlers>(provider); // register state machines... configurator.RegisterStateMachine <ModelTrainingStateMachine, ModelTrainingState>(provider); configurator.RegisterStateMachine <PropertiesPredictionStateMachine, PropertiesPredictionState>(provider); configurator.RegisterStateMachine <TrainingStateMachine, TrainingState>(provider); }
public static void RegisterInMemoryModule(this IBusFactoryConfigurator configurator, IServiceProvider provider) { configurator.RegisterConsumer <Persistence.EventHandlers.NodesEventHandlers>(provider); configurator.RegisterConsumer <Persistence.EventHandlers.FilesEventHandlers>(provider); }