VisualBasicDesignerHelper.CreatePrecompiledVisualBasicReference 方法

定义

创建并返回预编译的 VisualBasicReference<TResult> 表达式。

此 API 支持产品基础结构,不能在代码中直接使用。

public:
 static System::Activities::Activity ^ CreatePrecompiledVisualBasicReference(Type ^ targetType, System::String ^ expressionText, System::Collections::Generic::IEnumerable<System::String ^> ^ namespaces, System::Collections::Generic::IEnumerable<System::String ^> ^ referencedAssemblies, System::Activities::LocationReferenceEnvironment ^ environment, [Runtime::InteropServices::Out] Type ^ % returnType, [Runtime::InteropServices::Out] System::Activities::ExpressionParser::SourceExpressionException ^ % compileError, [Runtime::InteropServices::Out] Microsoft::VisualBasic::Activities::VisualBasicSettings ^ % vbSettings);
public static System.Activities.Activity CreatePrecompiledVisualBasicReference (Type targetType, string expressionText, System.Collections.Generic.IEnumerable<string> namespaces, System.Collections.Generic.IEnumerable<string> referencedAssemblies, System.Activities.LocationReferenceEnvironment environment, out Type returnType, out System.Activities.ExpressionParser.SourceExpressionException compileError, out Microsoft.VisualBasic.Activities.VisualBasicSettings vbSettings);
static member CreatePrecompiledVisualBasicReference : Type * string * seq<string> * seq<string> * System.Activities.LocationReferenceEnvironment * Type * SourceExpressionException * VisualBasicSettings -> System.Activities.Activity
Public Shared Function CreatePrecompiledVisualBasicReference (targetType As Type, expressionText As String, namespaces As IEnumerable(Of String), referencedAssemblies As IEnumerable(Of String), environment As LocationReferenceEnvironment, ByRef returnType As Type, ByRef compileError As SourceExpressionException, ByRef vbSettings As VisualBasicSettings) As Activity

参数

targetType
Type

期望的表达式类型。

expressionText
String

采用 Visual Basic 语法的表达式。

namespaces
IEnumerable<String>

导入的命名空间。

referencedAssemblies
IEnumerable<String>

引用的程序集。

environment
LocationReferenceEnvironment

用于将名称解析为其关联的 ArgumentVariable 对象的机制。

returnType
Type

当此方法返回时,包含表达式的结果类型。 此参数未经初始化即被传递。

compileError
SourceExpressionException

当此方法返回时,包含所发生的任何编译错误,或者,如果编译成功,则包含 null。 此参数未经初始化即被传递。

vbSettings
VisualBasicSettings

当此方法返回时,包含编译表达式所需的设置。 此参数未经初始化即被传递。

返回

预编译的 VisualBasicReference<TResult> 表达式。

适用于