ServiceManager.Publish Method (Type, Object)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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.Design
Assembly:  System.Activities.Design.Base (in System.Activities.Design.Base.dll)

Syntax

'Declaration
Public MustOverride Sub Publish ( _
    serviceType As Type, _
    serviceInstance As Object _
)
'Usage
Dim instance As ServiceManager
Dim serviceType As Type
Dim serviceInstance As Object

instance.Publish(serviceType, serviceInstance)
public abstract void Publish(
    Type serviceType,
    Object serviceInstance
)
public:
virtual void Publish(
    Type^ serviceType, 
    Object^ serviceInstance
) abstract
public abstract function Publish(
    serviceType : Type, 
    serviceInstance : Object
)
abstract Publish : 
        serviceType:Type * 
        serviceInstance:Object -> unit 

Parameters

  • serviceType
    Type: System.Type
    The type of service to publish.
  • serviceInstance
    Type: System.Object
    An instance of the service.

Exceptions

Exception Condition
ArgumentNullException

serviceType or serviceInstance is nulla null reference (Nothing in Visual Basic).

ArgumentException

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

.NET Framework Security

Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 4

See Also

Reference

ServiceManager Class

ServiceManager Members

Publish Overload

System.Activities.Design Namespace