6 instantiations of DockerfileBuildAnnotation
Aspire.Hosting (2)
ContainerResourceBuilderExtensions.cs (2)
554var annotation = new DockerfileBuildAnnotation(fullyQualifiedContextPath, fullyQualifiedDockerfilePath, stage); 671var annotation = new DockerfileBuildAnnotation(fullyQualifiedContextPath, tempDockerfilePath, stage)
Aspire.Hosting.Tests (4)
ApplicationModel\Docker\DockerfileBuildAnnotationTests.cs (4)
14var annotation = new DockerfileBuildAnnotation("/path/to/context", "/path/to/Dockerfile", "stage"); 28var annotation = new DockerfileBuildAnnotation("/context", "/dockerfile", null); 40var annotation = new DockerfileBuildAnnotation("/context", "/dockerfile", null); 56var annotation = new DockerfileBuildAnnotation("/context", "/dockerfile", null);
114 references to DockerfileBuildAnnotation
Aspire.Hosting (20)
ApplicationModel\ResourceExtensions.cs (4)
764resource.Annotations.OfType<DockerfileBuildAnnotation>().SingleOrDefault() is { } buildAnnotation && 822return resource is ProjectResource || resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out _); 841return resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var dockerfileBuild) &&
ContainerResourceBuilderExtensions.cs (8)
268if (builder.Resource.Annotations.OfType<DockerfileBuildAnnotation>().SingleOrDefault() is { } buildAnnotation && 358if (builder.Resource.Annotations.OfType<DockerfileBuildAnnotation>().SingleOrDefault() is { } buildAnnotation) 554var annotation = new DockerfileBuildAnnotation(fullyQualifiedContextPath, fullyQualifiedDockerfilePath, stage); 671var annotation = new DockerfileBuildAnnotation(fullyQualifiedContextPath, tempDockerfilePath, stage) 942var annotation = builder.Resource.Annotations.OfType<DockerfileBuildAnnotation>().SingleOrDefault(); 1040var annotation = builder.Resource.Annotations.OfType<DockerfileBuildAnnotation>().SingleOrDefault();
Dcp\DcpExecutor.cs (1)
1816if (modelContainerResource.Annotations.OfType<DockerfileBuildAnnotation>().SingleOrDefault() is { } dockerfileBuildAnnotation)
Publishing\ManifestPublishingContext.cs (2)
280if (container.Annotations.OfType<DockerfileBuildAnnotation>().Any()) 328if (container.TryGetAnnotationsOfType<DockerfileBuildAnnotation>(out var annotations) && annotations.Single() is { } annotation)
Publishing\ResourceContainerImageBuilder.cs (4)
189else if (resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var dockerfileBuildAnnotation)) 341private async Task BuildContainerImageFromDockerfileAsync(IResource resource, DockerfileBuildAnnotation dockerfileBuildAnnotation, string imageName, ContainerBuildOptions? options, CancellationToken cancellationToken) 437resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out _));
Utils\DockerfileHelper.cs (1)
21DockerfileBuildAnnotation annotation,
Aspire.Hosting.Azure (2)
AzurePublishingContext.cs (2)
309if (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)
44if (resource is not ProjectResource && !(resource.IsContainer() && resource.TryGetAnnotationsOfType<DockerfileBuildAnnotation>(out _)))
Aspire.Hosting.Azure.Tests (4)
AzureContainerAppsTests.cs (2)
1981var dockerFileAnnotation = c.Resource.Annotations.OfType<DockerfileBuildAnnotation>().Single();
AzureDeployerTests.cs (2)
140var dockerFileAnnotation = c.Resource.Annotations.OfType<DockerfileBuildAnnotation>().Single();
Aspire.Hosting.Containers.Tests (34)
WithDockerfileTests.cs (34)
109Assert.True(dockerFile.Resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var buildAnnotation)); 133Assert.True(dockerFile.Resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var buildAnnotation)); 151Assert.True(dockerFile.Resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var buildAnnotation1)); 155Assert.True(dockerFile.Resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var buildAnnotation2)); 172Assert.True(dockerFile.Resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var buildAnnotation1)); 176Assert.True(dockerFile.Resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var buildAnnotation2)); 643var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 658var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 674var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 689var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 705var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 720var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 736var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 751var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 775var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 821var annotation = Assert.Single(container.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 871var 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)
97if (resourceInstance.TryGetLastAnnotation<DockerfileBuildAnnotation>(out _) || resourceInstance is ProjectResource)
Aspire.Hosting.Kubernetes (3)
KubernetesPublishingContext.cs (2)
74if (serviceResource.TargetResource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var dockerfileBuildAnnotation) &&
KubernetesResource.cs (1)
135if (!resourceInstance.TryGetLastAnnotation<DockerfileBuildAnnotation>(out _) && resourceInstance is not ProjectResource)
Aspire.Hosting.NodeJs (2)
NodeExtensions.cs (2)
350if (resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out var dockerFileAnnotation))
Aspire.Hosting.NodeJs.Tests (6)
AddJavaScriptAppTests.cs (2)
39var dockerBuildAnnotation = yarnApp.Resource.Annotations.OfType<DockerfileBuildAnnotation>().Single();
AddNodeAppTests.cs (2)
129var dockerBuildAnnotation = nodeApp.Resource.Annotations.OfType<DockerfileBuildAnnotation>().Single();
AddViteAppTests.cs (2)
66var dockerBuildAnnotation = nodeApp.Resource.Annotations.OfType<DockerfileBuildAnnotation>().Single();
Aspire.Hosting.Tests (24)
ApplicationModel\Docker\DockerfileBuildAnnotationTests.cs (4)
14var annotation = new DockerfileBuildAnnotation("/path/to/context", "/path/to/Dockerfile", "stage"); 28var annotation = new DockerfileBuildAnnotation("/context", "/dockerfile", null); 40var annotation = new DockerfileBuildAnnotation("/context", "/dockerfile", null); 56var annotation = new DockerfileBuildAnnotation("/context", "/dockerfile", null);
ApplicationModel\Docker\WithDockerfileBuilderTests.cs (20)
69var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 90var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 142var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 178var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 212var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 253var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 332var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 368var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 400var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault(); 434var buildAnnotation = container.Resource.Annotations.OfType<DockerfileBuildAnnotation>().LastOrDefault();
Aspire.Hosting.Yarp.Tests (14)
AddYarpTests.cs (14)
177var annotation = Assert.Single(yarp.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 190var annotation = Assert.Single(yarp.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 224Assert.Empty(yarp.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 251Assert.Single(yarp.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 268var buildAnnotation = Assert.Single(yarp.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 298var buildAnnotation = Assert.Single(yarp.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 331var buildAnnotation = Assert.Single(yarp.Resource.Annotations.OfType<DockerfileBuildAnnotation>()); 369var buildAnnotation = Assert.Single(yarp.Resource.Annotations.OfType<DockerfileBuildAnnotation>());