37 references to TryGetAnnotationsOfType
Aspire.Hosting (11)
ApplicationModel\ResourceExtensions.cs (5)
103return TryGetAnnotationsOfType(resource, out result); 147return TryGetAnnotationsOfType(resource, out environmentVariables); 230return TryGetAnnotationsOfType<ContainerMountAnnotation>(resource, out volumeMounts); 241return TryGetAnnotationsOfType(resource, out endpoints); 251if (TryGetAnnotationsOfType<EndpointAnnotation>(resource, out var endpoints))
Dcp\ApplicationExecutor.cs (3)
1328if (er.ModelResource.TryGetAnnotationsOfType<CommandLineArgsCallbackAnnotation>(out var exeArgsCallbacks)) 1683if (modelContainerResource.TryGetAnnotationsOfType<ContainerRuntimeArgsCallbackAnnotation>(out var runArgsCallback)) 1714if (modelContainerResource.TryGetAnnotationsOfType<CommandLineArgsCallbackAnnotation>(out var argsCallback))
Publishing\ManifestPublishingContext.cs (2)
489if (resource.TryGetAnnotationsOfType<EnvironmentCallbackAnnotation>(out var callbacks)) 524if (resource.TryGetAnnotationsOfType<CommandLineArgsCallbackAnnotation>(out var argsCallback))
ResourceBuilderExtensions.cs (1)
601if (!builder.Resource.TryGetAnnotationsOfType<EndpointAnnotation>(out var endpoints))
Aspire.Hosting.Azure.Tests (8)
AzurePostgresExtensionsTests.cs (3)
375Assert.True(postgresResourceInModel.TryGetAnnotationsOfType<Dummy1Annotation>(out var postgresAnnotations1)); 378Assert.True(postgresResourceInModel.TryGetAnnotationsOfType<Dummy2Annotation>(out var postgresAnnotations2)); 381Assert.True(dbResourceInModel.TryGetAnnotationsOfType<Dummy1Annotation>(out var dbAnnotations));
AzureRedisExtensionsTests.cs (2)
183Assert.True(cacheInModel.TryGetAnnotationsOfType<Dummy1Annotation>(out var cacheAnnotations1)); 186Assert.True(cacheInModel.TryGetAnnotationsOfType<Dummy2Annotation>(out var cacheAnnotations2));
AzureSqlExtensionsTests.cs (3)
223Assert.True(sqlResourceInModel.TryGetAnnotationsOfType<Dummy1Annotation>(out var sqlAnnotations1)); 226Assert.True(sqlResourceInModel.TryGetAnnotationsOfType<Dummy2Annotation>(out var sqlAnnotations2)); 229Assert.True(dbResourceInModel.TryGetAnnotationsOfType<Dummy1Annotation>(out var dbAnnotations));
Aspire.Hosting.Dapr (1)
DaprDistributedApplicationLifecycleHook.cs (1)
80if (componentReferenceAnnotation.Component.TryGetAnnotationsOfType<WaitAnnotation>(out var componentWaitAnnotations))
Aspire.Hosting.Garnet.Tests (4)
AddGarnetTests.cs (4)
170Assert.True(garnet.Resource.TryGetAnnotationsOfType<CommandLineArgsCallbackAnnotation>(out var argsCallbacks)); 201Assert.True(garnet.Resource.TryGetAnnotationsOfType<CommandLineArgsCallbackAnnotation>(out var argsCallbacks)); 233Assert.True(garnet.Resource.TryGetAnnotationsOfType<CommandLineArgsCallbackAnnotation>(out var argsCallbacks)); 252Assert.True(garnet.Resource.TryGetAnnotationsOfType<CommandLineArgsCallbackAnnotation>(out var argsAnnotations));
Aspire.Hosting.Redis.Tests (4)
AddRedisTests.cs (4)
309Assert.True(redis.Resource.TryGetAnnotationsOfType<CommandLineArgsCallbackAnnotation>(out var argsCallbacks)); 340Assert.True(redis.Resource.TryGetAnnotationsOfType<CommandLineArgsCallbackAnnotation>(out var argsCallbacks)); 372Assert.True(redis.Resource.TryGetAnnotationsOfType<CommandLineArgsCallbackAnnotation>(out var argsCallbacks)); 391Assert.True(redis.Resource.TryGetAnnotationsOfType<CommandLineArgsCallbackAnnotation>(out var argsAnnotations));
Aspire.Hosting.Tests (5)
Utils\ArgumentEvaluator.cs (1)
12if (resource.TryGetAnnotationsOfType<CommandLineArgsCallbackAnnotation>(out var exeArgsCallbacks))
WaitForTests.cs (1)
352Assert.True(containerResource.Resource.TryGetAnnotationsOfType<WaitAnnotation>(out var waitAnnotations));
WithEndpointTests.cs (3)
119Assert.False(projectA.Resource.TryGetAnnotationsOfType<EndpointAnnotation>(out var annotations)); 136Assert.True(projectA.Resource.TryGetAnnotationsOfType<EndpointAnnotation>(out _)); 153Assert.True(projectA.Resource.TryGetAnnotationsOfType<EndpointAnnotation>(out _));
Aspire.Hosting.Valkey.Tests (4)
AddValkeyTests.cs (4)
170Assert.True(valkey.Resource.TryGetAnnotationsOfType<CommandLineArgsCallbackAnnotation>(out var argsCallbacks)); 201Assert.True(valkey.Resource.TryGetAnnotationsOfType<CommandLineArgsCallbackAnnotation>(out var argsCallbacks)); 233Assert.True(valkey.Resource.TryGetAnnotationsOfType<CommandLineArgsCallbackAnnotation>(out var argsCallbacks)); 252Assert.True(valkey.Resource.TryGetAnnotationsOfType<CommandLineArgsCallbackAnnotation>(out var argsAnnotations));