다음을 통해 공유


HttpMessageInvoker Constructor (HttpMessageHandler, Boolean)

Initializes a new instance of the HttpMessageInvoker class with the specified message handler and value that indicates whether this instance is responsible for disposing the handler.

Namespace:  System.Net.Http
Assembly:  System.Net.Http (in System.Net.Http.dll)

Syntax

'Declaration
Public Sub New ( _
    handler As HttpMessageHandler, _
    disposeHandler As Boolean _
)
'Usage
Dim handler As HttpMessageHandler 
Dim disposeHandler As Boolean 

Dim instance As New HttpMessageInvoker(handler, _
    disposeHandler)
public HttpMessageInvoker(
    HttpMessageHandler handler,
    bool disposeHandler
)
public:
HttpMessageInvoker(
    HttpMessageHandler^ handler, 
    bool disposeHandler
)
new : 
        handler:HttpMessageHandler * 
        disposeHandler:bool -> HttpMessageInvoker
public function HttpMessageInvoker(
    handler : HttpMessageHandler, 
    disposeHandler : boolean
)

Parameters

  • disposeHandler
    Type: System.Boolean
    true if the inner handler should be disposed of by the Dispose method, or false if you intend to reuse the inner handler.

See Also

Reference

HttpMessageInvoker Class

HttpMessageInvoker Overload

System.Net.Http Namespace