ServiceManager.Publish<TServiceType> Method (TServiceType)
Publishes the specified service instance of the specified type.
Namespace: Microsoft.Windows.Design
Assembly: Microsoft.Windows.Design.Extensibility (in Microsoft.Windows.Design.Extensibility.dll)
Syntax
'Declaration
Public Sub Publish(Of TServiceType) ( _
serviceInstance As TServiceType _
)
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 or methods.
Type Parameters
- TServiceType
Parameters
- serviceInstance
Type: TServiceType
An instance of the service.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | serviceInstance is nulla null reference (Nothing in Visual Basic). |
Remarks
Once the service is created in an EditingContext it is always present. A service cannot be removed from the EditingContext.
.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