13 instantiations of CustomResourceSnapshot
Aspire.Hosting (3)
ApplicationModel\ResourceNotificationService.cs (1)
258
previousState ??= new
CustomResourceSnapshot
()
Dashboard\DashboardLifecycleHook.cs (1)
121
var snapshot = new
CustomResourceSnapshot
()
ParameterResourceBuilderExtensions.cs (1)
96
var 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)
181
return 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.
190
public Task PublishUpdateAsync(IResource resource, string resourceId, Func<
CustomResourceSnapshot
,
CustomResourceSnapshot
> stateFactory)
196
var
previousState = GetCurrentSnapshot(resource, notificationState);
198
var
newState = stateFactory(previousState);
237
/// Updates the snapshot of the <see cref="
CustomResourceSnapshot
"/> for a resource.
241
public Task PublishUpdateAsync(IResource resource, Func<
CustomResourceSnapshot
,
CustomResourceSnapshot
> stateFactory)
246
private static
CustomResourceSnapshot
GetCurrentSnapshot(IResource resource, ResourceNotificationState notificationState)
248
var
previousState = notificationState.LastSnapshot;
276
public
CustomResourceSnapshot
? LastSnapshot { get; set; }
286
public class ResourceEvent(IResource resource, string resourceId,
CustomResourceSnapshot
snapshot)
301
public
CustomResourceSnapshot
Snapshot { get; } = snapshot;
ApplicationModel\ResourceSnapshotAnnotation.cs (2)
9
public class ResourceSnapshotAnnotation(
CustomResourceSnapshot
initialSnapshot) : IResourceAnnotation
14
public
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>
20
public static IResourceBuilder<TResource> WithInitialState<TResource>(this IResourceBuilder<TResource> builder,
CustomResourceSnapshot
initialSnapshot)
Dashboard\DashboardLifecycleHook.cs (1)
121
var
snapshot = new CustomResourceSnapshot()
Dashboard\DashboardServiceData.cs (1)
32
static GenericResourceSnapshot CreateResourceSnapshot(IResource resource, string resourceId, DateTime creationTimestamp,
CustomResourceSnapshot
snapshot)
Dashboard\GenericResourceSnapshot.cs (1)
9
internal sealed class GenericResourceSnapshot(
CustomResourceSnapshot
state) : ResourceSnapshot
Dcp\ApplicationExecutor.cs (6)
362
private async Task ProcessResourceChange<T>(WatchEventType watchEventType, T resource, ConcurrentDictionary<string, T> resourceByName, string resourceKind, Func<T,
CustomResourceSnapshot
,
CustomResourceSnapshot
> snapshotFactory) where T : CustomResource
587
private
CustomResourceSnapshot
ToSnapshot(Container container,
CustomResourceSnapshot
previous)
634
private
CustomResourceSnapshot
ToSnapshot(Executable executable,
CustomResourceSnapshot
previous)
ParameterResourceBuilderExtensions.cs (1)
96
var
state = new CustomResourceSnapshot()
ResourceBuilderExtensions.cs (2)
644
static bool IsContinuableState(
CustomResourceSnapshot
snapshot) =>
721
static bool IsKnownTerminalState(
CustomResourceSnapshot
snapshot) =>
Aspire.Hosting.AWS (2)
AWSLifecycleHook.cs (2)
167
private async Task UpdateStateAsync(IAWSResource resource, ILookup<IAWSResource?, IResourceWithParent> parentChildLookup, Func<
CustomResourceSnapshot
,
CustomResourceSnapshot
> stateFactory)
Aspire.Hosting.Azure (2)
Provisioning\Provisioners\AzureProvisioner.cs (2)
96
async Task UpdateStateAsync((IResource Resource, IAzureResource AzureResource) resource, Func<
CustomResourceSnapshot
,
CustomResourceSnapshot
> stateFactory)
Aspire.Hosting.Tests (3)
AddParameterTests.cs (2)
32
var
state = annotation.InitialSnapshot;
69
var
state = annotation.InitialSnapshot;
ResourceNotificationTests.cs (1)
32
var
state = annotation.InitialSnapshot;