45 references to TryGetLastAnnotation
Aspire.Hosting (5)
ApplicationModel\CommandsConfigurationExtensions.cs (1)
17if (resource.TryGetLastAnnotation<ExcludeLifecycleCommandsAnnotation>(out _))
ApplicationModel\ResourceExtensions.cs (1)
330if (resource.TryGetLastAnnotation<ContainerLifetimeAnnotation>(out var lifetimeAnnotation))
Dcp\ApplicationExecutor.cs (1)
1944if (resource.TryGetLastAnnotation<ContainerNameAnnotation>(out var containerNameAnnotation))
Dcp\DcpNameGenerator.cs (1)
90if (resource.TryGetLastAnnotation<ContainerNameAnnotation>(out var containerNameAnnotation))
Publishing\ManifestPublishingContext.cs (1)
92if (resource.TryGetLastAnnotation<ManifestPublishingCallbackAnnotation>(out var manifestPublishingCallbackAnnotation))
Aspire.Hosting.Azure.AppContainers (2)
AzureContainerAppsInfrastructure.cs (2)
45if (r.TryGetLastAnnotation<ManifestPublishingCallbackAnnotation>(out var lastAnnotation) && lastAnnotation == ManifestPublishingCallbackAnnotation.Ignore) 235if (resource.TryGetLastAnnotation<DockerfileBuildAnnotation>(out _))
Aspire.Hosting.Azure.Functions (5)
src\Shared\LaunchProfiles\LaunchProfileExtensions.cs (5)
16if (!projectResource.TryGetLastAnnotation<IProjectMetadata>(out var projectMetadata)) 23if (projectResource.TryGetLastAnnotation<ExcludeLaunchProfileAnnotation>(out _)) 120if (!projectResource.TryGetLastAnnotation<DefaultLaunchProfileAnnotation>(out var launchProfileAnnotation)) 146if (projectResource.TryGetLastAnnotation<LaunchProfileAnnotation>(out var launchProfileAnnotation)) 161if (projectResource.TryGetLastAnnotation<ExcludeLaunchProfileAnnotation>(out _))
Aspire.Hosting.Azure.Tests (23)
AzureBicepResourceTests.cs (4)
1108Assert.True(sql.Resource.TryGetLastAnnotation<ConnectionStringRedirectAnnotation>(out var connectionStringAnnotation)); 1202Assert.True(sql.Resource.TryGetLastAnnotation<ConnectionStringRedirectAnnotation>(out var connectionStringAnnotation)); 1286Assert.True(postgres.Resource.TryGetLastAnnotation<ConnectionStringRedirectAnnotation>(out var connectionStringAnnotation)); 1404Assert.True(postgres.Resource.TryGetLastAnnotation<ConnectionStringRedirectAnnotation>(out var connectionStringAnnotation));
AzureContainerAppsTests.cs (14)
37container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 133container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 237container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 381container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 522container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 777container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 875container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 987container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 1138container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 1296container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 1385container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 1483container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 1588container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 1686project.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target);
AzureFunctionsTests.cs (5)
36Assert.True(functionsResource.TryGetLastAnnotation<EndpointAnnotation>(out var endpointAnnotation)); 51Assert.True(functionsResource.TryGetLastAnnotation<EndpointAnnotation>(out var endpointAnnotation)); 65Assert.True(functionsResource.TryGetLastAnnotation<EndpointAnnotation>(out var endpointAnnotation)); 79Assert.True(functionsResource.TryGetLastAnnotation<EndpointAnnotation>(out var endpointAnnotation)); 93Assert.True(functionsResource.TryGetLastAnnotation<EndpointAnnotation>(out var endpointAnnotation));
Aspire.Hosting.Containers.Tests (1)
ContainerResourceTests.cs (1)
175Assert.True(containerResource.TryGetLastAnnotation<ContainerMountAnnotation>(out var mountAnnotation));
Aspire.Hosting.Dapr (1)
DaprDistributedApplicationLifecycleHook.cs (1)
49if (!resource.TryGetLastAnnotation<DaprSidecarAnnotation>(out var daprAnnotation))
Aspire.Hosting.PostgreSQL (2)
PostgresServerResource.cs (2)
63if (this.TryGetLastAnnotation<ConnectionStringRedirectAnnotation>(out var connectionStringAnnotation)) 79if (this.TryGetLastAnnotation<ConnectionStringRedirectAnnotation>(out var connectionStringAnnotation))
Aspire.Hosting.SqlServer (2)
SqlServerServerResource.cs (2)
47if (this.TryGetLastAnnotation<ConnectionStringRedirectAnnotation>(out var connectionStringAnnotation)) 63if (this.TryGetLastAnnotation<ConnectionStringRedirectAnnotation>(out var connectionStringAnnotation))
Aspire.Hosting.Tests (4)
PublishAsConnectionStringTests.cs (1)
19Assert.True(redis.Resource.TryGetLastAnnotation<ManifestPublishingCallbackAnnotation>(out _));
PublishAsDockerfileTests.cs (3)
20Assert.True(frontend.Resource.TryGetLastAnnotation<ManifestPublishingCallbackAnnotation>(out _)); 55Assert.True(frontend.Resource.TryGetLastAnnotation<ManifestPublishingCallbackAnnotation>(out _)); 93Assert.True(frontend.Resource.TryGetLastAnnotation<ManifestPublishingCallbackAnnotation>(out _));