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)
14
public sealed class FakeContainerRuntime(bool shouldFail = false, bool isRunning = true) :
IContainerRuntime
39 references to IContainerRuntime
Aspire.Hosting (10)
ApplicationModel\ProjectResource.cs (2)
147
var
containerRuntime = ctx.Services.GetRequiredService<
IContainerRuntime
>();
DistributedApplicationBuilder.cs (4)
515
_innerBuilder.Services.AddKeyedSingleton<
IContainerRuntime
, DockerContainerRuntime>("docker");
516
_innerBuilder.Services.AddKeyedSingleton<
IContainerRuntime
, PodmanContainerRuntime>("podman");
522
string rt => sp.GetRequiredKeyedService<
IContainerRuntime
>(rt),
523
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)
1263
IContainerRuntime
? containerRuntime = null,
1296
builder.Services.AddSingleton<
IContainerRuntime
>(containerRuntime ?? new FakeContainerRuntime());
1297
builder.Services.AddSingleton<IAcrLoginService>(sp => new FakeAcrLoginService(sp.GetRequiredService<
IContainerRuntime
>()));
1733
builder.Services.AddSingleton<
IContainerRuntime
>(new FakeContainerRuntime());
1734
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)
633
builder.Services.AddSingleton<
IContainerRuntime
>(fakeRuntime);
663
builder.Services.AddSingleton<
IContainerRuntime
>(fakeRuntime);
680
private sealed class MockImageBuilderWithRuntime(
IContainerRuntime
runtime) : IResourceContainerImageManager
Aspire.Hosting.Tests (17)
ProjectResourceTests.cs (2)
846
builder.Services.AddSingleton<
IContainerRuntime
, FakeContainerRuntime>();
862
var fakeContainerRuntime = (FakeContainerRuntime)app.Services.GetRequiredService<
IContainerRuntime
>();
Publishing\ResourceContainerImageManagerTests.cs (15)
445
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
469
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
499
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
534
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
563
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
602
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", new FakeContainerRuntime(shouldFail: true));
638
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
699
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
808
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
854
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
1202
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
1254
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
1290
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
1323
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
1366
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);