2 implementations of IContainerRuntime
Aspire.Hosting (1)
Publishing\ContainerRuntimeBase.cs (1)
17
internal abstract class ContainerRuntimeBase<TLogger> :
IContainerRuntime
where TLogger : class
Aspire.Hosting.Tests (1)
Publishing\FakeContainerRuntime.cs (1)
13
public sealed class FakeContainerRuntime(bool shouldFail = false, bool isRunning = true) :
IContainerRuntime
38 references to IContainerRuntime
Aspire.Hosting (10)
ApplicationModel\ProjectResource.cs (2)
147
var
containerRuntime = ctx.Services.GetRequiredService<
IContainerRuntime
>();
DistributedApplicationBuilder.cs (4)
487
_innerBuilder.Services.AddKeyedSingleton<
IContainerRuntime
, DockerContainerRuntime>("docker");
488
_innerBuilder.Services.AddKeyedSingleton<
IContainerRuntime
, PodmanContainerRuntime>("podman");
494
string rt => sp.GetRequiredKeyedService<
IContainerRuntime
>(rt),
495
null => sp.GetRequiredKeyedService<
IContainerRuntime
>("docker")
Pipelines\PipelineStepHelpers.cs (2)
87
var
containerRuntime = context.Services.GetRequiredService<
IContainerRuntime
>();
Publishing\ResourceContainerImageManager.cs (2)
161
IContainerRuntime
containerRuntime,
168
private
IContainerRuntime
ContainerRuntime { get; } = containerRuntime;
Aspire.Hosting.Azure (2)
AcrLoginService.cs (2)
29
private readonly
IContainerRuntime
_containerRuntime;
47
public AcrLoginService(IHttpClientFactory httpClientFactory,
IContainerRuntime
containerRuntime, ILogger<AcrLoginService> logger)
Aspire.Hosting.Azure.Tests (7)
AzureDeployerTests.cs (5)
1196
IContainerRuntime
? containerRuntime = null,
1228
builder.Services.AddSingleton<
IContainerRuntime
>(containerRuntime ?? new FakeContainerRuntime());
1229
builder.Services.AddSingleton<IAcrLoginService>(sp => new FakeAcrLoginService(sp.GetRequiredService<
IContainerRuntime
>()));
1615
builder.Services.AddSingleton<
IContainerRuntime
>(new FakeContainerRuntime());
1616
builder.Services.AddSingleton<IAcrLoginService>(sp => new FakeAcrLoginService(sp.GetRequiredService<
IContainerRuntime
>()));
FakeAcrLoginService.cs (2)
15
private readonly
IContainerRuntime
_containerRuntime;
21
public FakeAcrLoginService(
IContainerRuntime
containerRuntime)
Aspire.Hosting.Docker.Tests (3)
DockerComposeTests.cs (3)
632
builder.Services.AddSingleton<
IContainerRuntime
>(fakeRuntime);
663
builder.Services.AddSingleton<
IContainerRuntime
>(fakeRuntime);
680
private sealed class MockImageBuilderWithRuntime(
IContainerRuntime
runtime) : IResourceContainerImageManager
Aspire.Hosting.Tests (16)
ProjectResourceTests.cs (2)
798
builder.Services.AddSingleton<
IContainerRuntime
, FakeContainerRuntime>();
814
var fakeContainerRuntime = (FakeContainerRuntime)app.Services.GetRequiredService<
IContainerRuntime
>();
Publishing\ResourceContainerImageManagerTests.cs (14)
448
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
472
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
502
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
537
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
566
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
606
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", new FakeContainerRuntime(shouldFail: true));
642
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
702
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
811
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
1098
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
1150
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
1186
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
1219
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
1262
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);