Share via


Publish(TServiceType) Method (TServiceType)

Publishes the given service. Once published, the service instance remains in the service collection until the editing context is disposed.

Namespace:  Microsoft.Data.Tools.Design.Core.Context
Assembly:  Microsoft.Data.Tools.Design.Core (in Microsoft.Data.Tools.Design.Core.dll)

Syntax

'Declaration
Public Sub Publish(Of TServiceType) ( _
    serviceInstance As TServiceType _
)
'Usage
Dim instance As ServiceCollection
Dim serviceInstance As TServiceType

instance.Publish(serviceInstance)
public void Publish<TServiceType>(
    TServiceType serviceInstance
)
public:
generic<typename TServiceType>
void Publish(
    TServiceType serviceInstance
)
member Publish : 
        serviceInstance:'TServiceType -> unit 
JScript does not support generic types and methods.

Type Parameters

  • TServiceType

Parameters

  • serviceInstance
    Type: TServiceType
    The instance of the service to publish.

Exceptions

Exception Condition
ArgumentException

If ServiceType has already been published.

See Also

Reference

ServiceCollection Class

Publish Overload

Microsoft.Data.Tools.Design.Core.Context Namespace