29 references to ResourceSnapshotChangeType
Aspire.Hosting (12)
Dashboard\DashboardService.cs (2)
248if (update.ChangeType is ResourceSnapshotChangeType.Upsert) 252else 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)
365var changeType = watchEventType switch 367WatchEventType.Added or WatchEventType.Modified => ResourceSnapshotChangeType.Upsert, 368WatchEventType.Deleted => ResourceSnapshotChangeType.Delete, 369_ => throw new System.ComponentModel.InvalidEnumArgumentException($"Cannot convert {nameof(WatchEventType)} with value {watchEventType} into enum of type {nameof(ResourceSnapshotChangeType)}.") 378if (changeType == ResourceSnapshotChangeType.Delete)
Aspire.Hosting.Tests (17)
Dashboard\ResourcePublisherTests.cs (16)
22await publisher.IntegrateAsync(new TestResource("A"), a, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 23await publisher.IntegrateAsync(new TestResource("B"), b, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 45await publisher.IntegrateAsync(new TestResource("C"), c, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 48Assert.Equal(ResourceSnapshotChangeType.Upsert, change.ChangeType); 75await publisher.IntegrateAsync(new TestResource("A"), a, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 76await publisher.IntegrateAsync(new TestResource("B"), b, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 88await publisher.IntegrateAsync(new TestResource("C"), c, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 99Assert.Equal(ResourceSnapshotChangeType.Upsert, v1.ChangeType); 100Assert.Equal(ResourceSnapshotChangeType.Upsert, v2.ChangeType); 122await publisher.IntegrateAsync(new TestResource("A"), a1, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 123await publisher.IntegrateAsync(new TestResource("A"), a2, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 124await publisher.IntegrateAsync(new TestResource("A"), a3, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 142await publisher.IntegrateAsync(new TestResource("A"), a, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 143await publisher.IntegrateAsync(new TestResource("B"), b, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 144await publisher.IntegrateAsync(new TestResource("A"), a, ResourceSnapshotChangeType.Delete).DefaultTimeout(); 176await 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))