ServiceManager.Publish Method (Type, Object)

.NET Framework (current version)
 

Publishes the given service. After it is published, the service instance remains in the service manager until the editing context is disposed of.

Namespace:   System.Activities.Presentation
Assembly:  System.Activities.Presentation (in System.Activities.Presentation.dll)

public abstract void Publish(
	Type serviceType,
	object serviceInstance
)

Parameters

serviceType
Type: System.Type

The type of service to publish.

serviceInstance
Type: System.Object

An instance of the service.

Exception Condition
ArgumentNullException

serviceType or serviceInstance is null.

ArgumentException

serviceInstance does not derive from or implement serviceType, or serviceType has already been published.

.NET Framework
Available since 4.0
Return to top
Show: