Bewerken

Delen via


ContextItemManager.Subscribe Method

Definition

Overloads

Subscribe(Type, SubscribeContextCallback)

When overridden in a derived class, adds an event callback that is invoked when a context item of the specified item type changes.

Subscribe<TContextItemType>(SubscribeContextCallback<TContextItemType>)

Adds an event callback that is invoked when a context item of the specified item type changes.

Subscribe(Type, SubscribeContextCallback)

When overridden in a derived class, adds an event callback that is invoked when a context item of the specified item type changes.

public:
 abstract void Subscribe(Type ^ contextItemType, System::Activities::Presentation::SubscribeContextCallback ^ callback);
public abstract void Subscribe (Type contextItemType, System.Activities.Presentation.SubscribeContextCallback callback);
abstract member Subscribe : Type * System.Activities.Presentation.SubscribeContextCallback -> unit
Public MustOverride Sub Subscribe (contextItemType As Type, callback As SubscribeContextCallback)

Parameters

contextItemType
Type

The type of item you want to subscribe to.

callback
SubscribeContextCallback

The SubscribeContextCallback that is invoked when contextItemType changes.

Exceptions

contextItemType or callback is null.

Applies to

Subscribe<TContextItemType>(SubscribeContextCallback<TContextItemType>)

Adds an event callback that is invoked when a context item of the specified item type changes.

public:
generic <typename TContextItemType>
 where TContextItemType : System::Activities::Presentation::ContextItem void Subscribe(System::Activities::Presentation::SubscribeContextCallback<TContextItemType> ^ callback);
public void Subscribe<TContextItemType> (System.Activities.Presentation.SubscribeContextCallback<TContextItemType> callback) where TContextItemType : System.Activities.Presentation.ContextItem;
member this.Subscribe : System.Activities.Presentation.SubscribeContextCallback<'ContextItemType (requires 'ContextItemType :> System.Activities.Presentation.ContextItem)> -> unit (requires 'ContextItemType :> System.Activities.Presentation.ContextItem)
Public Sub Subscribe(Of TContextItemType As ContextItem) (callback As SubscribeContextCallback(Of TContextItemType))

Type Parameters

TContextItemType

The type of item you want to subscribe to.

Parameters

callback
SubscribeContextCallback<TContextItemType>

A SubscribeContextCallback<TContextItemType> that is invoked when contextItemType changes.

Exceptions

contextItemType or callback is null.

Applies to