/// <inheritdoc /> public async Task <T> GetInstanceAsync <T>(object key) where T : class { if (ContainerService == null || !ContainerService.IsInitialized) { throw new NullReferenceException("Container service was not initialized."); } return(await ContainerService.GetInstanceAsync <T>(key)); }