private void RegisterSpecialLiquidationCommandsHandler( ProcessingOptionsDescriptor <IBoundedContextRegistration> contextRegistration) { contextRegistration.ListeningCommands( typeof(StartSpecialLiquidationCommand), typeof(StartSpecialLiquidationInternalCommand), typeof(GetPriceForSpecialLiquidationTimeoutInternalCommand), typeof(ExecuteSpecialLiquidationOrderCommand), typeof(FailSpecialLiquidationInternalCommand), typeof(ExecuteSpecialLiquidationOrdersInternalCommand), typeof(CancelSpecialLiquidationCommand), typeof(ClosePositionsRegularFlowCommand), typeof(ResumePausedSpecialLiquidationCommand) ) .On(CommandsRoute) .WithCommandsHandler <SpecialLiquidationCommandsHandler>() .PublishingEvents( typeof(SpecialLiquidationStartedInternalEvent), typeof(SpecialLiquidationOrderExecutedEvent), typeof(SpecialLiquidationOrderExecutionFailedEvent), typeof(SpecialLiquidationFinishedEvent), typeof(SpecialLiquidationFailedEvent), typeof(SpecialLiquidationCancelledEvent), typeof(ResumePausedSpecialLiquidationFailedEvent), typeof(ResumePausedSpecialLiquidationSucceededEvent) ) .With(EventsRoute); }
private static void RegisterStartProductsHandler( ProcessingOptionsDescriptor <IBoundedContextRegistration> contextRegistration) { contextRegistration .ListeningCommands(typeof(StartProductCommand)) .On(DefaultRoute) .WithCommandsHandler <StartProductsCommandsHandler>() .PublishingEvents(typeof(ProductChangedEvent)) .With(DefaultEventPipeline); }
private static void RegisterNegativeProtectionCommandsHandler( ProcessingOptionsDescriptor <IBoundedContextRegistration> contextRegistration) { contextRegistration.ListeningCommands( typeof(NotifyNegativeProtectionInternalCommand)) .On(DefaultRoute) .WithCommandsHandler <NegativeProtectionCommandsHandler>() .PublishingEvents( typeof(NegativeProtectionEvent)) .With(DefaultPipeline); }
private void RegisterDeleteAccountsCommandsHandler( ProcessingOptionsDescriptor <IBoundedContextRegistration> contextRegistration) { contextRegistration.ListeningCommands( typeof(BlockAccountsForDeletionCommand), typeof(MtCoreFinishAccountsDeletionCommand)) .On(CommandsRoute) .WithCommandsHandler <DeleteAccountsCommandsHandler>() .PublishingEvents( typeof(AccountsBlockedForDeletionEvent), typeof(MtCoreDeleteAccountsFinishedEvent)) .With(EventsRoute); }
private void RegisterWithdrawalCommandsHandler( ProcessingOptionsDescriptor <IBoundedContextRegistration> contextRegistration) { contextRegistration.ListeningCommands( typeof(FreezeAmountForWithdrawalCommand), typeof(UnfreezeMarginOnFailWithdrawalCommand)) .On(CommandsRoute) .WithCommandsHandler <WithdrawalCommandsHandler>() .PublishingEvents( typeof(AmountForWithdrawalFrozenEvent), typeof(AmountForWithdrawalFreezeFailedEvent)) .With(EventsRoute); }
private void RegisterEodCommandsHandler( ProcessingOptionsDescriptor <IBoundedContextRegistration> contextRegistration) { contextRegistration.ListeningCommands( typeof(CreateSnapshotCommand) ) .On(CommandsRoute) .WithCommandsHandler <EodCommandsHandler>() .PublishingEvents( typeof(SnapshotCreatedEvent), typeof(SnapshotCreationFailedEvent) ) .With(EventsRoute); }
private static void RegisterAssetPairFlagsCommandHandler( ProcessingOptionsDescriptor <IBoundedContextRegistration> contextRegistration) { contextRegistration .ListeningCommands( typeof(SuspendAssetPairCommand), typeof(UnsuspendAssetPairCommand) ) .On(DefaultRoute) .WithCommandsHandler <AssetPairFlagsCommandsHandler>() .PublishingEvents( typeof(AssetPairChangedEvent) ) .With(DefaultPipeline); }
private static void RegisterRevokeTemporaryCapitalCommandsHandler( ProcessingOptionsDescriptor <IBoundedContextRegistration> contextRegistration) { contextRegistration.ListeningCommands( typeof(StartRevokeTemporaryCapitalInternalCommand), typeof(FinishRevokeTemporaryCapitalInternalCommand) ) .On(DefaultRoute) .WithCommandsHandler <RevokeTemporaryCapitalCommandsHandler>() .PublishingEvents( typeof(RevokeTemporaryCapitalStartedInternalEvent), typeof(RevokeTemporaryCapitalSucceededEvent), typeof(RevokeTemporaryCapitalFailedEvent) ) .With(DefaultPipeline); }
private static void RegisterUpdateBalanceCommandHandler( ProcessingOptionsDescriptor <IBoundedContextRegistration> contextRegistration) { contextRegistration .ListeningCommands( typeof(UpdateBalanceInternalCommand), typeof(ChangeBalanceCommand)) .On(DefaultRoute) .ProcessingOptions(DefaultRoute).MultiThreaded(10).QueueCapacity(1024) .WithCommandsHandler <UpdateBalanceCommandsHandler>() .PublishingEvents( typeof(AccountChangedEvent), typeof(AccountBalanceChangeFailedEvent)) .With(DefaultPipeline) .ProcessingOptions(DefaultPipeline).MultiThreaded(10).QueueCapacity(1024); }
private static void RegisterWithdrawalCommandHandler( ProcessingOptionsDescriptor <IBoundedContextRegistration> contextRegistration) { contextRegistration.ListeningCommands( typeof(WithdrawCommand), typeof(FailWithdrawalInternalCommand), typeof(CompleteWithdrawalInternalCommand)) .On(DefaultRoute) .WithCommandsHandler <WithdrawalCommandsHandler>() .PublishingEvents( typeof(WithdrawalFailedEvent), typeof(WithdrawalStartedInternalEvent), typeof(WithdrawalStartFailedInternalEvent), typeof(WithdrawalSucceededEvent)) .With(DefaultPipeline); }
private static void RegisterDeleteAccountsCommandsHandler( ProcessingOptionsDescriptor <IBoundedContextRegistration> contextRegistration) { contextRegistration.ListeningCommands( typeof(DeleteAccountsCommand), typeof(MarkAccountsAsDeletedInternalCommand), typeof(FinishAccountsDeletionInternalCommand) ) .On(DefaultRoute) .WithCommandsHandler <DeleteAccountsCommandsHandler>() .PublishingEvents( typeof(DeleteAccountsStartedInternalEvent), typeof(AccountsMarkedAsDeletedEvent), typeof(AccountsDeletionFinishedEvent), typeof(AccountChangedEvent) ) .With(DefaultPipeline); }
private static void RegisterDepositCommandHandler( ProcessingOptionsDescriptor <IBoundedContextRegistration> contextRegistration) { contextRegistration .ListeningCommands( typeof(DepositCommand), typeof(FreezeAmountForDepositInternalCommand), typeof(FailDepositInternalCommand), typeof(CompleteDepositInternalCommand)) .On(DefaultRoute) .WithCommandsHandler <DepositCommandsHandler>() .PublishingEvents( typeof(DepositFailedEvent), typeof(AmountForDepositFrozenInternalEvent), typeof(DepositStartedInternalEvent), typeof(DepositSucceededEvent)) .With(DefaultPipeline); }
private void RegisterLiquidationCommandsHandler( ProcessingOptionsDescriptor <IBoundedContextRegistration> contextRegistration) { contextRegistration.ListeningCommands( typeof(StartLiquidationInternalCommand), typeof(FailLiquidationInternalCommand), typeof(FinishLiquidationInternalCommand), typeof(LiquidatePositionsInternalCommand), typeof(ResumeLiquidationInternalCommand) ) .On(CommandsRoute) .WithCommandsHandler <LiquidationCommandsHandler>() .PublishingEvents( typeof(LiquidationFailedEvent), typeof(LiquidationFinishedEvent), typeof(LiquidationResumedInternalEvent), typeof(LiquidationStartedInternalEvent), typeof(NotEnoughLiquidityInternalEvent), typeof(PositionsLiquidationFinishedInternalEvent) ) .With(EventsRoute); }