Interface IAdvancedDicomClientAssociation
- Namespace
- FellowOakDicom.Network.Client.Advanced.Association
- Assembly
- fo-dicom.core.dll
Represents an open DICOM association.
public interface IAdvancedDicomClientAssociation : IDisposable
- Inherited Members
- Extension Methods
Properties
Association
Contains information about the DICOM association that was opened
DicomAssociation Association { get; }
Property Value
IsDisposed
Whether or not this association is already disposed.
bool IsDisposed { get; }
Property Value
Methods
AbortAsync(CancellationToken)
Sends a notification to the other AE that this association will be aborted Unlike an association release, an abort is not acknowledged by the other AE and can be performed at any time. Aborting an association may incur a loss of information, if for example it is performed while sending C-STORE requests.
ValueTask AbortAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenThe token that immediately cancels the abort notification. Note that the association will be left in an unusable state regardless.
Returns
- ValueTask
A task that will complete when the association is aborted or the connection is closed by the other AE
Exceptions
- ObjectDisposedException
When the association is already disposed
ReleaseAsync(CancellationToken)
Sends a request to the other AE to release this association. Note that most PACS software close the open TCP connection immediately after an association release. Releasing an association is the proper way of cleaning it up after it is no longer necessary.
ValueTask ReleaseAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenThe token that immediately cancels the request. Note that the association will be left in an unusable state regardless.
Returns
- ValueTask
A task that will complete when the association release has been acknowledged, the association is aborted or the connection is closed by the other AE.
Exceptions
- ObjectDisposedException
When the association is already disposed
SendRequestAsync(DicomRequest, CancellationToken)
Sends a request over this association and returns the received responses from the other AE There is no guarantee that the message will be sent immediately. As part of the association handshake, a maximum number of asynchronously invoked DICOM requests is agreed upon. If the maximum number of pending DICOM requests has already been reached, this request will be enqueued and sent later, once older requests have been processed.
IAsyncEnumerable<DicomResponse> SendRequestAsync(DicomRequest dicomRequest, CancellationToken cancellationToken)
Parameters
dicomRequest
DicomRequestThe request to send
cancellationToken
CancellationTokenThe token that immediately cancels the request
Returns
- IAsyncEnumerable<DicomResponse>
An asynchronous enumerable of responses. C-FIND or C-MOVE requests will typically receive back a pending response per SOP instance, and finally one last success response C-STORE and C-ECHO requests on the other hand typically only receives one response
Exceptions
- OperationCanceledException
When the request is cancelled using the
cancellationToken
- IOException
When connection/socket issues occur
- DicomNetworkException
When DICOM protocol issues occur
- ObjectDisposedException
When the association is already disposed