Opplæring
Modul
Consume an Azure Cosmos DB for NoSQL change feed using the SDK - Training
Process change feed events using the change feed processor in the Azure Cosmos DB for NoSQL .NET SDK.
Denne nettleseren støttes ikke lenger.
Oppgrader til Microsoft Edge for å dra nytte av de nyeste funksjonene, sikkerhetsoppdateringene og den nyeste tekniske støtten.
The Change Feed capability enables you to go through the history of a DICOM® service and act on the create and delete events.
You access the Change Feed by using REST APIs. These APIs, along with sample usage of Change Feed, are documented in the DICOM Change Feed overview. The version of the REST API should be explicitly specified in the request URL as described in the API Versioning for DICOM service Documentation.
The following C# code example shows how to consume Change Feed using the DICOM client package.
const int limit = 10;
using HttpClient httpClient = new HttpClient { BaseAddress = new Uri("<URL>") };
using CancellationTokenSource tokenSource = new CancellationTokenSource();
int read;
List<ChangeFeedEntry> entries = new List<ChangeFeedEntry>();
DicomWebClient client = new DicomWebClient(httpClient);
do
{
read = 0;
DicomWebAsyncEnumerableResponse<ChangeFeedEntry> result = await client.GetChangeFeed(
$"?offset={entries.Count}&limit={limit}&includeMetadata={true}",
tokenSource.Token);
await foreach (ChangeFeedEntry entry in result)
{
read++;
entries.Add(entry);
}
} while (read > 0);
For information, see the DICOM service overview.
Obs!
DICOM® is the registered trademark of the National Electrical Manufacturers Association for its Standards publications relating to digital communications of medical information.
Opplæring
Modul
Consume an Azure Cosmos DB for NoSQL change feed using the SDK - Training
Process change feed events using the change feed processor in the Azure Cosmos DB for NoSQL .NET SDK.