DicomObjects.NET10 Documentation
DicomObjects.DicomWeb Namespace / WorkItemWebClient Class / SubscribeAsync Method
The Subscribe Target Resource
deletionlock query parameter in the Subscribe request
The AETitle of Subscriber
The Workitem UID for matching, required if Resource is Workitem
A Workitem Subscription will be created for any existing and future Workitem that matches the attribute/value pairs of the filter.
A token that may be used to cancel the operation
Example



In This Topic
    SubscribeAsync Method
    In This Topic
    Asynchronous transaction that creates a Subscription to a Worklist or Workitem resource. It corresponds to the UPS DIMSE N-ACTION operation "Subscribe to Receive UPS Event Reports".
    Syntax
    'Declaration
     
    
    <AsyncStateMachineAttribute(DicomObjects.DicomWeb.WorkItemWebClient/d__36)> 
    Public Function SubscribeAsync( _ 
       ByVal Resource As SubscribeTargetResource, _ 
       ByVal DeletionLock As Boolean, _ 
       ByVal AETitle As String, _ 
       ByVal WorkItemUID As String, _ 
       ByVal FilterDataSet As DicomDataSet, _ 
       Optional ByVal cancellationToken As CancellationToken _ 
    ) As Task(Of HttpResponseMessage)
    'Usage
     
    
    Dim instance As WorkItemWebClient
    Dim Resource As SubscribeTargetResource
    Dim DeletionLock As Boolean
    Dim AETitle As String
    Dim WorkItemUID As String
    Dim FilterDataSet As DicomDataSet
    Dim cancellationToken As CancellationToken
    Dim value As Task(Of HttpResponseMessage)
     
    value = instance.SubscribeAsync(Resource, DeletionLock, AETitle, WorkItemUID, FilterDataSet, cancellationToken)

    Parameters

    Resource
    The Subscribe Target Resource
    DeletionLock
    deletionlock query parameter in the Subscribe request
    AETitle
    The AETitle of Subscriber
    WorkItemUID
    The Workitem UID for matching, required if Resource is Workitem
    FilterDataSet
    A Workitem Subscription will be created for any existing and future Workitem that matches the attribute/value pairs of the filter.
    cancellationToken
    A token that may be used to cancel the operation

    Return Value

    A DicomObjects.DicomDataSet object that represents the retreived Workitem (UPS) object
    Remarks
    The async operation will return as soon as the response is available and headers are read (content is not read yet)
    Example
    WorkItemWebClient wwc = new WorkItemWebClient(BaseUri);
    var ds = wwc.Retrieve("1.2.3.4.5.6.7.8.9");
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also