/// <summary> /// Global singleton constructor required because MS Test does not support test fixtures /// </summary> public static ModelFixture GetModelFixture() { lock (_lock) { if (_current != null) { return(_current); } using Stream configStream = typeof(ModelFixture).GetResourceStream(_resourceId); IConfiguration config = new ConfigurationBuilder() .AddJsonStream(configStream) .AddUserSecrets(_secretId) .AddEnvironmentVariables("mlhostcli") .Build(); var blobStoreOption = new StoreOption(); config.Bind(blobStoreOption, x => x.BindNonPublicProperties = true); blobStoreOption.Verify(); return(_current = new ModelFixture(new DatalakeModelStore(new DatalakeStore(blobStoreOption, new NullLogger <DatalakeStore>())))); } }