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)
503
_innerBuilder.Services.AddKeyedSingleton<
IContainerRuntime
, DockerContainerRuntime>("docker");
504
_innerBuilder.Services.AddKeyedSingleton<
IContainerRuntime
, PodmanContainerRuntime>("podman");
510
string rt => sp.GetRequiredKeyedService<
IContainerRuntime
>(rt),
511
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)
1208
IContainerRuntime
? containerRuntime = null,
1240
builder.Services.AddSingleton<
IContainerRuntime
>(containerRuntime ?? new FakeContainerRuntime());
1241
builder.Services.AddSingleton<IAcrLoginService>(sp => new FakeAcrLoginService(sp.GetRequiredService<
IContainerRuntime
>()));
1629
builder.Services.AddSingleton<
IContainerRuntime
>(new FakeContainerRuntime());
1630
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);
664
builder.Services.AddSingleton<
IContainerRuntime
>(fakeRuntime);
681
private sealed class MockImageBuilderWithRuntime(
IContainerRuntime
runtime) : IResourceContainerImageManager
Aspire.Hosting.Tests (16)
ProjectResourceTests.cs (2)
845
builder.Services.AddSingleton<
IContainerRuntime
, FakeContainerRuntime>();
861
var fakeContainerRuntime = (FakeContainerRuntime)app.Services.GetRequiredService<
IContainerRuntime
>();
Publishing\ResourceContainerImageManagerTests.cs (14)
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);
602
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", new FakeContainerRuntime(shouldFail: true));
638
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
698
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
807
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
1094
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
1146
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
1182
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
1215
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);
1258
builder.Services.AddKeyedSingleton<
IContainerRuntime
>("docker", fakeContainerRuntime);