107 instantiations of CustomResourceSnapshot
Aspire.Hosting (9)
ApplicationModel\CertificateAuthorityCollectionResourceExtensions.cs (1)
32.WithInitialState(new CustomResourceSnapshot
ApplicationModel\ResourceNotificationService.cs (1)
1319previousState ??= 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)
1175.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)
84.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)
136.WithInitialState(new CustomResourceSnapshot 196.WithInitialState(new CustomResourceSnapshot 221.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)
3689var 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)
1161ResourceSnapshot = new CustomResourceSnapshot
Aspire.Hosting.MongoDB (1)
ReplicaSet\MongoDBReplicaSetBuilderExtensions.cs (1)
98.WithInitialState(new()
Aspire.Hosting.MongoDB.Tests (2)
ReplicaSet\AddMongoDBReplicaSetTests.cs (1)
341var stoppedSnapshot = new CustomResourceSnapshot
tests\Shared\ContainerReplCommandTestBase.cs (1)
57ResourceSnapshot = new CustomResourceSnapshot
Aspire.Hosting.MySql.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
57ResourceSnapshot = 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)
57ResourceSnapshot = new CustomResourceSnapshot
Aspire.Hosting.Redis.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
57ResourceSnapshot = new CustomResourceSnapshot
Aspire.Hosting.SqlServer.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
57ResourceSnapshot = new CustomResourceSnapshot
Aspire.Hosting.Tests (14)
Backchannel\AppHostBackchannelTests.cs (1)
79.WithInitialState(new () {
Dashboard\ResourcePublisherTests.cs (2)
18var state = new CustomResourceSnapshot 228return CreateResourceSnapshot(name, new CustomResourceSnapshot
Dcp\DcpExecutorTests.cs (2)
136states.Enqueue((context.Status.State, context.UpdateSnapshot(new CustomResourceSnapshot 12699return new()
Dcp\ResourceSnapshotBuilderTests.cs (1)
863return new()
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
357var testSnapshot = new CustomResourceSnapshot
Orchestrator\ApplicationOrchestratorTests.cs (1)
1636.WithInitialState(new CustomResourceSnapshot
ResourceCommandAnnotationTests.cs (4)
67ResourceSnapshot = new CustomResourceSnapshot 147ResourceSnapshot = new CustomResourceSnapshot 225var resourceEvent = new ResourceEvent(resource, "project-rebuilder", new CustomResourceSnapshot 288var snapshot = new CustomResourceSnapshot
ResourceNotificationTests.cs (1)
31.WithInitialState(new()
WithUrlsTests.cs (1)
68.WithInitialState(new()
Aspire.Hosting.Valkey.Tests (1)
tests\Shared\ContainerReplCommandTestBase.cs (1)
57ResourceSnapshot = 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()
195 references to CustomResourceSnapshot
Aspire.Hosting (78)
ApplicationModel\CommandsConfigurationExtensions.cs (2)
420internal static CustomResourceSnapshot RestoreIfStillBuilding(CustomResourceSnapshot snapshot, string restoredState) =>
ApplicationModel\CustomResourceSnapshot.cs (1)
193internal 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) => 877/// Updates the snapshot of the <see cref="CustomResourceSnapshot"/> for a resource. 886public Task PublishUpdateAsync(IResource resource, string resourceId, Func<CustomResourceSnapshot, CustomResourceSnapshot> stateFactory) 896var previousState = GetCurrentSnapshot(resource, notificationState); 898var newState = stateFactory(previousState); 1027CustomResourceSnapshot? previousSnapshot, 1028CustomResourceSnapshot snapshot) 1114CustomResourceSnapshot readySnapshot, 1159private CustomResourceSnapshot UpdateCommands(IResource resource, CustomResourceSnapshot previousState) 1222static ResourceCommandSnapshot CreateCommandFromAnnotation(ResourceCommandAnnotation annotation, CustomResourceSnapshot previousState, IServiceProvider serviceProvider) 1239private static CustomResourceSnapshot UpdateIcons(IResource resource, CustomResourceSnapshot previousState) 1267private static CustomResourceSnapshot UpdateDashboardVisibility(IResource resource, CustomResourceSnapshot previousState) 1290/// Updates the snapshot of the <see cref="CustomResourceSnapshot"/> for a resource. 1298public async Task PublishUpdateAsync(IResource resource, Func<CustomResourceSnapshot, CustomResourceSnapshot> stateFactory) 1307private static CustomResourceSnapshot GetCurrentSnapshot(IResource resource, ResourceNotificationState notificationState) 1309var previousState = notificationState.LastSnapshot; 1361var snapshot = evt.Snapshot; 1461public CustomResourceSnapshot? LastSnapshot { get; set; } 1475CustomResourceSnapshot Snapshot, 1511public class ResourceEvent(IResource resource, string resourceId, CustomResourceSnapshot snapshot) 1526public 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)
56yield 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)
982Func<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)
863public required CustomResourceSnapshot? Snapshot { get; init; }
Lifecycle\TerminalHostFailureDiagnosticService.cs (1)
99private async Task SurfaceFailureAsync(TerminalHostResource host, CustomResourceSnapshot snapshot, CancellationToken cancellationToken)
Orchestrator\ApplicationOrchestrator.cs (2)
298static 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)
3073var storageSnapshot = storageEvent.Snapshot; 5387private static void AssertAffectedResourceCommandsDuringOperation(CustomResourceSnapshot snapshot) 5397private static void AssertUnaffectedResourceCommandsDuringOperation(CustomResourceSnapshot snapshot) 5407private static void AssertCommandState(CustomResourceSnapshot snapshot, string commandName, ResourceCommandState expectedState)
Aspire.Hosting.Blazor.Tests (3)
AddBlazorGatewayTests.cs (2)
39var snapshot = Assert.Single(app.Resource.Annotations.OfType<ResourceSnapshotAnnotation>()).InitialSnapshot; 69var 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)
838CustomResourceSnapshot? stoppedSnapshot = null;
Aspire.Hosting.DevTunnels.Tests (1)
TestDevTunnelMonitor.cs (1)
92public CustomResourceSnapshot Snapshot(IResource resource)
Aspire.Hosting.Dotnet (8)
DotnetProjectBuildCoordinator.cs (8)
280CustomResourceSnapshot snapshot) 380internal static bool IsSettledBuildSnapshot(CustomResourceSnapshot snapshot) => 385private static bool IsFailedBuildSnapshot(CustomResourceSnapshot snapshot) => 1222var initialSnapshot = _notificationService.TryGetCurrentState( 1302var initialSnapshot = _notificationService.TryGetCurrentState( 1519CustomResourceSnapshot? initialSnapshot, 1550CustomResourceSnapshot? initialSnapshot, 1745CustomResourceSnapshot snapshot)
Aspire.Hosting.Dotnet.Tests (1)
DotnetProjectBuildCoordinatorTests.cs (1)
3689var 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 (59)
AddConnectionStringTests.cs (1)
63var state = annotation.InitialSnapshot;
AddParameterTests.cs (1)
66var state = annotation.InitialSnapshot;
Dashboard\ResourcePublisherTests.cs (2)
18var state = new CustomResourceSnapshot 235private static GenericResourceSnapshot CreateResourceSnapshot(string name, CustomResourceSnapshot state)
Dcp\DcpExecutorTests.cs (5)
796var snapshot = CreateSnapshotBuilder(distributedAppModel).ToSnapshot(exe, CreatePreviousSnapshot()); 842var snapshot = CreateSnapshotBuilder(distributedAppModel).ToSnapshot(container, CreatePreviousSnapshot()); 12697private static CustomResourceSnapshot CreatePreviousSnapshot() 12706private static ResourcePropertySnapshot GetProperty(CustomResourceSnapshot snapshot, string name) 12711private static IEnumerable<T> GetEnumerablePropertyValue<T>(CustomResourceSnapshot snapshot, string name)
Dcp\ResourceSnapshotBuilderTests.cs (31)
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> 153var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 208var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 260var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 305var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 351var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 413var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 452var previousSnapshot = CreatePreviousSnapshot() with 460var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 499var previousSnapshot = CreatePreviousSnapshot() with 503var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 535var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 564var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 598var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 621var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 645var snapshot = CreateSnapshotBuilder(new Dictionary<string, IResource> 672var snapshot = snapshotBuilder.ToSnapshot(executable, CreatePreviousSnapshot()); 741var projectSnapshot = snapshotBuilder.ToSnapshot(executable, CreatePreviousSnapshot(KnownResourceTypes.Project)); 746var customSnapshot = snapshotBuilder.ToSnapshot(executable, CreatePreviousSnapshot("custom-type")); 760var snapshot = CreateSnapshotBuilder().ToSnapshot(executable, CreatePreviousSnapshot()); 778var snapshot = CreateSnapshotBuilder().ToSnapshot(executable, CreatePreviousSnapshot()); 793var snapshot = CreateSnapshotBuilder().ToSnapshot(executable, CreatePreviousSnapshot()); 823var snapshot = CreateSnapshotBuilder().ToSnapshot(executable, CreatePreviousSnapshot()); 861private static CustomResourceSnapshot CreatePreviousSnapshot(string resourceType = "resource") 870private static ResourcePropertySnapshot GetProperty(CustomResourceSnapshot snapshot, string name) 875private static void AssertHighlightedProperty(CustomResourceSnapshot snapshot, string name, string displayName, bool isSensitive, int sortOrder) 884private static void AssertDefaultProperty(CustomResourceSnapshot snapshot, string name, bool isSensitive) 893private static IEnumerable<T> GetEnumerablePropertyValue<T>(CustomResourceSnapshot snapshot, string name)
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
357var 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)>(); 1950private static void AssertParameterValueProperty(CustomResourceSnapshot snapshot, string expectedValue, bool isSensitive)
ResourceCommandAnnotationTests.cs (2)
288var snapshot = new CustomResourceSnapshot 295var restored = CommandsConfigurationExtensions.RestoreIfStillBuilding(snapshot, KnownResourceStates.Finished);
ResourceNotificationTests.cs (11)
41var state = annotation.InitialSnapshot; 1946CustomResourceSnapshot BuildSnapshot(CustomResourceSnapshot snapshot) => snapshot with 2028typeof(CustomResourceSnapshot), 2042$"Changing {nameof(CustomResourceSnapshot)}.{propertyName} should publish a new snapshot."); 2084CreatePropertyTheoryData(typeof(CustomResourceSnapshot), s_snapshotContentPropertyExclusions); 2091nameof(CustomResourceSnapshot.Version), 2092nameof(CustomResourceSnapshot.HealthStatus) 2137private static CustomResourceSnapshot MutateProperty(CustomResourceSnapshot snapshot, PropertyInfo property) 2141var mutated = snapshot with { };
Aspire.Hosting.Valkey (1)
src\Shared\ContainerReplCommand.cs (1)
95private static string? GetContainerId(CustomResourceSnapshot snapshot) =>