65 references to TryGetLastAnnotation
Aspire.Hosting (6)
ApplicationModel\CommandsConfigurationExtensions.cs (1)
14if (resource.TryGetLastAnnotation<ExcludeLifecycleCommandsAnnotation>(out _))
ApplicationModel\ResourceExtensions.cs (3)
551if (resource.TryGetLastAnnotation<ContainerLifetimeAnnotation>(out var lifetimeAnnotation)) 567if (resource.TryGetLastAnnotation<ContainerImagePullPolicyAnnotation>(out var pullPolicyAnnotation)) 586return !resource.TryGetLastAnnotation<ProxySupportAnnotation>(out var proxySupportAnnotation) || proxySupportAnnotation.ProxyEnabled;
Dcp\DcpNameGenerator.cs (1)
118if (resource.TryGetLastAnnotation<ContainerNameAnnotation>(out var containerNameAnnotation))
Publishing\ManifestPublishingContext.cs (1)
94if (resource.TryGetLastAnnotation<ManifestPublishingCallbackAnnotation>(out var manifestPublishingCallbackAnnotation))
Aspire.Hosting.Azure.AppContainers (2)
AzureContainerAppsInfrastructure.cs (2)
45if (r.TryGetLastAnnotation<ManifestPublishingCallbackAnnotation>(out var lastAnnotation) && lastAnnotation == ManifestPublishingCallbackAnnotation.Ignore) 234if (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 _)) 131if (!projectResource.TryGetLastAnnotation<DefaultLaunchProfileAnnotation>(out var launchProfileAnnotation)) 157if (projectResource.TryGetLastAnnotation<LaunchProfileAnnotation>(out var launchProfileAnnotation)) 172if (projectResource.TryGetLastAnnotation<ExcludeLaunchProfileAnnotation>(out _))
Aspire.Hosting.Azure.Tests (40)
AzureBicepResourceTests.cs (4)
1315Assert.True(sql.Resource.TryGetLastAnnotation<ConnectionStringRedirectAnnotation>(out var connectionStringAnnotation)); 1409Assert.True(sql.Resource.TryGetLastAnnotation<ConnectionStringRedirectAnnotation>(out var connectionStringAnnotation)); 1493Assert.True(postgres.Resource.TryGetLastAnnotation<ConnectionStringRedirectAnnotation>(out var connectionStringAnnotation)); 1611Assert.True(postgres.Resource.TryGetLastAnnotation<ConnectionStringRedirectAnnotation>(out var connectionStringAnnotation));
AzureContainerAppsTests.cs (19)
37container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 133container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 237container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 379container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 490container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 606container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 709container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 836container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 1097container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 1195container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 1313container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 1436container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 1559container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 1711container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 1869container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 1958container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 2056container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 2161container.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target); 2259project.TryGetLastAnnotation<DeploymentTargetAnnotation>(out var target);
AzureEventHubsExtensionsTests.cs (2)
549serviceBus.Resource.TryGetLastAnnotation<ContainerLifetimeAnnotation>(out var sbLifetimeAnnotation); 550azurite.TryGetLastAnnotation<ContainerLifetimeAnnotation>(out var sqlLifetimeAnnotation);
AzureFunctionsTests.cs (7)
37Assert.True(functionsResource.TryGetLastAnnotation<EndpointAnnotation>(out var endpointAnnotation)); 65Assert.True(functionsResource.TryGetLastAnnotation<EndpointAnnotation>(out var endpointAnnotation)); 88Assert.True(functionsResource.TryGetLastAnnotation<EndpointAnnotation>(out var endpointAnnotation)); 102Assert.True(functionsResource.TryGetLastAnnotation<EndpointAnnotation>(out var endpointAnnotation)); 116Assert.True(functionsResource.TryGetLastAnnotation<EndpointAnnotation>(out var endpointAnnotation)); 195Assert.True(functionsResource.TryGetLastAnnotation<EndpointAnnotation>(out var endpointAnnotation)); 239Assert.True(functionsResource.TryGetLastAnnotation<EndpointAnnotation>(out var endpointAnnotation));
AzureServiceBusExtensionsTests.cs (2)
730serviceBus.Resource.TryGetLastAnnotation<ContainerLifetimeAnnotation>(out var sbLifetimeAnnotation); 731sql.TryGetLastAnnotation<ContainerLifetimeAnnotation>(out var sqlLifetimeAnnotation);
ExistingAzureResourceExtensionsTests.cs (6)
37Assert.True(serviceBus.Resource.TryGetLastAnnotation<ExistingAzureResourceAnnotation>(out var existingAzureResourceAnnotation)); 58Assert.True(serviceBus.Resource.TryGetLastAnnotation<ExistingAzureResourceAnnotation>(out var existingAzureResourceAnnotation)); 76Assert.True(serviceBus.Resource.TryGetLastAnnotation<ExistingAzureResourceAnnotation>(out var existingAzureResourceAnnotation)); 97Assert.True(serviceBus.Resource.TryGetLastAnnotation<ExistingAzureResourceAnnotation>(out var existingAzureResourceAnnotation)); 117Assert.True(serviceBus.Resource.TryGetLastAnnotation<ExistingAzureResourceAnnotation>(out var existingAzureResourceAnnotation)); 135Assert.True(serviceBus.Resource.TryGetLastAnnotation<ExistingAzureResourceAnnotation>(out var existingAzureResourceAnnotation));
Aspire.Hosting.Containers.Tests (7)
ContainerResourceTests.cs (1)
215Assert.True(containerResource.TryGetLastAnnotation<ContainerMountAnnotation>(out var mountAnnotation));
WithDockerfileTests.cs (6)
100Assert.True(dockerFile.Resource.TryGetLastAnnotation<ContainerImageAnnotation>(out var containerImageAnnotation)); 119Assert.True(dockerFile.Resource.TryGetLastAnnotation<ContainerImageAnnotation>(out var containerImageAnnotation)); 133Assert.True(dockerFile.Resource.TryGetLastAnnotation<ContainerImageAnnotation>(out var containerImageAnnotation1)); 137Assert.True(dockerFile.Resource.TryGetLastAnnotation<ContainerImageAnnotation>(out var containerImageAnnotation2)); 154Assert.True(dockerFile.Resource.TryGetLastAnnotation<ContainerImageAnnotation>(out var containerImageAnnotation1)); 158Assert.True(dockerFile.Resource.TryGetLastAnnotation<ContainerImageAnnotation>(out var containerImageAnnotation2));
Aspire.Hosting.PostgreSQL (2)
PostgresServerResource.cs (2)
60if (this.TryGetLastAnnotation<ConnectionStringRedirectAnnotation>(out var connectionStringAnnotation)) 76if (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 (1)
PublishAsConnectionStringTests.cs (1)
19Assert.True(redis.Resource.TryGetLastAnnotation<ManifestPublishingCallbackAnnotation>(out _));