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 | |
---|---|---|
Connected | Indicates whether the ProviderConnector<T> object is connected. |
|
Connection | Gets the current connection. |
|
ConnectionTimeoutNotification | Gets or sets the timeout notification. |
|
Identifier | Gets the identifier of the provider. |
Methods
Name | Description | |
---|---|---|
Connect() | Asynchronously connects to a provider. |
|
Connect(Object) | Asynchronously connects to a provider with the specified callback. |
|
Disconnect() | Disconnects the provider from the service. |
|
Dispose() | Release all resources that are used by the ProviderConnector<T> object. |
|
Equals(Object) | (Inherited from Object.) |
|
Finalize() | eleases unmanaged resources and performs other cleanup operations before the ProviderConnector<T> object is reclaimed by garbage collection.(Overrides Object.Finalize().) |
|
GetHashCode() | (Inherited from Object.) |
|
GetType() | (Inherited from Object.) |
|
ToString() | (Inherited from Object.) |
|
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. |
|
WaitForTimeout(TimeSpan) | Waits the specified duration for a connection. |
Events
Name | Description | |
---|---|---|
ConnectionClosed | Represents the event that is raised when the current connection is closed. |
|
ConnectionFailed | Represents the event that is raised when the connection was not successful. |
|
ConnectionOpened | Represents the event that is raised when a connection succeeds and the connection is available for use. |
|
ConnectionTimeout | Represents the event that is raised when the connection times out. |
|
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