Interface IAdvancedDicomClientAssociation
Represents an open DICOM association.
Inherited Members
Namespace: FellowOakDicom.Network.Client.Advanced.Association
Assembly: fo-dicom.core.dll
Syntax
public interface IAdvancedDicomClientAssociation : IDisposable
Properties
Association
Contains information about the DICOM association that was opened
Declaration
DicomAssociation Association { get; }
Property Value
Type | Description |
---|---|
DicomAssociation |
IsDisposed
Whether or not this association is already disposed.
Declaration
bool IsDisposed { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
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.
Declaration
ValueTask AbortAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken | The token that immediately cancels the abort notification. Note that the association will be left in an unusable state regardless. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.ValueTask | A task that will complete when the association is aborted or the connection is closed by the other AE |
Exceptions
Type | Condition |
---|---|
System.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.
Declaration
ValueTask ReleaseAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken | The token that immediately cancels the request. Note that the association will be left in an unusable state regardless. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.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
Type | Condition |
---|---|
System.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.
Declaration
IAsyncEnumerable<DicomResponse> SendRequestAsync(DicomRequest dicomRequest, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DicomRequest | dicomRequest | The request to send |
System.Threading.CancellationToken | cancellationToken | The token that immediately cancels the request |
Returns
Type | Description |
---|---|
System.Collections.Generic.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
Type | Condition |
---|---|
System.OperationCanceledException | When the request is cancelled using the |
System.IO.IOException | When connection/socket issues occur |
DicomNetworkException | When DICOM protocol issues occur |
System.ObjectDisposedException | When the association is already disposed |