CreateException<T, TResult> 类

 

用于创建异常的活动。

命名空间:   Microsoft.Activities
程序集:  Microsoft.Activities(Microsoft.Activities.dll 中)

继承层次结构

System.Object
  System.Activities.Activity
    System.Activities.ActivityWithResult
      System.Activities.Activity<TResult>
        System.Activities.CodeActivity<TResult>
          Microsoft.Activities.CreateException<T, TResult>

语法

public sealed class CreateException<T, TResult> : CodeActivity<TResult>
where T : TResult
where TResult : Exception
generic<typename T, typename TResult>
where T : TResult
where TResult : Exception
public ref class CreateException sealed : CodeActivity<TResult>
[<Sealed>]
type CreateException<'T, 'TResult when 'T : 'TResult when 'TResult : Exception> = 
    class
        inherit CodeActivity<'TResult>
    end
Public NotInheritable Class CreateException(Of T As TResult, TResult As Exception)
    Inherits CodeActivity(Of TResult)

类型参数

  • T
    所创建异常的类型。
  • TResult
    所返回异常的类型。

构造函数

名称 说明
System_CAPS_pubmethod CreateException<T, TResult>()

初始化 CreateException<T, TResult> 类的新实例。

属性

名称 说明
System_CAPS_protproperty CacheId

(从 Activity 继承。)

System_CAPS_pubproperty DisplayName

(从 Activity 继承。)

System_CAPS_pubproperty Id

(从 Activity 继承。)

System_CAPS_protproperty ImplementationVersion

(从 CodeActivity<TResult> 继承。)

System_CAPS_pubproperty InnerException

获取或设置内部异常。

System_CAPS_pubproperty Message

获取或设置异常消息。

System_CAPS_pubproperty Result

(从 Activity<TResult> 继承。)

System_CAPS_pubproperty ResultType

(从 ActivityWithResult 继承。)

方法

名称 说明
System_CAPS_pubmethod Equals(Object)

(从 Object 继承。)

System_CAPS_pubmethod GetHashCode()

(从 Object 继承。)

System_CAPS_pubmethod GetType()

(从 Object 继承。)

System_CAPS_pubmethod ToString()

(从 Activity 继承。)

线程安全

此类型的任何公共静态(Visual Basic 中为 Shared)成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参阅

Microsoft.Activities 命名空间

返回页首