29 references to ResourceSnapshotChangeType
Aspire.Hosting (12)
Dashboard\DashboardService.cs (2)
282if (update.ChangeType is ResourceSnapshotChangeType.Upsert) 286else if (update.ChangeType is ResourceSnapshotChangeType.Delete)
Dashboard\DashboardServiceData.cs (1)
79await _resourcePublisher.IntegrateAsync(@event.Resource, snapshot, ResourceSnapshotChangeType.Upsert)
Dashboard\ResourcePublisher.cs (4)
84internal async ValueTask IntegrateAsync(IResource source, ResourceSnapshot snapshot, ResourceSnapshotChangeType changeType) 92case ResourceSnapshotChangeType.Upsert: 96case ResourceSnapshotChangeType.Delete: 116ResourceSnapshotChangeType ChangeType,
Dcp\DcpExecutor.cs (5)
492var changeType = watchEventType switch 494WatchEventType.Added or WatchEventType.Modified => ResourceSnapshotChangeType.Upsert, 495WatchEventType.Deleted => ResourceSnapshotChangeType.Delete, 496_ => throw new System.ComponentModel.InvalidEnumArgumentException($"Cannot convert {nameof(WatchEventType)} with value {watchEventType} into enum of type {nameof(ResourceSnapshotChangeType)}.") 505if (changeType == ResourceSnapshotChangeType.Delete)
Aspire.Hosting.Tests (17)
Dashboard\ResourcePublisherTests.cs (16)
23await publisher.IntegrateAsync(new TestResource("A"), a, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 24await publisher.IntegrateAsync(new TestResource("B"), b, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 46await publisher.IntegrateAsync(new TestResource("C"), c, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 49Assert.Equal(ResourceSnapshotChangeType.Upsert, change.ChangeType); 76await publisher.IntegrateAsync(new TestResource("A"), a, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 77await publisher.IntegrateAsync(new TestResource("B"), b, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 89await publisher.IntegrateAsync(new TestResource("C"), c, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 100Assert.Equal(ResourceSnapshotChangeType.Upsert, v1.ChangeType); 101Assert.Equal(ResourceSnapshotChangeType.Upsert, v2.ChangeType); 123await publisher.IntegrateAsync(new TestResource("A"), a1, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 124await publisher.IntegrateAsync(new TestResource("A"), a2, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 125await publisher.IntegrateAsync(new TestResource("A"), a3, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 143await publisher.IntegrateAsync(new TestResource("A"), a, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 144await publisher.IntegrateAsync(new TestResource("B"), b, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 145await publisher.IntegrateAsync(new TestResource("A"), a, ResourceSnapshotChangeType.Delete).DefaultTimeout(); 177await publisher.IntegrateAsync(new TestResource("A"), CreateResourceSnapshot("A"), ResourceSnapshotChangeType.Upsert).DefaultTimeout();
Helpers\DashboardServiceDataExtensions.cs (1)
21if (TryFindMatch(changes.Where(c => c.ChangeType != ResourceSnapshotChangeType.Delete).Select(c => c.Resource), resourceName, predicate, out match))