Table of Contents

Interface IConnection

Namespace
NuGet.Protocol.Plugins
Assembly
NuGet.Protocol.dll
public interface IConnection : IDisposable
Inherited Members
Extension Methods

Properties

MessageDispatcher

IMessageDispatcher MessageDispatcher { get; }

Property Value

IMessageDispatcher

Options

ConnectionOptions Options { get; }

Property Value

ConnectionOptions

ProtocolVersion

SemanticVersion ProtocolVersion { get; }

Property Value

SemanticVersion

Methods

Close()

void Close()

SendAsync(Message, CancellationToken)

Task SendAsync(Message message, CancellationToken cancellationToken)

Parameters

message Message
cancellationToken CancellationToken

Returns

Task

SendRequestAndReceiveResponseAsync<TOutbound, TInbound>(MessageMethod, TOutbound, CancellationToken)

Task<TInbound> SendRequestAndReceiveResponseAsync<TOutbound, TInbound>(MessageMethod method, TOutbound payload, CancellationToken cancellationToken) where TOutbound : class where TInbound : class

Parameters

method MessageMethod
payload TOutbound
cancellationToken CancellationToken

Returns

Task<TInbound>

Type Parameters

TOutbound
TInbound

Events

Faulted

event EventHandler<ProtocolErrorEventArgs> Faulted

Event Type

EventHandler<ProtocolErrorEventArgs>

MessageReceived

event EventHandler<MessageEventArgs> MessageReceived

Event Type

EventHandler<MessageEventArgs>