ContextItemManager.Unsubscribe 方法 (Type, SubscribeContextCallback)
[本文档仅供预览,在以后的发行版中可能会发生更改。包含的空白主题用作占位符。]
在派生类中重写时,移除一个订阅。
命名空间: Microsoft.Windows.Design
程序集: Microsoft.Windows.Design.Extensibility(在 Microsoft.Windows.Design.Extensibility.dll 中)
语法
声明
Public MustOverride Sub Unsubscribe ( _
contextItemType As Type, _
callback As SubscribeContextCallback _
)
public abstract void Unsubscribe(
Type contextItemType,
SubscribeContextCallback callback
)
public:
virtual void Unsubscribe(
Type^ contextItemType,
SubscribeContextCallback^ callback
) abstract
abstract Unsubscribe :
contextItemType:Type *
callback:SubscribeContextCallback -> unit
public abstract function Unsubscribe(
contextItemType : Type,
callback : SubscribeContextCallback
)
参数
- contextItemType
类型:System.Type
要从中移除回调的上下文项的类型。
- callback
类型:Microsoft.Windows.Design.SubscribeContextCallback
要移除的回调。
异常
异常 | 条件 |
---|---|
ArgumentNullException | contextItemType 或 callback 为 nulla null reference (Nothing in Visual Basic)。 |
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。
请参见
参考
SubscribeContextCallback<TContextItemType>