19 references to Upsert
Aspire.Hosting (4)
Dashboard\DashboardService.cs (1)
347if (update.ChangeType is ResourceSnapshotChangeType.Upsert)
Dashboard\DashboardServiceData.cs (1)
108await _resourcePublisher.IntegrateAsync(@event.Resource, snapshot, ResourceSnapshotChangeType.Upsert)
Dashboard\ResourcePublisher.cs (1)
92case ResourceSnapshotChangeType.Upsert:
Dcp\DcpResourceWatcher.cs (1)
323WatchEventType.Added or WatchEventType.Modified => ResourceSnapshotChangeType.Upsert,
Aspire.Hosting.Tests (15)
Dashboard\ResourcePublisherTests.cs (15)
66await publisher.IntegrateAsync(new TestResource("A"), a, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 67await publisher.IntegrateAsync(new TestResource("B"), b, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 89await publisher.IntegrateAsync(new TestResource("C"), c, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 92Assert.Equal(ResourceSnapshotChangeType.Upsert, change.ChangeType); 119await publisher.IntegrateAsync(new TestResource("A"), a, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 120await publisher.IntegrateAsync(new TestResource("B"), b, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 132await publisher.IntegrateAsync(new TestResource("C"), c, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 143Assert.Equal(ResourceSnapshotChangeType.Upsert, v1.ChangeType); 144Assert.Equal(ResourceSnapshotChangeType.Upsert, v2.ChangeType); 166await publisher.IntegrateAsync(new TestResource("A"), a1, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 167await publisher.IntegrateAsync(new TestResource("A"), a2, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 168await publisher.IntegrateAsync(new TestResource("A"), a3, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 186await publisher.IntegrateAsync(new TestResource("A"), a, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 187await publisher.IntegrateAsync(new TestResource("B"), b, ResourceSnapshotChangeType.Upsert).DefaultTimeout(); 220await publisher.IntegrateAsync(new TestResource("A"), CreateResourceSnapshot("A"), ResourceSnapshotChangeType.Upsert).DefaultTimeout();