Share via


ProviderHost Class

 

Represents a generic host environment for providers.

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

Inheritance Hierarchy

System.Object
  Microsoft.WindowsServerSolutions.Common.ProviderFramework.ProviderHost

Syntax

public sealed class ProviderHost : IDisposable
public ref class ProviderHost sealed : IDisposable
Public NotInheritable Class ProviderHost
    Implements IDisposable

Constructors

Name Description
System_CAPS_pubmethod ProviderHost(Object, String)

Initializes a new instance of the ProviderHost class with the specified contract object and identifier.

System_CAPS_pubmethod ProviderHost(Object, String, IList<Type>)

Initializes a new instance of the ProviderHost class with the specified contract object, provider identifier, and optional list of contract objects.

System_CAPS_pubmethod ProviderHost(Type, String)

Initializes a new instance of the ProviderHost class with the specified contract type and provider identifier.

System_CAPS_pubmethod ProviderHost(Type, String, IList<Type>)

Initializes a new instance of the ProviderHost class with the specified contract type, provider identifier, and optional list of contract objects.

Properties

Name Description
System_CAPS_pubproperty ProviderId

Gets the identifier for the provider.

System_CAPS_pubproperty ProviderInfo

Gets the ProviderInfo objects that represent where this service is reachable.

System_CAPS_pubproperty ProviderType

Gets the type of the provider.

System_CAPS_pubproperty SingletonInstance

Gets the singleton instance of the hosted service.

Methods

Name Description
System_CAPS_pubmethod Abort()

Causes a ProviderHost object to transition immediately from its current state into the closing state.

System_CAPS_pubmethod Disconnect()

Disconnect the host.

System_CAPS_pubmethod Disconnect(TimeSpan)

Disconnect the host within the specified time period.

System_CAPS_pubmethod Dispose()

Releases all of the resources that are used by the ProviderHost object.

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod Open()

Opens the hosted provider, which makes it available to client applications, and registers the provider with the Provider Registry Service.

System_CAPS_pubmethod Open(TimeSpan)

Opens the hosted provider with the specified timeout value, which makes it available to client applications, and registers the provider with the Provider Registry Service.

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Remarks

If your provider is running in a Windows service it is recommended that you use the ProviderServiceBase class to host instances of ProviderHost.

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