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.
- callback
Type: Microsoft.Windows.Design.PublishServiceCallback
The method to invoke when the service is requested.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.Windows.Design Namespace