private IServiceProvider setup(string envName) { var hostBuilder = new XtiHostBuilder(XtiEnvironment.Parse(envName)); hostBuilder.Services.AddSingleton(sp => sp.GetRequiredService <XtiFolder>().AppDataFolder()); var host = hostBuilder.Build(); return(host.Scope()); }
private IServiceProvider setup(string envName = "Test") { Environment.SetEnvironmentVariable("DOTNET_ENVIRONMENT", envName); var xtiEnv = XtiEnvironment.Parse(envName); var hostBuilder = new XtiHostBuilder(xtiEnv); hostBuilder.Services.AddFileSecretCredentials(xtiEnv); var host = hostBuilder.Build(); return(host.Scope()); }
public void UseEnvironment(string envName) => Environment = XtiEnvironment.Parse(envName);