อ่านในภาษาอังกฤษ แก้ไข

แชร์ผ่าน


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.

C#
public abstract void Subscribe(Type contextItemType, System.Activities.Presentation.SubscribeContextCallback callback);

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

.NET Framework 4.8.1 และรุ่นอื่นๆ
ผลิตภัณฑ์ เวอร์ชัน
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Subscribe<TContextItemType>(SubscribeContextCallback<TContextItemType>)

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

C#
public void Subscribe<TContextItemType>(System.Activities.Presentation.SubscribeContextCallback<TContextItemType> callback) where TContextItemType : System.Activities.Presentation.ContextItem;

Type Parameters

TContextItemType

The type of item you want to subscribe to.

Parameters

callback
SubscribeContextCallback<TContextItemType>

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

Exceptions

callback is null.

Applies to

.NET Framework 4.8.1 และรุ่นอื่นๆ
ผลิตภัณฑ์ เวอร์ชัน
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1