ServiceManager.Publish<TServiceType> Method (PublishServiceCallback<TServiceType>)

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Publishes the given service type, but does not declare an instance yet. When the service is requested, the PublishServiceCallback will be invoked to create the instance. The callback is invoked only once. After that, the instance it returned is cached.

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

public void Publish<TServiceType>(
	PublishServiceCallback<TServiceType> callback
)

Parameters

callback
Type: System.Activities.Presentation.PublishServiceCallback<TServiceType>

A callback that will be invoked when an instance of the service is needed.

Type Parameters

TServiceType

The type of the service to publish.

Exception Condition
ArgumentException

callback is null.

.NET Framework
Available since 4.0
Return to top
Show: