DicomObjects.NET10 Documentation
DicomObjects.DicomWeb Namespace / RestfulResponse Class / CreateAsync Method / CreateAsync(HttpContent,CancellationToken) Method
Content of the HTTP response that this object represents
A token to cancel the asynchronous operation



In This Topic
    CreateAsync(HttpContent,CancellationToken) Method
    In This Topic
    Asynchronously creates a RestfulResponse from HTTP content returned by a DICOMweb/RESTful request.
    Syntax
    'Declaration
     
    
    <AsyncStateMachineAttribute(DicomObjects.DicomWeb.RestfulResponse/d__10)> 
    Public Overloads Shared Function CreateAsync( _ 
       ByVal content As HttpContent, _ 
       Optional ByVal cancellationToken As CancellationToken _ 
    ) As Task(Of RestfulResponse)
    'Usage
     
    
    Dim content As HttpContent
    Dim cancellationToken As CancellationToken
    Dim value As Task(Of RestfulResponse)
     
    value = RestfulResponse.CreateAsync(content, cancellationToken)
    [AsyncStateMachine(DicomObjects.DicomWeb.RestfulResponse/d__10)] 
    public static Task<RestfulResponse> CreateAsync( 
       HttpContent content, 
       CancellationToken cancellationToken 
    )
    [AsyncStateMachine(DicomObjects.DicomWeb.RestfulResponse/d__10)] 
    public: 
    static Task<RestfulResponse^>^ CreateAsync( 
       HttpContent^ content, 
       CancellationToken cancellationToken 
    ) 

    Parameters

    content
    Content of the HTTP response that this object represents
    cancellationToken
    A token to cancel the asynchronous operation

    Return Value

    A task containing the populated RestfulResponse.
    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