18 instantiations of ReplicaAnnotation
Aspire.Hosting (2)
DotnetProgramResourceBuilderExtensions.cs (1)
28
builder.WithAnnotation(new
ReplicaAnnotation
(replicas));
ProjectResourceBuilderExtensions.cs (1)
933
builder.WithAnnotation(new
ReplicaAnnotation
(replicas));
Aspire.Hosting.Tests (16)
Dcp\DcpExecutorTests.cs (3)
382
.WithAnnotation(new
ReplicaAnnotation
(3));
5879
.WithAnnotation(new
ReplicaAnnotation
(2))
11101
.WithAnnotation(new
ReplicaAnnotation
(2))
DotnetProgramPublishingTests.cs (1)
291
resource.Annotations.Add(new
ReplicaAnnotation
(3));
ResourceCommandServiceTests.cs (1)
119
custom.WithAnnotation(new
ReplicaAnnotation
(2));
Terminals\ResourceTerminalCatalogTests.cs (2)
72
builder.AddExecutable("myapp", "myapp", ".").WithAnnotation(new
ReplicaAnnotation
(3)).WithTerminal();
103
builder.AddExecutable("myapp", "myapp", ".").WithAnnotation(new
ReplicaAnnotation
(2)).WithTerminal();
WaitForTests.cs (2)
638
.WithAnnotation(new
ReplicaAnnotation
(2))
691
.WithAnnotation(new
ReplicaAnnotation
(2))
WithTerminalTests.cs (7)
309
.WithAnnotation(new
ReplicaAnnotation
(2));
335
.WithAnnotation(new
ReplicaAnnotation
(2))
393
.WithAnnotation(new
ReplicaAnnotation
(2))
1218
.WithAnnotation(new
ReplicaAnnotation
(3));
1250
resource.WithAnnotation(new
ReplicaAnnotation
(3));
1269
.WithAnnotation(new
ReplicaAnnotation
(2));
1342
.WithAnnotation(new
ReplicaAnnotation
(2));
9 references to ReplicaAnnotation
Aspire.Hosting (6)
ApplicationModel\ResourceExtensions.cs (3)
976
/// <see cref="
ReplicaAnnotation
" /> is found.
983
if (resource.TryGetLastAnnotation<
ReplicaAnnotation
>(out
var
replicaAnnotation))
ApplicationModel\TerminalAnnotation.cs (1)
28
/// final <see cref="
ReplicaAnnotation
"/> count is always honoured.
TerminalResourceBuilderExtensions.cs (2)
138
/// Reads the parent's final <see cref="
ReplicaAnnotation
"/> and creates one
164
var replicaCount = parent.Annotations.OfType<
ReplicaAnnotation
>().LastOrDefault()?.Replicas ?? 1;
Aspire.Hosting.Azure.AppContainers (1)
ContainerAppContext.cs (1)
74
MinReplicas = _containerAppEnvironmentContext.Environment.IsExpress && !Resource.HasAnnotationOfType<
ReplicaAnnotation
>()
Aspire.Hosting.Tests (2)
ProjectResourceTests.cs (2)
291
var
replica = Assert.Single(resource.Annotations.OfType<
ReplicaAnnotation
>());