Share via


ProviderConnector<T> Class

 

Represents the methods that are used to attach to events that are associated to a connection to a provider.

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

Inheritance Hierarchy

System.Object
  Microsoft.WindowsServerSolutions.Common.ProviderFramework.ProviderConnector<T>

Syntax

public sealed class ProviderConnector<T> : INotifyPropertyChanged, 
    IDisposable
where T : class
generic<typename T>
where T : ref class
public ref class ProviderConnector sealed : INotifyPropertyChanged, 
    IDisposable
Public NotInheritable Class ProviderConnector(Of T As Class)
    Implements INotifyPropertyChanged, IDisposable

Type Parameters

  • T
    The type of underlying contract.

Properties

Name Description
System_CAPS_pubproperty Connected

Indicates whether the ProviderConnector<T> object is connected.

System_CAPS_pubproperty Connection

Gets the current connection.

System_CAPS_pubproperty ConnectionTimeoutNotification

Gets or sets the timeout notification.

System_CAPS_pubproperty Identifier

Gets the identifier of the provider.

Methods

Name Description
System_CAPS_pubmethod Connect()

Asynchronously connects to a provider.

System_CAPS_pubmethod Connect(Object)

Asynchronously connects to a provider with the specified callback.

System_CAPS_pubmethod Disconnect()

Disconnects the provider from the service.

System_CAPS_pubmethod Dispose()

Release all resources that are used by the ProviderConnector<T> object.

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

eleases unmanaged resources and performs other cleanup operations before the ProviderConnector<T> object is reclaimed by garbage collection.(Overrides Object.Finalize().)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_pubmethod WaitForConnection(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.

System_CAPS_pubmethod WaitForTimeout(TimeSpan)

Waits the specified duration for a connection.

Events

Name Description
System_CAPS_pubevent ConnectionClosed

Represents the event that is raised when the current connection is closed.

System_CAPS_pubevent ConnectionFailed

Represents the event that is raised when the connection was not successful.

System_CAPS_pubevent ConnectionOpened

Represents the event that is raised when a connection succeeds and the connection is available for use.

System_CAPS_pubevent ConnectionTimeout

Represents the event that is raised when the connection times out.

System_CAPS_pubevent PropertyChanged

Represents the INotifyPropertyChanged event that is raised when a property value is changed.

Remarks

A ProviderConnector<T> object enables the passing of a single object for all communication without having to propagate the new connections when a connection is re-established.

Thread Safety

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.WindowsServerSolutions.Common.ProviderFramework Namespace

Return to top