예제 #1
0
    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());
    }
예제 #3
0
 public void UseEnvironment(string envName) => Environment = XtiEnvironment.Parse(envName);