private IServiceProvider setup()
    {
        var builder = new XtiHostBuilder();

        builder.Services.AddFakeSecretCredentials();
        return(builder.Build().Scope());
    }
Beispiel #2
0
    private IServiceProvider setup(string envName)
    {
        Environment.SetEnvironmentVariable("XTI_Dir", XtiDir);
        Environment.SetEnvironmentVariable("DOTNET_ENVIRONMENT", envName);
        var builder = new XtiHostBuilder();

        return(builder.Build().Scope());
    }
Beispiel #3
0
    private IServiceProvider setup(KeyValuePair <string, string>[] settings)
    {
        var builder = new XtiHostBuilder();

        builder.Configuration.AddInMemoryCollection(settings);
        builder.Services.AddConfigurationOptions <ScheduleOptions>();
        return(builder.Build().Scope());
    }
    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());
    }
Beispiel #5
0
    private IServiceProvider setup(string envName = "Test")
    {
        Environment.SetEnvironmentVariable("DOTNET_ENVIRONMENT", envName);
        var hostBuilder = new XtiHostBuilder();

        hostBuilder.Services.AddFileSecretCredentials();
        var host = hostBuilder.Build();

        return(host.Scope());
    }
Beispiel #6
0
    private IServiceProvider setup(string time)
    {
        var hostBuilder = new XtiHostBuilder();

        hostBuilder.Configuration.AddInMemoryCollection
        (
            new[] { KeyValuePair.Create("Time", time) }
        );
        hostBuilder.Services.AddConfigurationOptions <TimeObject>();
        return(hostBuilder.Build().Scope());
    }