ContractFailedEventArgs 类
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
为 ContractFailed 事件提供方法和数据。
public ref class ContractFailedEventArgs sealed : EventArgs
C#
public sealed class ContractFailedEventArgs : EventArgs
type ContractFailedEventArgs = class
inherit EventArgs
Public NotInheritable Class ContractFailedEventArgs
Inherits EventArgs
- 继承
ContractFailedEventArgs当协定失败时,Contract.ContractFailed对象将传递给 事件。 该 ContractFailed 事件使托管应用程序环境(如交互式解释器、Web 浏览器主机、测试工具或日志记录基础结构)能够收到协定失败的通知。 事件需要完全信任。
Condition |
获取协定失败的条件。 |
Failure |
获取失败的协定的类型。 |
Handled |
指示是否已处理 ContractFailed 事件。 |
Message |
获取描述 ContractFailed 事件的消息。 |
Original |
获取导致 ContractFailed 事件的原始异常。 |
Unwind |
指示是否应该应用代码协定升级策略。 |
Equals(Object) |
确定指定对象是否等于当前对象。 (继承自 Object) |
Get |
作为默认哈希函数。 (继承自 Object) |
Get |
获取当前实例的 Type。 (继承自 Object) |
Memberwise |
创建当前 Object 的浅表副本。 (继承自 Object) |
Set |
将 Handled 属性设置为 |
Set |
将 Unwind 属性设置为 |
To |
返回表示当前对象的字符串。 (继承自 Object) |
产品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.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 |
.NET Standard | 2.0, 2.1 |
UWP | 10.0 |