105 instantiations of CustomResourceSnapshot
Aspire.Hosting (9)
ApplicationModel\CertificateAuthorityCollectionResourceExtensions.cs (1)
32.WithInitialState(new CustomResourceSnapshot
ApplicationModel\ResourceNotificationService.cs (1)
1287previousState ??= new CustomResourceSnapshot()
ConnectionStringBuilderExtensions.cs (1)
81.WithInitialState(new CustomResourceSnapshot
Dashboard\DashboardEventHandlers.cs (1)
331var snapshot = new CustomResourceSnapshot
DotnetToolResourceExtensions.cs (1)
47.WithInitialState(new CustomResourceSnapshot
ExternalServiceBuilderExtensions.cs (1)
106.WithInitialState(new CustomResourceSnapshot
ParameterResourceBuilderExtensions.cs (1)
331var state = new CustomResourceSnapshot
ProjectResourceBuilderExtensions.cs (1)
1168.WithInitialState(new CustomResourceSnapshot
TerminalResourceBuilderExtensions.cs (1)
351host.Annotations.Add(new ResourceSnapshotAnnotation(new CustomResourceSnapshot
Aspire.Hosting.Azure (2)
AzureEnvironmentResourceExtensions.cs (2)
41.WithInitialState(new CustomResourceSnapshot 81.WithInitialState(new()
Aspire.Hosting.Azure.EntraId (1)
EntraIdResourceExtensions.cs (1)
83.WithInitialState(new CustomResourceSnapshot
Aspire.Hosting.Azure.Sandboxes (1)
AzureSandboxCleanupResource.cs (1)
30.WithInitialState(new()
Aspire.Hosting.Azure.Tests (1)
AzureEnvironmentResourceExtensionsTests.cs (1)
173ResourceSnapshot = new CustomResourceSnapshot
Aspire.Hosting.Blazor (4)
BlazorGatewayExtensions.cs (3)
135.WithInitialState(new CustomResourceSnapshot 195.WithInitialState(new CustomResourceSnapshot 219.WithInitialState(new CustomResourceSnapshot
BrowserDebuggerHelper.cs (1)
91.WithInitialState(new()
Aspire.Hosting.Blazor.Tests (3)
BlazorHostedExtensionsTests.cs (1)
604ResourceSnapshot = new CustomResourceSnapshot
WithBlazorAppTests.cs (2)
253ResourceSnapshot = new CustomResourceSnapshot 294ResourceSnapshot = new CustomResourceSnapshot
Aspire.Hosting.Browsers (1)
BrowserLogsBuilderExtensions.cs (1)
144.WithInitialState(new CustomResourceSnapshot
Aspire.Hosting.Browsers.Tests (35)
BrowserLogsBuilderExtensionsTests.cs (34)
34.WithInitialState(new CustomResourceSnapshot 88.WithInitialState(new CustomResourceSnapshot 143.WithInitialState(new CustomResourceSnapshot 179.WithInitialState(new CustomResourceSnapshot 212.WithInitialState(new CustomResourceSnapshot 289.WithInitialState(new CustomResourceSnapshot 316.WithInitialState(new CustomResourceSnapshot 340.WithInitialState(new CustomResourceSnapshot 366.WithInitialState(new CustomResourceSnapshot 388.WithInitialState(new CustomResourceSnapshot 409.WithInitialState(new CustomResourceSnapshot 433.WithInitialState(new CustomResourceSnapshot 469.WithInitialState(new CustomResourceSnapshot 512.WithInitialState(new CustomResourceSnapshot 552.WithInitialState(new CustomResourceSnapshot 591.WithInitialState(new CustomResourceSnapshot 636.WithInitialState(new CustomResourceSnapshot 676.WithInitialState(new CustomResourceSnapshot 686.WithInitialState(new CustomResourceSnapshot 726.WithInitialState(new CustomResourceSnapshot 780.WithInitialState(new CustomResourceSnapshot 824.WithInitialState(new CustomResourceSnapshot 864.WithInitialState(new CustomResourceSnapshot 937.WithInitialState(new CustomResourceSnapshot 993.WithInitialState(new CustomResourceSnapshot 1078.WithInitialState(new CustomResourceSnapshot 1151.WithInitialState(new CustomResourceSnapshot 1207.WithInitialState(new CustomResourceSnapshot 1267.WithInitialState(new CustomResourceSnapshot 1303.WithInitialState(new CustomResourceSnapshot 1331.WithInitialState(new CustomResourceSnapshot 1387.WithInitialState(new CustomResourceSnapshot 1522.WithInitialState(new CustomResourceSnapshot 1590.WithInitialState(new CustomResourceSnapshot
src\Aspire.Hosting.Browsers\BrowserLogsBuilderExtensions.cs (1)
144.WithInitialState(new CustomResourceSnapshot
Aspire.Hosting.DevTunnels (2)
DevTunnelResourceBuilderExtensions.cs (2)
105.WithInitialState(new() 700.WithInitialState(new()
Aspire.Hosting.DevTunnels.Tests (3)
DevTunnelResourceBuilderExtensionsTests.cs (3)
578ResourceSnapshot = new() 588ResourceSnapshot = new() 599ResourceSnapshot = new()
Aspire.Hosting.Dotnet.Tests (1)
DotnetProjectBuildCoordinatorTests.cs (1)
2705var snapshot = new CustomResourceSnapshot
Aspire.Hosting.EntityFrameworkCore (2)
EFResourceBuilderExtensions.cs (2)
272.WithInitialState(new CustomResourceSnapshot 728.WithInitialState(new CustomResourceSnapshot
Aspire.Hosting.EntityFrameworkCore.Tests (4)
EFMigrationCommandsTests.cs (4)
200var snapshot = new CustomResourceSnapshot 230var snapshot = new CustomResourceSnapshot 260var snapshot = new CustomResourceSnapshot 280snapshot = new CustomResourceSnapshot
Aspire.Hosting.Maui (1)
MauiOtlpExtensions.cs (1)
119stubBuilder.WithHidden().WithInitialState(new CustomResourceSnapshot
Aspire.Hosting.Maui.Tests (1)
MauiBuildQueueTests.cs (1)
1138ResourceSnapshot = new CustomResourceSnapshot
Aspire.Hosting.MongoDB (1)
ReplicaSet\MongoDBReplicaSetBuilderExtensions.cs (1)
96.WithInitialState(new()
Aspire.Hosting.MongoDB.Tests (2)
ReplicaSet\AddMongoDBReplicaSetTests.cs (1)
341var stoppedSnapshot = new CustomResourceSnapshot
tests\Shared\ContainerReplCommandTestBase.cs (1)
56ResourceSnapshot = new CustomResourceSnapshot
Aspire.Hosting.MySql.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
56ResourceSnapshot = new CustomResourceSnapshot
Aspire.Hosting.OpenAI (2)
OpenAIExtensions.cs (2)
66.WithInitialState(new() 115.WithInitialState(new()
Aspire.Hosting.PostgreSQL.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
56ResourceSnapshot = new CustomResourceSnapshot
Aspire.Hosting.Redis.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
56ResourceSnapshot = new CustomResourceSnapshot
Aspire.Hosting.SqlServer.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
56ResourceSnapshot = new CustomResourceSnapshot
Aspire.Hosting.Tests (12)
Backchannel\AppHostBackchannelTests.cs (1)
79.WithInitialState(new () {
Dashboard\ResourcePublisherTests.cs (1)
204return new GenericResourceSnapshot(new()
Dcp\DcpExecutorTests.cs (2)
134states.Enqueue((context.Status.State, context.UpdateSnapshot(new CustomResourceSnapshot 11587return new()
Dcp\ResourceSnapshotBuilderTests.cs (1)
797return new()
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
325var testSnapshot = new CustomResourceSnapshot
Orchestrator\ApplicationOrchestratorTests.cs (1)
1132.WithInitialState(new CustomResourceSnapshot
ResourceCommandAnnotationTests.cs (3)
67ResourceSnapshot = new CustomResourceSnapshot 147ResourceSnapshot = new CustomResourceSnapshot 225var resourceEvent = new ResourceEvent(resource, "project-rebuilder", new CustomResourceSnapshot
ResourceNotificationTests.cs (1)
31.WithInitialState(new()
WithUrlsTests.cs (1)
68.WithInitialState(new()
Aspire.Hosting.Valkey.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
56ResourceSnapshot = new CustomResourceSnapshot
CustomResources.AppHost (3)
TalkingClockResource.cs (2)
41.WithInitialState(new CustomResourceSnapshot // Aspire type for custom resource state. 130.WithInitialState(new()
TestResource.cs (1)
17.WithInitialState(new()
HealthChecksSandbox.AppHost (2)
AppHost.cs (2)
69.WithInitialState(new() 112.WithInitialState(new()
Stress.AppHost (7)
AppHost.cs (1)
61.WithInitialState(new CustomResourceSnapshot
TestResource.cs (6)
18.WithInitialState(new() 36.WithInitialState(new() 55.WithInitialState(new() 72.WithInitialState(new() 89.WithInitialState(new() 105.WithInitialState(new()
184 references to CustomResourceSnapshot
Aspire.Hosting (76)
ApplicationModel\CustomResourceSnapshot.cs (1)
174internal bool ContentEquals(CustomResourceSnapshot other)
ApplicationModel\CustomResourceSnapshotExtensions.cs (8)
9/// Provides extension methods for creating updated <see cref="CustomResourceSnapshot"/> values. 21/// This method is intended for use with <see cref="ResourceNotificationService.PublishUpdateAsync(IResource, Func{CustomResourceSnapshot, CustomResourceSnapshot})"/> 22/// and <see cref="ResourceNotificationService.PublishUpdateAsync(IResource, string, Func{CustomResourceSnapshot, CustomResourceSnapshot})"/>. 23/// Updating health reports also recomputes <see cref="CustomResourceSnapshot.HealthStatus"/> based on the snapshot state. 25public static CustomResourceSnapshot WithHealthReports(this CustomResourceSnapshot snapshot, ImmutableArray<HealthReportSnapshot> healthReports)
ApplicationModel\ResourceCommandAnnotation.cs (2)
369public required CustomResourceSnapshot ResourceSnapshot { get; init; } 425internal static UpdateCommandStateResourceSnapshot FromSnapshot(CustomResourceSnapshot snapshot)
ApplicationModel\ResourceNotificationService.cs (30)
315internal static bool ShouldYieldHealthyWait(WaitBehavior waitBehavior, CustomResourceSnapshot snapshot) => 362var snapshot = resourceEvent.Snapshot; 395static bool IsKnownTerminalState(CustomResourceSnapshot snapshot) => 426var snapshot = resourceEvent.Snapshot; 463static bool IsContinuableState(WaitBehavior waitBehavior, CustomResourceSnapshot snapshot) => 856/// Updates the snapshot of the <see cref="CustomResourceSnapshot"/> for a resource. 865public Task PublishUpdateAsync(IResource resource, string resourceId, Func<CustomResourceSnapshot, CustomResourceSnapshot> stateFactory) 875var previousState = GetCurrentSnapshot(resource, notificationState); 877var newState = stateFactory(previousState); 995CustomResourceSnapshot? previousSnapshot, 996CustomResourceSnapshot snapshot) 1082CustomResourceSnapshot readySnapshot, 1127private CustomResourceSnapshot UpdateCommands(IResource resource, CustomResourceSnapshot previousState) 1190static ResourceCommandSnapshot CreateCommandFromAnnotation(ResourceCommandAnnotation annotation, CustomResourceSnapshot previousState, IServiceProvider serviceProvider) 1207private static CustomResourceSnapshot UpdateIcons(IResource resource, CustomResourceSnapshot previousState) 1235private static CustomResourceSnapshot UpdateDashboardVisibility(IResource resource, CustomResourceSnapshot previousState) 1258/// Updates the snapshot of the <see cref="CustomResourceSnapshot"/> for a resource. 1266public async Task PublishUpdateAsync(IResource resource, Func<CustomResourceSnapshot, CustomResourceSnapshot> stateFactory) 1275private static CustomResourceSnapshot GetCurrentSnapshot(IResource resource, ResourceNotificationState notificationState) 1277var previousState = notificationState.LastSnapshot; 1329var snapshot = evt.Snapshot; 1429public CustomResourceSnapshot? LastSnapshot { get; set; } 1443CustomResourceSnapshot Snapshot, 1479public class ResourceEvent(IResource resource, string resourceId, CustomResourceSnapshot snapshot) 1494public CustomResourceSnapshot Snapshot { get; } = snapshot;
ApplicationModel\ResourceSnapshotAnnotation.cs (2)
9public class ResourceSnapshotAnnotation(CustomResourceSnapshot initialSnapshot) : IResourceAnnotation 14public CustomResourceSnapshot InitialSnapshot { get; } = initialSnapshot ?? throw new ArgumentNullException(nameof(initialSnapshot));
Backchannel\AppHostRpcTarget.cs (1)
147var healthStatus = CustomResourceSnapshot.ComputeHealthStatus(resourceEvent.Snapshot.HealthReports, resourceEvent.Snapshot.State?.Text);
Backchannel\AuxiliaryBackchannelRpcTarget.cs (1)
1074var snapshot = resourceEvent.Snapshot;
CustomResourceExtensions.cs (2)
18/// <param name="initialSnapshot">The factory to create the initial <see cref="CustomResourceSnapshot"/> for this resource.</param> 22public static IResourceBuilder<TResource> WithInitialState<TResource>(this IResourceBuilder<TResource> builder, CustomResourceSnapshot initialSnapshot)
Dashboard\DashboardEventHandlers.cs (1)
331var snapshot = new CustomResourceSnapshot
Dashboard\DashboardServiceData.cs (1)
43static GenericResourceSnapshot CreateResourceSnapshot(IResource resource, string resourceId, DateTime creationTimestamp, CustomResourceSnapshot snapshot)
Dashboard\GenericResourceSnapshot.cs (1)
9internal sealed class GenericResourceSnapshot(CustomResourceSnapshot state) : ResourceSnapshot
Dashboard\ResourceSnapshot.cs (1)
51yield return (KnownProperties.Resource.HealthState, CustomResourceSnapshot.ComputeHealthStatus(HealthReports, State) is not { } healthStatus ? Value.ForNull() : Value.ForString(healthStatus.ToString()), IsSensitive: false, DisplayName: null, IsHighlighted: false, SortOrder: null);
Dcp\DcpExecutor.cs (2)
1066Func<CustomResourceSnapshot, CustomResourceSnapshot> BuildSnapshotFunc(CustomResource dcpResource)
Dcp\DcpExecutorEvents.cs (2)
14internal record OnResourceChangedContext(CancellationToken CancellationToken, string ResourceType, IResource Resource, string DcpResourceName, ResourceStatus Status, string? PreviousState, Func<CustomResourceSnapshot, CustomResourceSnapshot> UpdateSnapshot);
Dcp\DcpResourceWatcher.cs (2)
300private async Task ProcessResourceChange<T>(WatchEventType watchEventType, T resource, ConcurrentDictionary<string, T> resourceByName, string resourceKind, Func<T, CustomResourceSnapshot, CustomResourceSnapshot> snapshotFactory) where T : CustomResource, IKubernetesStaticMetadata
Dcp\ResourceSnapshotBuilder.cs (6)
24public CustomResourceSnapshot ToSnapshot(Container container, CustomResourceSnapshot previous) 99public CustomResourceSnapshot ToSnapshot(ContainerExec executable, CustomResourceSnapshot previous) 134public CustomResourceSnapshot ToSnapshot(Executable executable, CustomResourceSnapshot previous)
Diagnostics\ProfilingTelemetry.cs (8)
421CustomResourceSnapshot snapshot, 1033public void SetResourceLifecycle(IResource resource, string resourceId, CustomResourceSnapshot snapshot) 1050public void AddResourceStartupObserved(CustomResourceSnapshot snapshot, DateTimeOffset timestamp) => 1053public void AddResourceStartupStateChanged(CustomResourceSnapshot snapshot, DateTimeOffset timestamp, string? previousState) => 1056public void AddResourceStartupHealthChanged(CustomResourceSnapshot snapshot, DateTimeOffset timestamp, string? previousHealthStatus) => 1059public void AddResourceStartupReady(CustomResourceSnapshot snapshot, DateTimeOffset timestamp) => 1098var snapshot = resourceEvent.Snapshot; 1129CustomResourceSnapshot snapshot,
DistributedApplication.cs (1)
846public required CustomResourceSnapshot? Snapshot { get; init; }
Lifecycle\TerminalHostFailureDiagnosticService.cs (1)
99private async Task SurfaceFailureAsync(TerminalHostResource host, CustomResourceSnapshot snapshot, CancellationToken cancellationToken)
Orchestrator\ApplicationOrchestrator.cs (2)
283static Task PublishUpdateAsync(ResourceNotificationService notificationService, IResource resource, string? resourceId, Func<CustomResourceSnapshot, CustomResourceSnapshot> stateFactory)
ParameterResourceBuilderExtensions.cs (1)
331var state = new CustomResourceSnapshot
Aspire.Hosting.Azure (6)
AzureProvisioningController.cs (6)
1033private static bool IsCancelableDeploymentState(CustomResourceSnapshot snapshot) 1039private static bool IsActiveOperationCancelableResourceState(CustomResourceSnapshot snapshot) 3736private CustomResourceSnapshot ApplyActiveOperationProperties(IResource resource, CustomResourceSnapshot state) 3807Func<CustomResourceSnapshot, CustomResourceSnapshot> stateFactory)
Aspire.Hosting.Azure.EntraId.Tests (15)
EntraIdInitializationTests.cs (15)
25var snapshot = await InitializeAsync(app, entra.Resource); 57var snapshot = await InitializeAsync(app, entra.Resource); 78var snapshot = await InitializeAsync(app, entra.Resource); 110var snapshot = await InitializeAsync(app, entra.Resource); 131var snapshot = await InitializeAsync(app, entra.Resource); 150var snapshot = await InitializeAsync(app, entra.Resource); 170var snapshot = await InitializeAsync(app, entra.Resource); 188var snapshot = await InitializeAsync(app, entra.Resource); 208var snapshot = await InitializeAsync(app, entra.Resource); 227var snapshot = await InitializeAsync(app, entra.Resource); 414var snapshot = await InitializeAsync(app, entra.Resource); 443var snapshot = await InitializeAsync(app, entra.Resource); 465var snapshot = await InitializeAsync(app, entra.Resource); 479var snapshot = await InitializeAsync(app, entra.Resource); 493private static async Task<CustomResourceSnapshot> InitializeAsync(DistributedApplication app, IResource resource)
Aspire.Hosting.Azure.Tests (4)
AzureEnvironmentResourceExtensionsTests.cs (4)
3048var storageSnapshot = storageEvent.Snapshot; 5362private static void AssertAffectedResourceCommandsDuringOperation(CustomResourceSnapshot snapshot) 5372private static void AssertUnaffectedResourceCommandsDuringOperation(CustomResourceSnapshot snapshot) 5382private static void AssertCommandState(CustomResourceSnapshot snapshot, string commandName, ResourceCommandState expectedState)
Aspire.Hosting.Blazor.Tests (2)
AddBlazorGatewayTests.cs (1)
44var initialSnapshot = Assert.Single(gateway.Resource.Annotations.OfType<ResourceSnapshotAnnotation>()).InitialSnapshot;
AddBlazorWasmAppTests.cs (1)
33var state = snapshot.InitialSnapshot;
Aspire.Hosting.Browsers.Tests (6)
BrowserLogsBuilderExtensionsTests.cs (6)
67var snapshot = browserLogsResource.Annotations.OfType<ResourceSnapshotAnnotation>().Single().InitialSnapshot; 227var snapshot = browserLogsResource.Annotations.OfType<ResourceSnapshotAnnotation>().Single().InitialSnapshot; 353var snapshot = browserLogsResource.Annotations.OfType<ResourceSnapshotAnnotation>().Single().InitialSnapshot; 1744private static bool HasProperty(CustomResourceSnapshot snapshot, string name, object expectedValue) => 1747private static bool DoesNotHaveProperty(CustomResourceSnapshot snapshot, string name) => 1750private static IReadOnlyList<BrowserSessionPropertyValue> GetBrowserSessions(CustomResourceSnapshot snapshot)
Aspire.Hosting.DevTunnels (3)
DevTunnelMonitor.cs (2)
689internal static CustomResourceSnapshot WithConnectionHealth(CustomResourceSnapshot snapshot, string name, bool healthy, string description)
DevTunnelResourceBuilderExtensions.cs (1)
831CustomResourceSnapshot? stoppedSnapshot = null;
Aspire.Hosting.DevTunnels.Tests (1)
TestDevTunnelMonitor.cs (1)
91public CustomResourceSnapshot Snapshot(IResource resource)
Aspire.Hosting.Dotnet (5)
DotnetProjectBuildCoordinator.cs (5)
201internal static bool IsSettledBuildSnapshot(CustomResourceSnapshot snapshot) => 924var initialSnapshot = _notificationService.TryGetCurrentState( 1004var initialSnapshot = _notificationService.TryGetCurrentState( 1221CustomResourceSnapshot? initialSnapshot, 1252CustomResourceSnapshot? initialSnapshot,
Aspire.Hosting.Dotnet.Tests (1)
DotnetProjectBuildCoordinatorTests.cs (1)
2705var snapshot = new CustomResourceSnapshot
Aspire.Hosting.EntityFrameworkCore (1)
EFCoreOperationExecutor.cs (1)
366var snapshot = resourceEvent.Snapshot;
Aspire.Hosting.EntityFrameworkCore.Tests (3)
EFMigrationCommandsTests.cs (3)
200var snapshot = new CustomResourceSnapshot 230var snapshot = new CustomResourceSnapshot 260var snapshot = new CustomResourceSnapshot
Aspire.Hosting.MongoDB (1)
src\Shared\ContainerReplCommand.cs (1)
95private static string? GetContainerId(CustomResourceSnapshot snapshot) =>
Aspire.Hosting.MongoDB.Tests (1)
ReplicaSet\AddMongoDBReplicaSetTests.cs (1)
341var stoppedSnapshot = new CustomResourceSnapshot
Aspire.Hosting.MySql (1)
src\Shared\ContainerReplCommand.cs (1)
95private static string? GetContainerId(CustomResourceSnapshot snapshot) =>
Aspire.Hosting.PostgreSQL (1)
src\Shared\ContainerReplCommand.cs (1)
95private static string? GetContainerId(CustomResourceSnapshot snapshot) =>
Aspire.Hosting.Redis (1)
src\Shared\ContainerReplCommand.cs (1)
95private static string? GetContainerId(CustomResourceSnapshot snapshot) =>
Aspire.Hosting.SqlServer (1)
src\Shared\ContainerReplCommand.cs (1)
95private static string? GetContainerId(CustomResourceSnapshot snapshot) =>
Aspire.Hosting.Tests (54)
AddConnectionStringTests.cs (1)
63var state = annotation.InitialSnapshot;
AddParameterTests.cs (1)
34var state = annotation.InitialSnapshot;
Dcp\DcpExecutorTests.cs (5)
751var snapshot = CreateSnapshotBuilder(distributedAppModel).ToSnapshot(exe, CreatePreviousSnapshot()); 797var snapshot = CreateSnapshotBuilder(distributedAppModel).ToSnapshot(container, CreatePreviousSnapshot()); 11585private static CustomResourceSnapshot CreatePreviousSnapshot() 11594private static ResourcePropertySnapshot GetProperty(CustomResourceSnapshot snapshot, string name) 11599private static IEnumerable<T> GetEnumerablePropertyValue<T>(CustomResourceSnapshot snapshot, string name)
Dcp\ResourceSnapshotBuilderTests.cs (30)
33var snapshot = CreateSnapshotBuilder().ToSnapshot(container, CreatePreviousSnapshot()); 53var snapshot = CreateSnapshotBuilder().ToSnapshot(executable, CreatePreviousSnapshot()); 77var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 106var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 145var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 197var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 242var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 288var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 350var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 389var previousSnapshot = CreatePreviousSnapshot() with 397var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 436var previousSnapshot = CreatePreviousSnapshot() with 440var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 472var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 501var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 535var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 558var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 582var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 609var snapshot = snapshotBuilder.ToSnapshot(executable, CreatePreviousSnapshot()); 675var projectSnapshot = snapshotBuilder.ToSnapshot(executable, CreatePreviousSnapshot(KnownResourceTypes.Project)); 680var customSnapshot = snapshotBuilder.ToSnapshot(executable, CreatePreviousSnapshot("custom-type")); 694var snapshot = CreateSnapshotBuilder().ToSnapshot(executable, CreatePreviousSnapshot()); 712var snapshot = CreateSnapshotBuilder().ToSnapshot(executable, CreatePreviousSnapshot()); 727var snapshot = CreateSnapshotBuilder().ToSnapshot(executable, CreatePreviousSnapshot()); 757var snapshot = CreateSnapshotBuilder().ToSnapshot(executable, CreatePreviousSnapshot()); 795private static CustomResourceSnapshot CreatePreviousSnapshot(string resourceType = "resource") 804private static ResourcePropertySnapshot GetProperty(CustomResourceSnapshot snapshot, string name) 809private static void AssertHighlightedProperty(CustomResourceSnapshot snapshot, string name, string displayName, bool isSensitive, int sortOrder) 818private static void AssertDefaultProperty(CustomResourceSnapshot snapshot, string name, bool isSensitive) 827private static IEnumerable<T> GetEnumerablePropertyValue<T>(CustomResourceSnapshot snapshot, string name)
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
325var testSnapshot = new CustomResourceSnapshot
Health\HealthStatusTests.cs (1)
27var actualStatus = CustomResourceSnapshot.ComputeHealthStatus(reports, state);
Lifecycle\TerminalHostFailureDiagnosticServiceTests.cs (2)
114var current = await ReadCurrentSnapshotAsync(notifications, host).DefaultTimeout(); 259private static async Task<CustomResourceSnapshot> ReadCurrentSnapshotAsync(ResourceNotificationService notifications, IResource host)
Orchestrator\ParameterProcessorTests.cs (2)
85var updates = new List<(IResource Resource, CustomResourceSnapshot Snapshot)>(); 1769private static void AssertParameterValueProperty(CustomResourceSnapshot snapshot, string expectedValue, bool isSensitive)
ResourceNotificationTests.cs (11)
41var state = annotation.InitialSnapshot; 1779CustomResourceSnapshot BuildSnapshot(CustomResourceSnapshot snapshot) => snapshot with 1861typeof(CustomResourceSnapshot), 1875$"Changing {nameof(CustomResourceSnapshot)}.{propertyName} should publish a new snapshot."); 1917CreatePropertyTheoryData(typeof(CustomResourceSnapshot), s_snapshotContentPropertyExclusions); 1924nameof(CustomResourceSnapshot.Version), 1925nameof(CustomResourceSnapshot.HealthStatus) 1970private static CustomResourceSnapshot MutateProperty(CustomResourceSnapshot snapshot, PropertyInfo property) 1974var mutated = snapshot with { };
Aspire.Hosting.Valkey (1)
src\Shared\ContainerReplCommand.cs (1)
95private static string? GetContainerId(CustomResourceSnapshot snapshot) =>