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)
504
_innerBuilder.Services.AddKeyedSingleton<
IContainerRuntime
, DockerContainerRuntime>("docker");
505
_innerBuilder.Services.AddKeyedSingleton<
IContainerRuntime
, PodmanContainerRuntime>("podman");
511
string rt => sp.GetRequiredKeyedService<
IContainerRuntime
>(rt),
512
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)
1246
IContainerRuntime
? containerRuntime = null,
1278
builder.Services.AddSingleton<
IContainerRuntime
>(containerRuntime ?? new FakeContainerRuntime());
1279
builder.Services.AddSingleton<IAcrLoginService>(sp => new FakeAcrLoginService(sp.GetRequiredService<
IContainerRuntime
>()));
1715
builder.Services.AddSingleton<
IContainerRuntime
>(new FakeContainerRuntime());
1716
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);
662
builder.Services.AddSingleton<
IContainerRuntime
>(fakeRuntime);
679
private sealed class MockImageBuilderWithRuntime(
IContainerRuntime
runtime) : IResourceContainerImageManager
Aspire.Hosting.Tests (17)
ProjectResourceTests.cs (2)
845
builder.Services.AddSingleton<
IContainerRuntime
, FakeContainerRuntime>();
861
var fakeContainerRuntime = (FakeContainerRuntime)app.Services.GetRequiredService<
IContainerRuntime
>();
Publishing\ResourceContainerImageManagerTests.cs (15)
444
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
468
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
498
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
533
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
562
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
601
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", new FakeContainerRuntime(shouldFail: true));
637
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
698
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
807
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
853
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
1201
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
1253
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
1289
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
1322
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
1365
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);