|
|
@ -160,6 +160,9 @@ export class Microservice |
|
|
|
*/ |
|
|
|
public installService<T extends Microservice>(this: T, InternalServiceClass: InternalServiceConstructor<T>) { |
|
|
|
let InternalService = new InternalServiceClass(this); |
|
|
|
if (InternalService.NAME in this.services) { |
|
|
|
throw new Error("Install Service Error: Attempted to register multiple services with the same name"); |
|
|
|
} |
|
|
|
this.services[InternalService.NAME] = InternalService; |
|
|
|
} |
|
|
|
|
|
|
|