Share via


ProviderConnector<T>.WaitForConnection Method (TimeSpan)

 

Blocks the calling thread until the connection finishes, is canceled, or the timespan is exceeded. In the case of the timespan being exceeded, the connection attempt continues in the background.

Namespace:   Microsoft.WindowsServerSolutions.Common.ProviderFramework
Assembly:  ProviderFramework (in ProviderFramework.dll)

Syntax

public T WaitForConnection(
    TimeSpan duration
)
public:
T WaitForConnection(
    TimeSpan duration
)
Public Function WaitForConnection (
    duration As TimeSpan
) As T

Parameters

  • duration
    Type: System.TimeSpan

    The duration of time to wait for a connection.

Return Value

Type: T

The connection object.

Exceptions

Exception Condition
TimeoutException

The timespan was exceeded.

ConnectionFailedException

The connection failed or was canceled.

See Also

ProviderConnector<T> Class
Microsoft.WindowsServerSolutions.Common.ProviderFramework Namespace

Return to top