Поделиться через


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

See Also

Reference

ServiceManager Class

Publish Overload

Microsoft.Windows.Design Namespace

EditingContext

ContextItem

Unsubscribe

Subscribe

Other Resources

WPF Designer Extensibility