Skip to content

Commit b4a3d93

Browse files
committed
Fix other IoC bindings so that it is strongly typed
1 parent bb94273 commit b4a3d93

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

Source/dependencyInversion/TenantServiceProviders.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export class TenantServiceProviders extends ITenantServiceProviders {
6060
const tenantContainer = this._rootContainer.createChild();
6161

6262
tenantContainer.bind(TenantId).toConstantValue(tenant);
63-
tenantContainer.bind('TenantId').toConstantValue(tenant);
63+
tenantContainer.bind(TenantId.name).toConstantValue(tenant);
6464

6565
const tenantBinder = new InversifyServiceBinder(tenantContainer);
6666
bindings.bindAllTenantServices(tenantBinder, tenant);

Source/sdk/DolittleClient.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -333,19 +333,19 @@ export class DolittleClient extends IDolittleClient {
333333

334334
this._serviceProviderBuilder.addTenantServices((bindings, tenant) => {
335335
bindings.bind(IEventStore).toFactory(() => this._eventStore!.forTenant(tenant));
336-
bindings.bind('IEventStore').toFactory(() => this._eventStore!.forTenant(tenant));
336+
bindings.bind(IEventStore.name).toFactory(() => this._eventStore!.forTenant(tenant));
337337

338338
bindings.bind(IAggregates).toFactory(() => this._aggregates!.forTenant(tenant));
339-
bindings.bind('IAggregates').toFactory(() => this._aggregates!.forTenant(tenant));
339+
bindings.bind(IAggregates.name).toFactory(() => this._aggregates!.forTenant(tenant));
340340

341341
bindings.bind(IProjectionStore).toFactory(() => this._projectionStore!.forTenant(tenant));
342-
bindings.bind('IProjectionStore').toFactory(() => this._projectionStore!.forTenant(tenant));
342+
bindings.bind(IProjectionStore.name).toFactory(() => this._projectionStore!.forTenant(tenant));
343343

344344
bindings.bind(IEmbedding).toFactory(() => this._embeddingStore!.forTenant(tenant));
345-
bindings.bind('IEmbedding').toFactory(() => this._embeddingStore!.forTenant(tenant));
345+
bindings.bind(IEmbedding.name).toFactory(() => this._embeddingStore!.forTenant(tenant));
346346

347347
bindings.bind(IResources).toFactory(() => this._resources!.forTenant(tenant));
348-
bindings.bind('IResources').toFactory(() => this._resources!.forTenant(tenant));
348+
bindings.bind(IResources.name).toFactory(() => this._resources!.forTenant(tenant));
349349
});
350350

351351
for (const callback of configuredCallbacks) {

0 commit comments

Comments
 (0)