Skip to content

Commit

Permalink
refactor(core-kernel): add symbol for TransactionHandlerProvider (#3496)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastijankuzner authored Feb 13, 2020
1 parent 704644f commit 5834847
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/core-kernel/src/ioc/identifiers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,5 @@ export const Identifiers = {
TransactionHandler: Symbol.for("TransactionHandler"),
// Registries
TransactionHandlerRegistry: Symbol.for("Registry<TransactionHandler>"),
TransactionHandlerProvider: Symbol.for("Provider<TransactionHandler>"),
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { TransactionHandler } from "./transaction";

@Container.injectable()
export class TransactionHandlerRegistry {
@Container.inject(TransactionHandlerProvider)
@Container.inject(Container.Identifiers.TransactionHandlerProvider)
private readonly provider!: TransactionHandlerProvider;

@Container.multiInject(Container.Identifiers.TransactionHandler)
Expand Down
4 changes: 2 additions & 2 deletions packages/core-transactions/src/service-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export class ServiceProvider extends Providers.ServiceProvider {
.inSingletonScope();

this.app
.bind(TransactionHandlerProvider)
.toSelf()
.bind(Container.Identifiers.TransactionHandlerProvider)
.to(TransactionHandlerProvider)
.inSingletonScope();

this.app
Expand Down

0 comments on commit 5834847

Please sign in to comment.