Esempio n. 1
0
        public async Task <OperationStatus> AddTagsAsync(IEnumerable <AddExtendedQueryTagEntry> entries, CancellationToken cancellationToken = default)
        {
            EnsureArg.IsNotNull(entries, nameof(entries));
            foreach (AddExtendedQueryTagEntry entry in entries)
            {
                _tags.Add(entry.Path);
            }

            DicomWebResponse <OperationReference> response = await _dicomWebClient.AddExtendedQueryTagAsync(entries, cancellationToken);

            OperationReference operation = await response.GetValueAsync();

            return(await GetOperationStatusRetryPolicy.ExecuteAsync(async() =>
            {
                var operationStatus = await _dicomWebClient.GetOperationStatusAsync(operation.Id);
                return await operationStatus.GetValueAsync();
            }));
        }