private static async Task Wado(Message message, CancellationToken token) { (string studyInstanceUid, string seriesInstanceUid, string sopInstanceUid) = ParseMessageForUids(message); if (sopInstanceUid != null) { await client.RetrieveInstanceAsync(studyInstanceUid, seriesInstanceUid, sopInstanceUid, cancellationToken : token); } else if (seriesInstanceUid != null) { await client.RetrieveSeriesAsync(studyInstanceUid, seriesInstanceUid, cancellationToken : token); } else { await client.RetrieveStudyAsync(studyInstanceUid, cancellationToken : token); } return; }
private async Task VerifySeriesRemoval(string studyInstanceUid, string seriesInstanceUid) { DicomWebException exception = await Assert.ThrowsAsync <DicomWebException>(() => _client.RetrieveSeriesAsync(studyInstanceUid, seriesInstanceUid)); Assert.Equal(HttpStatusCode.NotFound, exception.StatusCode); }