13 instantiations of DockerfileBuildAnnotation
Aspire.Hosting (2)
ContainerResourceBuilderExtensions.cs (2)
600var annotation = new DockerfileBuildAnnotation(fullyQualifiedContextPath, fullyQualifiedDockerfilePath, stage); 745var annotation = new DockerfileBuildAnnotation(fullyQualifiedContextPath, tempDockerfilePath, stage)
Aspire.Hosting.Tests (11)
ApplicationModel\Docker\DockerfileBuildAnnotationTests.cs (8)
15var annotation = new DockerfileBuildAnnotation("/path/to/context", "/path/to/Dockerfile", "stage"); 29var annotation = new DockerfileBuildAnnotation("/context", "/dockerfile", null); 41var annotation = new DockerfileBuildAnnotation("/context", "/dockerfile", null); 57var annotation = new DockerfileBuildAnnotation("/context", "/dockerfile", null); 74var annotation = new DockerfileBuildAnnotation("/context", dockerfilePath, null); 105var annotation = new DockerfileBuildAnnotation("/context", dockerfilePath, null) 141var annotation = new DockerfileBuildAnnotation("/context", dockerfilePath, null) 181var annotation = new DockerfileBuildAnnotation("/context", dockerfilePath, null)
DistributedApplicationModelExtensionsTests.cs (2)
51containerWithDockerfile.Resource.Annotations.Add(new DockerfileBuildAnnotation("/context", "/Dockerfile", null)); 55buildOnlyContainer.Resource.Annotations.Add(new DockerfileBuildAnnotation("/context", "/Dockerfile", null) { HasEntrypoint = false });
Publishing\ResourceContainerImageManagerTests.cs (1)
1091var dockerfileBuildAnnotation = new DockerfileBuildAnnotation(tempContextPath, tempDockerfilePath, null)
129 references to DockerfileBuildAnnotation
Aspire.Hosting (24)
ApplicationModel\ResourceExtensions.cs (4)
868resource.Annotations.OfType<DockerfileBuildAnnotation>().SingleOrDefault() is { } buildAnnotation && 932return resource is ProjectResource || resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out _); 952return resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var dockerfileBuild) &&
ContainerResourceBuilderExtensions.cs (12)
302if (builder.Resource.Annotations.OfType<DockerfileBuildAnnotation>().SingleOrDefault() is { } buildAnnotation && 394if (builder.Resource.Annotations.OfType<DockerfileBuildAnnotation>().SingleOrDefault() is { } buildAnnotation) 600var annotation = new DockerfileBuildAnnotation(fullyQualifiedContextPath, fullyQualifiedDockerfilePath, stage); 606if (context.Resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var dockerfileAnnotation)) 745var annotation = new DockerfileBuildAnnotation(fullyQualifiedContextPath, tempDockerfilePath, stage) 754if (context.Resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var dockerfileAnnotation)) 1049var annotation = builder.Resource.Annotations.OfType<DockerfileBuildAnnotation>().SingleOrDefault(); 1149var annotation = builder.Resource.Annotations.OfType<DockerfileBuildAnnotation>().SingleOrDefault();
Dcp\DcpExecutor.cs (1)
2367if (modelContainerResource.Annotations.OfType<DockerfileBuildAnnotation>().SingleOrDefault() is { } dockerfileBuildAnnotation)
Publishing\ManifestPublishingContext.cs (2)
320if (container.Annotations.OfType<DockerfileBuildAnnotation>().Any()) 371if (container.TryGetAnnotationsOfType<DockerfileBuildAnnotation>(out var annotations) && annotations.Single() is { } annotation)
Publishing\ResourceContainerImageManager.cs (4)
267else if (resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var dockerfileBuildAnnotation)) 419private async Task BuildContainerImageFromDockerfileAsync(IResource resource, DockerfileBuildAnnotation dockerfileBuildAnnotation, string imageName, ResolvedContainerBuildOptions options, CancellationToken cancellationToken) 527resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out _))
Utils\DockerfileHelper.cs (1)
21DockerfileBuildAnnotation annotation,
Aspire.Hosting.Azure (2)
AzurePublishingContext.cs (2)
341if (resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var dockerfileBuildAnnotation) &&
Aspire.Hosting.Azure.AppContainers (1)
BaseContainerAppContext.cs (1)
93if (resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out _))
Aspire.Hosting.Azure.AppService (1)
AzureAppServiceInfrastructure.cs (1)
54if (resource is not ProjectResource && !(resource.IsContainer() && resource.TryGetAnnotationsOfType<DockerfileBuildAnnotation>(out _)))
Aspire.Hosting.Azure.Tests (4)
AzureContainerAppsTests.cs (2)
2111var dockerFileAnnotation = c.Resource.Annotations.OfType<DockerfileBuildAnnotation>().Single();
AzureDeployerTests.cs (2)
167var dockerFileAnnotation = c.Resource.Annotations.OfType<DockerfileBuildAnnotation>().Single();
Aspire.Hosting.Containers.Tests (34)
WithDockerfileTests.cs (34)
107Assert.True(dockerFile.Resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var buildAnnotation)); 131Assert.True(dockerFile.Resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var buildAnnotation)); 149Assert.True(dockerFile.Resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var buildAnnotation1)); 153Assert.True(dockerFile.Resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var buildAnnotation2)); 170Assert.True(dockerFile.Resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var buildAnnotation1)); 174Assert.True(dockerFile.Resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var buildAnnotation2)); 637var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 652var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 668var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 683var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 699var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 714var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 730var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 745var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 769var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 820var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 870var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>());
Aspire.Hosting.Docker (3)
DockerComposePublishingContext.cs (2)
86if (serviceResource.TargetResource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var dockerfileBuildAnnotation) &&
DockerComposeServiceResource.cs (1)
139if (resourceInstance.TryGetLastAnnotation<DockerfileBuildAnnotation>(out _) || resourceInstance is ProjectResource)
Aspire.Hosting.JavaScript (2)
JavaScriptHostingExtensions.cs (2)
456if (resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var dockerFileAnnotation))
Aspire.Hosting.JavaScript.Tests (6)
AddJavaScriptAppTests.cs (2)
42var dockerBuildAnnotation = yarnApp.Resource.Annotations.OfType<DockerfileBuildAnnotation>().Single();
AddNodeAppTests.cs (2)
157var dockerBuildAnnotation = nodeApp.Resource.Annotations.OfType<DockerfileBuildAnnotation>().Single();
AddViteAppTests.cs (2)
70var dockerBuildAnnotation = nodeApp.Resource.Annotations.OfType<DockerfileBuildAnnotation>().Single();
Aspire.Hosting.Kubernetes (3)
KubernetesPublishingContext.cs (2)
74if (serviceResource.TargetResource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var dockerfileBuildAnnotation) &&
KubernetesResource.cs (1)
138if (!resourceInstance.TryGetLastAnnotation<DockerfileBuildAnnotation>(out _) && resourceInstance is not ProjectResource)
Aspire.Hosting.Tests (35)
ApplicationModel\Docker\DockerfileBuildAnnotationTests.cs (8)
15var annotation = new DockerfileBuildAnnotation("/path/to/context", "/path/to/Dockerfile", "stage"); 29var annotation = new DockerfileBuildAnnotation("/context", "/dockerfile", null); 41var annotation = new DockerfileBuildAnnotation("/context", "/dockerfile", null); 57var annotation = new DockerfileBuildAnnotation("/context", "/dockerfile", null); 74var annotation = new DockerfileBuildAnnotation("/context", dockerfilePath, null); 105var annotation = new DockerfileBuildAnnotation("/context", dockerfilePath, null) 141var annotation = new DockerfileBuildAnnotation("/context", dockerfilePath, null) 181var annotation = new DockerfileBuildAnnotation("/context", dockerfilePath, null)
ApplicationModel\Docker\WithDockerfileBuilderTests.cs (20)
70var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 91var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 143var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 179var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 213var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 254var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 333var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 369var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 401var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 435var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault();
Publishing\ResourceContainerImageManagerTests.cs (7)
871var annotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().Single(); 1070var dockerfileBuildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().Single(); 1091var dockerfileBuildAnnotation = new DockerfileBuildAnnotation(tempContextPath, tempDockerfilePath, null) 1102if (context.Resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var dockerfileAnnotation))
Aspire.Hosting.Yarp.Tests (14)
AddYarpTests.cs (14)
191var annotation = Assert.Single(yarp.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 204var annotation = Assert.Single(yarp.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 238Assert.Empty(yarp.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 265Assert.Single(yarp.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 282var buildAnnotation = Assert.Single(yarp.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 312var buildAnnotation = Assert.Single(yarp.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 345var buildAnnotation = Assert.Single(yarp.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 383var buildAnnotation = Assert.Single(yarp.Resource.Annotations.OfType<DockerfileBuildAnnotation>());