* Create and initialize the singleton instance
(log?: (...args: unknown[]) => void)
| 177 | * Create and initialize the singleton instance |
| 178 | */ |
| 179 | public static async createInstance(log?: (...args: unknown[]) => void): Promise<MdmService> { |
| 180 | if (this._instance) { |
| 181 | throw new Error("MdmService instance already exists") |
| 182 | } |
| 183 | |
| 184 | this._instance = new MdmService(log) |
| 185 | await this._instance.initialize() |
| 186 | return this._instance |
| 187 | } |
| 188 | |
| 189 | /** |
| 190 | * Check if instance exists |
no test coverage detected