13 instantiations of CustomResourceSnapshot
Aspire.Hosting (3)
ApplicationModel\ResourceNotificationService.cs (1)
258previousState ??= new CustomResourceSnapshot()
Dashboard\DashboardLifecycleHook.cs (1)
121var snapshot = new CustomResourceSnapshot()
ParameterResourceBuilderExtensions.cs (1)
96var state = new CustomResourceSnapshot()
Aspire.Hosting.AWS (5)
CDK\CDKExtensions.cs (3)
41.WithInitialState(new() 64.WithInitialState(new() 88.WithInitialState(new()
CloudFormation\CloudFormationExtensions.cs (2)
31.WithInitialState(new() 65.WithInitialState(new()
Aspire.Hosting.Dapr (2)
IDistributedApplicationBuilderExtensions.cs (1)
49.WithInitialState(new()
IDistributedApplicationComponentBuilderExtensions.cs (1)
58.WithInitialState(new()
Aspire.Hosting.Tests (1)
Dashboard\ResourcePublisherTests.cs (1)
181return new GenericResourceSnapshot(new()
CustomResources.AppHost (1)
TestResource.cs (1)
15.WithInitialState(new()
Stress.AppHost (1)
TestResource.cs (1)
15.WithInitialState(new()
36 references to CustomResourceSnapshot
Aspire.Hosting (29)
ApplicationModel\ResourceNotificationService.cs (13)
185/// Updates the snapshot of the <see cref="CustomResourceSnapshot"/> for a resource. 190public Task PublishUpdateAsync(IResource resource, string resourceId, Func<CustomResourceSnapshot, CustomResourceSnapshot> stateFactory) 196var previousState = GetCurrentSnapshot(resource, notificationState); 198var newState = stateFactory(previousState); 237/// Updates the snapshot of the <see cref="CustomResourceSnapshot"/> for a resource. 241public Task PublishUpdateAsync(IResource resource, Func<CustomResourceSnapshot, CustomResourceSnapshot> stateFactory) 246private static CustomResourceSnapshot GetCurrentSnapshot(IResource resource, ResourceNotificationState notificationState) 248var previousState = notificationState.LastSnapshot; 276public CustomResourceSnapshot? LastSnapshot { get; set; } 286public class ResourceEvent(IResource resource, string resourceId, CustomResourceSnapshot snapshot) 301public CustomResourceSnapshot Snapshot { get; } = snapshot;
ApplicationModel\ResourceSnapshotAnnotation.cs (2)
9public class ResourceSnapshotAnnotation(CustomResourceSnapshot initialSnapshot) : IResourceAnnotation 14public CustomResourceSnapshot InitialSnapshot { get; } = initialSnapshot ?? throw new ArgumentNullException(nameof(initialSnapshot));
CustomResourceExtensions.cs (2)
18/// <param name="initialSnapshot">The factory to create the initial <see cref="CustomResourceSnapshot"/> for this resource.</param> 20public static IResourceBuilder<TResource> WithInitialState<TResource>(this IResourceBuilder<TResource> builder, CustomResourceSnapshot initialSnapshot)
Dashboard\DashboardLifecycleHook.cs (1)
121var snapshot = new CustomResourceSnapshot()
Dashboard\DashboardServiceData.cs (1)
32static GenericResourceSnapshot CreateResourceSnapshot(IResource resource, string resourceId, DateTime creationTimestamp, CustomResourceSnapshot snapshot)
Dashboard\GenericResourceSnapshot.cs (1)
9internal sealed class GenericResourceSnapshot(CustomResourceSnapshot state) : ResourceSnapshot
Dcp\ApplicationExecutor.cs (6)
362private async Task ProcessResourceChange<T>(WatchEventType watchEventType, T resource, ConcurrentDictionary<string, T> resourceByName, string resourceKind, Func<T, CustomResourceSnapshot, CustomResourceSnapshot> snapshotFactory) where T : CustomResource 587private CustomResourceSnapshot ToSnapshot(Container container, CustomResourceSnapshot previous) 634private CustomResourceSnapshot ToSnapshot(Executable executable, CustomResourceSnapshot previous)
ParameterResourceBuilderExtensions.cs (1)
96var state = new CustomResourceSnapshot()
ResourceBuilderExtensions.cs (2)
644static bool IsContinuableState(CustomResourceSnapshot snapshot) => 721static bool IsKnownTerminalState(CustomResourceSnapshot snapshot) =>
Aspire.Hosting.AWS (2)
AWSLifecycleHook.cs (2)
167private async Task UpdateStateAsync(IAWSResource resource, ILookup<IAWSResource?, IResourceWithParent> parentChildLookup, Func<CustomResourceSnapshot, CustomResourceSnapshot> stateFactory)
Aspire.Hosting.Azure (2)
Provisioning\Provisioners\AzureProvisioner.cs (2)
96async Task UpdateStateAsync((IResource Resource, IAzureResource AzureResource) resource, Func<CustomResourceSnapshot, CustomResourceSnapshot> stateFactory)
Aspire.Hosting.Tests (3)
AddParameterTests.cs (2)
32var state = annotation.InitialSnapshot; 69var state = annotation.InitialSnapshot;
ResourceNotificationTests.cs (1)
32var state = annotation.InitialSnapshot;