2 implementations of IContainerRuntime
Aspire.Hosting (1)
Publishing\ContainerRuntimeBase.cs (1)
16
internal abstract class ContainerRuntimeBase<TLogger> :
IContainerRuntime
where TLogger : class
Aspire.Hosting.Tests (1)
Publishing\FakeContainerRuntime.cs (1)
11
public sealed class FakeContainerRuntime(bool shouldFail = false) :
IContainerRuntime
30 references to IContainerRuntime
Aspire.Hosting (8)
ApplicationModel\ProjectResource.cs (2)
117
var
containerRuntime = ctx.Services.GetRequiredService<
IContainerRuntime
>();
DistributedApplicationBuilder.cs (4)
462
_innerBuilder.Services.AddKeyedSingleton<
IContainerRuntime
, DockerContainerRuntime>("docker");
463
_innerBuilder.Services.AddKeyedSingleton<
IContainerRuntime
, PodmanContainerRuntime>("podman");
469
string rt => sp.GetRequiredKeyedService<
IContainerRuntime
>(rt),
470
null => sp.GetRequiredKeyedService<
IContainerRuntime
>("docker")
Publishing\ResourceContainerImageBuilder.cs (2)
139
IContainerRuntime
containerRuntime,
145
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)
1073
IContainerRuntime
? containerRuntime = null,
1105
builder.Services.AddSingleton<
IContainerRuntime
>(containerRuntime ?? new FakeContainerRuntime());
1106
builder.Services.AddSingleton<IAcrLoginService>(sp => new FakeAcrLoginService(sp.GetRequiredService<
IContainerRuntime
>()));
1347
builder.Services.AddSingleton<
IContainerRuntime
>(new FakeContainerRuntime());
1348
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.Tests (13)
ProjectResourceTests.cs (2)
810
builder.Services.AddSingleton<
IContainerRuntime
, FakeContainerRuntime>();
826
var fakeContainerRuntime = (FakeContainerRuntime)app.Services.GetRequiredService<
IContainerRuntime
>();
Publishing\ResourceContainerImageBuilderTests.cs (11)
466
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
492
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
514
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
535
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
563
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
594
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
623
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
663
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", new FakeContainerRuntime(shouldFail: true));
698
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
758
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
867
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);