Interface IConnectable
Represents a connection.
Inherited Members
Namespace: Microsoft.XboxStudios.DeviceConsole.Connections
Assembly: DeviceConsole.Abstractions.dll
Syntax
public interface IConnectable : IHasConnectionStatus
Properties
View SourceConnectionName
Gets the connection name.
Declaration
string ConnectionName { get; }
Property Value
Type | Description |
---|---|
string |
Methods
View SourceConnectAsync(TimeSpan?)
Attempts to connect, if not already connected.
Declaration
Task ConnectAsync(TimeSpan? timeout = null)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan? | timeout | The timeout for the operation. |
Returns
Type | Description |
---|---|
Task | A task for the asynchronous operation. |
ConnectAsync(CancellationToken)
Attempts to connect, if not already connected.
Declaration
Task ConnectAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The cancellation token for the operation. |
Returns
Type | Description |
---|---|
Task | A task for the asynchronous operation. |
DisconnectAsync(TimeSpan?)
Attempts to disconnect.
Declaration
Task DisconnectAsync(TimeSpan? timeout = null)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan? | timeout | The timeout for the operation. |
Returns
Type | Description |
---|---|
Task | A task for the asynchronous operation. |
DisconnectAsync(CancellationToken)
Attempts to disconnect.
Declaration
Task DisconnectAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The cancellation token for the operation. |
Returns
Type | Description |
---|---|
Task | A task for the asynchronous operation. |
Events
View SourceConnectionStatusChanged
Occurs when the connection status changes.
Declaration
event EventHandler ConnectionStatusChanged
Event Type
Type | Description |
---|---|
EventHandler |