ServiceManager.Publish Method (Type, PublishServiceCallback)

When overridden in a derived class, publishes a service of the specified type, represented by the specified method.

Namespace:  Microsoft.Windows.Design
Assembly:  Microsoft.Windows.Design.Extensibility (in Microsoft.Windows.Design.Extensibility.dll)

Syntax

'Declaration
Public MustOverride Sub Publish ( _
    serviceType As Type, _
    callback As PublishServiceCallback _
)
public abstract void Publish(
    Type serviceType,
    PublishServiceCallback callback
)
public:
virtual void Publish(
    Type^ serviceType, 
    PublishServiceCallback^ callback
) abstract
abstract Publish : 
        serviceType:Type * 
        callback:PublishServiceCallback -> unit 
public abstract function Publish(
    serviceType : Type, 
    callback : PublishServiceCallback
)

Parameters

  • serviceType
    Type: System.Type
    The type of service that is being published.

Remarks

This overload of Publish publishes the service type, but does not declare an instance of the service. When a request is made for the service, callback is invoked to create the instance. The callback is invoked only one time and the instance is cached.

.NET Framework Security

See Also

Reference

ServiceManager Class

Publish Overload

Microsoft.Windows.Design Namespace

EditingContext

ContextItem

Unsubscribe

Subscribe

Other Resources

WPF Designer Extensibility