82 references to TryGetLastAnnotation
Aspire.Hosting (8)
ApplicationModel\CommandsConfigurationExtensions.cs (1)
14
if (resource.
TryGetLastAnnotation
<ExcludeLifecycleCommandsAnnotation>(out _))
ApplicationModel\ResourceExtensions.cs (3)
621
if (resource.
TryGetLastAnnotation
<ContainerLifetimeAnnotation>(out var lifetimeAnnotation))
637
if (resource.
TryGetLastAnnotation
<ContainerImagePullPolicyAnnotation>(out var pullPolicyAnnotation))
656
return !resource.
TryGetLastAnnotation
<ProxySupportAnnotation>(out var proxySupportAnnotation) || proxySupportAnnotation.ProxyEnabled;
Dcp\DcpNameGenerator.cs (1)
118
if (resource.
TryGetLastAnnotation
<ContainerNameAnnotation>(out var containerNameAnnotation))
Publishing\ManifestPublishingContext.cs (1)
94
if (resource.
TryGetLastAnnotation
<ManifestPublishingCallbackAnnotation>(out var manifestPublishingCallbackAnnotation))
Publishing\ResourceContainerImageBuilder.cs (2)
49
else if (resource.
TryGetLastAnnotation
<ContainerImageAnnotation>(out var containerImageAnnotation))
84
if (!resource.
TryGetLastAnnotation
<IProjectMetadata>(out var projectMetadata))
Aspire.Hosting.Azure (1)
AzureResourcePreparer.cs (1)
128
if (resource.
TryGetLastAnnotation
<ManifestPublishingCallbackAnnotation>(out var lastAnnotation) && lastAnnotation == ManifestPublishingCallbackAnnotation.Ignore)
Aspire.Hosting.Azure.AppContainers (2)
AzureContainerAppsInfrastructure.cs (1)
47
if (r.
TryGetLastAnnotation
<ManifestPublishingCallbackAnnotation>(out var lastAnnotation) && lastAnnotation == ManifestPublishingCallbackAnnotation.Ignore)
ContainerAppContext.cs (1)
166
if (resource.
TryGetLastAnnotation
<DockerfileBuildAnnotation>(out _))
Aspire.Hosting.Azure.Functions (5)
src\Shared\LaunchProfiles\LaunchProfileExtensions.cs (5)
16
if (!projectResource.
TryGetLastAnnotation
<IProjectMetadata>(out var projectMetadata))
23
if (projectResource.
TryGetLastAnnotation
<ExcludeLaunchProfileAnnotation>(out _))
131
if (!projectResource.
TryGetLastAnnotation
<DefaultLaunchProfileAnnotation>(out var launchProfileAnnotation))
157
if (projectResource.
TryGetLastAnnotation
<LaunchProfileAnnotation>(out var launchProfileAnnotation))
172
if (projectResource.
TryGetLastAnnotation
<ExcludeLaunchProfileAnnotation>(out _))
Aspire.Hosting.Azure.Tests (49)
AzureBicepResourceTests.cs (4)
1290
Assert.True(sql.Resource.
TryGetLastAnnotation
<ConnectionStringRedirectAnnotation>(out var connectionStringAnnotation));
1386
Assert.True(sql.Resource.
TryGetLastAnnotation
<ConnectionStringRedirectAnnotation>(out var connectionStringAnnotation));
1472
Assert.True(postgres.Resource.
TryGetLastAnnotation
<ConnectionStringRedirectAnnotation>(out var connectionStringAnnotation));
1590
Assert.True(postgres.Resource.
TryGetLastAnnotation
<ConnectionStringRedirectAnnotation>(out var connectionStringAnnotation));
AzureContainerAppsTests.cs (20)
43
container.
TryGetLastAnnotation
<DeploymentTargetAnnotation>(out var target);
124
container.
TryGetLastAnnotation
<DeploymentTargetAnnotation>(out var target);
580
container.
TryGetLastAnnotation
<DeploymentTargetAnnotation>(out var target);
670
container.
TryGetLastAnnotation
<DeploymentTargetAnnotation>(out var target);
783
proj.
TryGetLastAnnotation
<DeploymentTargetAnnotation>(out var target);
1121
proj.
TryGetLastAnnotation
<DeploymentTargetAnnotation>(out var target);
1218
container.
TryGetLastAnnotation
<DeploymentTargetAnnotation>(out var target);
1301
container.
TryGetLastAnnotation
<DeploymentTargetAnnotation>(out var target);
1404
container.
TryGetLastAnnotation
<DeploymentTargetAnnotation>(out var target);
1512
container.
TryGetLastAnnotation
<DeploymentTargetAnnotation>(out var target);
1620
container.
TryGetLastAnnotation
<DeploymentTargetAnnotation>(out var target);
1759
container.
TryGetLastAnnotation
<DeploymentTargetAnnotation>(out var target);
1974
container.
TryGetLastAnnotation
<DeploymentTargetAnnotation>(out var target);
2049
container.
TryGetLastAnnotation
<DeploymentTargetAnnotation>(out var target);
2132
container.
TryGetLastAnnotation
<DeploymentTargetAnnotation>(out var target);
2222
container.
TryGetLastAnnotation
<DeploymentTargetAnnotation>(out var target);
2305
project.
TryGetLastAnnotation
<DeploymentTargetAnnotation>(out var target);
2446
project.
TryGetLastAnnotation
<DeploymentTargetAnnotation>(out var target);
2650
project.
TryGetLastAnnotation
<DeploymentTargetAnnotation>(out var target);
2863
project.
TryGetLastAnnotation
<DeploymentTargetAnnotation>(out var target);
AzureEventHubsExtensionsTests.cs (2)
578
serviceBus.Resource.
TryGetLastAnnotation
<ContainerLifetimeAnnotation>(out var sbLifetimeAnnotation);
579
azurite.
TryGetLastAnnotation
<ContainerLifetimeAnnotation>(out var sqlLifetimeAnnotation);
AzureFunctionsTests.cs (7)
40
Assert.True(functionsResource.
TryGetLastAnnotation
<EndpointAnnotation>(out var endpointAnnotation));
68
Assert.True(functionsResource.
TryGetLastAnnotation
<EndpointAnnotation>(out var endpointAnnotation));
91
Assert.True(functionsResource.
TryGetLastAnnotation
<EndpointAnnotation>(out var endpointAnnotation));
105
Assert.True(functionsResource.
TryGetLastAnnotation
<EndpointAnnotation>(out var endpointAnnotation));
119
Assert.True(functionsResource.
TryGetLastAnnotation
<EndpointAnnotation>(out var endpointAnnotation));
198
Assert.True(functionsResource.
TryGetLastAnnotation
<EndpointAnnotation>(out var endpointAnnotation));
242
Assert.True(functionsResource.
TryGetLastAnnotation
<EndpointAnnotation>(out var endpointAnnotation));
AzureResourcePreparerTests.cs (6)
65
Assert.True(storage.Resource.
TryGetLastAnnotation
<DefaultRoleAssignmentsAnnotation>(out var defaultAssignments));
126
Assert.True(api.Resource.
TryGetLastAnnotation
<RoleAssignmentAnnotation>(out var apiRoleAssignments));
212
Assert.True(api.Resource.
TryGetLastAnnotation
<RoleAssignmentAnnotation>(out var apiRoleAssignments));
218
Assert.True(api2.Resource.
TryGetLastAnnotation
<RoleAssignmentAnnotation>(out var api2RoleAssignments));
245
Assert.True(storage.Resource.
TryGetLastAnnotation
<DefaultRoleAssignmentsAnnotation>(out var defaultAssignments));
247
Assert.True(api.Resource.
TryGetLastAnnotation
<RoleAssignmentAnnotation>(out var apiRoleAssignments));
AzureServiceBusExtensionsTests.cs (2)
713
serviceBus.Resource.
TryGetLastAnnotation
<ContainerLifetimeAnnotation>(out var sbLifetimeAnnotation);
714
sql.
TryGetLastAnnotation
<ContainerLifetimeAnnotation>(out var sqlLifetimeAnnotation);
ContainerRegistryTests.cs (2)
63
project.
TryGetLastAnnotation
<DeploymentTargetAnnotation>(out var target);
159
if (resource.
TryGetLastAnnotation
<DeploymentTargetAnnotation>(out var annotation) &&
ExistingAzureResourceExtensionsTests.cs (6)
37
Assert.True(serviceBus.Resource.
TryGetLastAnnotation
<ExistingAzureResourceAnnotation>(out var existingAzureResourceAnnotation));
58
Assert.True(serviceBus.Resource.
TryGetLastAnnotation
<ExistingAzureResourceAnnotation>(out var existingAzureResourceAnnotation));
76
Assert.True(serviceBus.Resource.
TryGetLastAnnotation
<ExistingAzureResourceAnnotation>(out var existingAzureResourceAnnotation));
97
Assert.True(serviceBus.Resource.
TryGetLastAnnotation
<ExistingAzureResourceAnnotation>(out var existingAzureResourceAnnotation));
117
Assert.True(serviceBus.Resource.
TryGetLastAnnotation
<ExistingAzureResourceAnnotation>(out var existingAzureResourceAnnotation));
135
Assert.True(serviceBus.Resource.
TryGetLastAnnotation
<ExistingAzureResourceAnnotation>(out var existingAzureResourceAnnotation));
Aspire.Hosting.Containers.Tests (7)
ContainerResourceTests.cs (1)
219
Assert.True(containerResource.
TryGetLastAnnotation
<ContainerMountAnnotation>(out var mountAnnotation));
WithDockerfileTests.cs (6)
100
Assert.True(dockerFile.Resource.
TryGetLastAnnotation
<ContainerImageAnnotation>(out var containerImageAnnotation));
119
Assert.True(dockerFile.Resource.
TryGetLastAnnotation
<ContainerImageAnnotation>(out var containerImageAnnotation));
133
Assert.True(dockerFile.Resource.
TryGetLastAnnotation
<ContainerImageAnnotation>(out var containerImageAnnotation1));
137
Assert.True(dockerFile.Resource.
TryGetLastAnnotation
<ContainerImageAnnotation>(out var containerImageAnnotation2));
154
Assert.True(dockerFile.Resource.
TryGetLastAnnotation
<ContainerImageAnnotation>(out var containerImageAnnotation1));
158
Assert.True(dockerFile.Resource.
TryGetLastAnnotation
<ContainerImageAnnotation>(out var containerImageAnnotation2));
Aspire.Hosting.Docker (2)
DockerComposeInfrastructure.cs (1)
44
if (r.
TryGetLastAnnotation
<ManifestPublishingCallbackAnnotation>(out var lastAnnotation) && lastAnnotation == ManifestPublishingCallbackAnnotation.Ignore)
DockerComposeServiceResource.cs (1)
97
if (resourceInstance.
TryGetLastAnnotation
<DockerfileBuildAnnotation>(out _) || resourceInstance is ProjectResource)
Aspire.Hosting.Kubernetes (2)
KubernetesInfrastructure.cs (1)
44
if (r.
TryGetLastAnnotation
<ManifestPublishingCallbackAnnotation>(out var lastAnnotation) && lastAnnotation == ManifestPublishingCallbackAnnotation.Ignore)
KubernetesResource.cs (1)
131
if (!resourceInstance.
TryGetLastAnnotation
<DockerfileBuildAnnotation>(out _) && resourceInstance is not ProjectResource)
Aspire.Hosting.PostgreSQL (2)
PostgresServerResource.cs (2)
60
if (this.
TryGetLastAnnotation
<ConnectionStringRedirectAnnotation>(out var connectionStringAnnotation))
76
if (this.
TryGetLastAnnotation
<ConnectionStringRedirectAnnotation>(out var connectionStringAnnotation))
Aspire.Hosting.SqlServer (2)
SqlServerServerResource.cs (2)
47
if (this.
TryGetLastAnnotation
<ConnectionStringRedirectAnnotation>(out var connectionStringAnnotation))
63
if (this.
TryGetLastAnnotation
<ConnectionStringRedirectAnnotation>(out var connectionStringAnnotation))
Aspire.Hosting.Tests (1)
PublishAsConnectionStringTests.cs (1)
19
Assert.True(redis.Resource.
TryGetLastAnnotation
<ManifestPublishingCallbackAnnotation>(out _));
AzureContainerApps.AppHost (1)
Program.cs (1)
50
if (context.Resource.
TryGetLastAnnotation
<AppIdentityAnnotation>(out var identity))