SignatureHelper.GetPropertySigHelper 方法

定義

傳回屬性的簽章 Helper。

多載

GetPropertySigHelper(Module, Type, Type[])

指定包含屬性、屬性型別和屬性引數的動態模組後,傳回屬性的簽章 Helper。

GetPropertySigHelper(Module, Type, Type[], Type[], Type[], Type[][], Type[][])

指定包含屬性、屬性型別、屬性引數和傳回型別與引數之自訂修飾詞的動態模組後,傳回屬性的簽章 Helper。

GetPropertySigHelper(Module, CallingConventions, Type, Type[], Type[], Type[], Type[][], Type[][])

以指定的動態模組 (其中包含屬性、呼叫慣例、屬性型別、屬性引數以及傳回型別與引數的自訂修飾詞),傳回屬性的簽章 Helper。

GetPropertySigHelper(Module, Type, Type[])

來源:
SignatureHelper.cs
來源:
SignatureHelper.cs
來源:
SignatureHelper.cs

指定包含屬性、屬性型別和屬性引數的動態模組後,傳回屬性的簽章 Helper。

public:
 static System::Reflection::Emit::SignatureHelper ^ GetPropertySigHelper(System::Reflection::Module ^ mod, Type ^ returnType, cli::array <Type ^> ^ parameterTypes);
public static System.Reflection.Emit.SignatureHelper GetPropertySigHelper (System.Reflection.Module? mod, Type? returnType, Type[]? parameterTypes);
public static System.Reflection.Emit.SignatureHelper GetPropertySigHelper (System.Reflection.Module mod, Type returnType, Type[] parameterTypes);
static member GetPropertySigHelper : System.Reflection.Module * Type * Type[] -> System.Reflection.Emit.SignatureHelper
Public Shared Function GetPropertySigHelper (mod As Module, returnType As Type, parameterTypes As Type()) As SignatureHelper

參數

mod
Module

ModuleBuilder,包含要求 SignatureHelper 的屬性。

returnType
Type

屬性型別。

parameterTypes
Type[]

引數型別,如果屬性沒有引數則為 null

傳回

屬性的 SignatureHelper 物件。

例外狀況

modnull

-或-

parameterTypes 的項目是 null

備註

若要為具有選擇性或必要自訂修飾詞的屬性建立簽章協助程式,請使用 GetPropertySigHelper(Module, Type, Type[], Type[], Type[], Type[][], Type[][]) 方法多載。

適用於

GetPropertySigHelper(Module, Type, Type[], Type[], Type[], Type[][], Type[][])

來源:
SignatureHelper.cs
來源:
SignatureHelper.cs
來源:
SignatureHelper.cs

指定包含屬性、屬性型別、屬性引數和傳回型別與引數之自訂修飾詞的動態模組後,傳回屬性的簽章 Helper。

public:
 static System::Reflection::Emit::SignatureHelper ^ GetPropertySigHelper(System::Reflection::Module ^ mod, Type ^ returnType, cli::array <Type ^> ^ requiredReturnTypeCustomModifiers, cli::array <Type ^> ^ optionalReturnTypeCustomModifiers, cli::array <Type ^> ^ parameterTypes, cli::array <cli::array <Type ^> ^> ^ requiredParameterTypeCustomModifiers, cli::array <cli::array <Type ^> ^> ^ optionalParameterTypeCustomModifiers);
public static System.Reflection.Emit.SignatureHelper GetPropertySigHelper (System.Reflection.Module? mod, Type? returnType, Type[]? requiredReturnTypeCustomModifiers, Type[]? optionalReturnTypeCustomModifiers, Type[]? parameterTypes, Type[][]? requiredParameterTypeCustomModifiers, Type[][]? optionalParameterTypeCustomModifiers);
public static System.Reflection.Emit.SignatureHelper GetPropertySigHelper (System.Reflection.Module mod, Type returnType, Type[] requiredReturnTypeCustomModifiers, Type[] optionalReturnTypeCustomModifiers, Type[] parameterTypes, Type[][] requiredParameterTypeCustomModifiers, Type[][] optionalParameterTypeCustomModifiers);
static member GetPropertySigHelper : System.Reflection.Module * Type * Type[] * Type[] * Type[] * Type[][] * Type[][] -> System.Reflection.Emit.SignatureHelper
Public Shared Function GetPropertySigHelper (mod As Module, returnType As Type, requiredReturnTypeCustomModifiers As Type(), optionalReturnTypeCustomModifiers As Type(), parameterTypes As Type(), requiredParameterTypeCustomModifiers As Type()(), optionalParameterTypeCustomModifiers As Type()()) As SignatureHelper

參數

mod
Module

ModuleBuilder,包含要求 SignatureHelper 的屬性。

returnType
Type

屬性型別。

requiredReturnTypeCustomModifiers
Type[]

型別的陣列,表示傳回型別的必要自訂修飾詞,例如 IsConstIsBoxed。 如果傳回類型沒有必要的自訂修飾詞,則指定 null

optionalReturnTypeCustomModifiers
Type[]

型別的陣列,表示傳回型別的選擇性自訂修飾詞,例如 IsConstIsBoxed。 如果傳回類型沒有選擇性的自訂修飾詞,則指定 null

parameterTypes
Type[]

屬性的引數型別,如果屬性沒有引數則為 null

requiredParameterTypeCustomModifiers
Type[][]

類型陣列的陣列。 每一個型別陣列都表示屬性之對應引數的必要自訂修飾詞。 如果特定引數沒有必要的自訂修飾詞,請指定 null,而不要指定型別的陣列。 如果屬性沒有引數,或者沒有任何引數具有必要的自訂修飾詞,請指定 null,而不要指定陣列的陣列。

optionalParameterTypeCustomModifiers
Type[][]

類型陣列的陣列。 每一個型別陣列都表示屬性之對應引數的選擇性自訂修飾詞。 如果特定引數沒有選擇性的自訂修飾詞,請指定 null,而不要指定型別的陣列。 如果屬性沒有引數,或者沒有任何引數具有選擇性自訂修飾詞,請指定 null,而不要指定陣列的陣列。

傳回

屬性的 SignatureHelper 物件。

例外狀況

modnull

-或-

parameterTypes 的項目是 null

-或-

其中一個指定的自訂修飾詞為 null (不過,您可以為任何引數的自訂修飾詞陣列指定 null)。

簽章已經完成。

-或-

mod 不是 ModuleBuilder

-或-

其中一個指定的自訂修飾詞為陣列型別。

-或-

其中一個指定的自訂修飾詞為開放泛型型別。 也就是說,自訂修飾詞的 ContainsGenericParameters 屬性為 true

-或-

requiredParameterTypeCustomModifiersoptionalParameterTypeCustomModifiers 的大小不等於 parameterTypes 的大小。

備註

System.Runtime.CompilerServices如需代表自訂修飾詞的類別,請參閱 命名空間。

如果屬性沒有自訂修飾詞,請使用 GetPropertySigHelper(Module, Type, Type[]) 方法多載。

適用於

GetPropertySigHelper(Module, CallingConventions, Type, Type[], Type[], Type[], Type[][], Type[][])

來源:
SignatureHelper.cs
來源:
SignatureHelper.cs
來源:
SignatureHelper.cs

以指定的動態模組 (其中包含屬性、呼叫慣例、屬性型別、屬性引數以及傳回型別與引數的自訂修飾詞),傳回屬性的簽章 Helper。

public:
 static System::Reflection::Emit::SignatureHelper ^ GetPropertySigHelper(System::Reflection::Module ^ mod, System::Reflection::CallingConventions callingConvention, Type ^ returnType, cli::array <Type ^> ^ requiredReturnTypeCustomModifiers, cli::array <Type ^> ^ optionalReturnTypeCustomModifiers, cli::array <Type ^> ^ parameterTypes, cli::array <cli::array <Type ^> ^> ^ requiredParameterTypeCustomModifiers, cli::array <cli::array <Type ^> ^> ^ optionalParameterTypeCustomModifiers);
public static System.Reflection.Emit.SignatureHelper GetPropertySigHelper (System.Reflection.Module? mod, System.Reflection.CallingConventions callingConvention, Type? returnType, Type[]? requiredReturnTypeCustomModifiers, Type[]? optionalReturnTypeCustomModifiers, Type[]? parameterTypes, Type[][]? requiredParameterTypeCustomModifiers, Type[][]? optionalParameterTypeCustomModifiers);
public static System.Reflection.Emit.SignatureHelper GetPropertySigHelper (System.Reflection.Module mod, System.Reflection.CallingConventions callingConvention, Type returnType, Type[] requiredReturnTypeCustomModifiers, Type[] optionalReturnTypeCustomModifiers, Type[] parameterTypes, Type[][] requiredParameterTypeCustomModifiers, Type[][] optionalParameterTypeCustomModifiers);
static member GetPropertySigHelper : System.Reflection.Module * System.Reflection.CallingConventions * Type * Type[] * Type[] * Type[] * Type[][] * Type[][] -> System.Reflection.Emit.SignatureHelper
Public Shared Function GetPropertySigHelper (mod As Module, callingConvention As CallingConventions, returnType As Type, requiredReturnTypeCustomModifiers As Type(), optionalReturnTypeCustomModifiers As Type(), parameterTypes As Type(), requiredParameterTypeCustomModifiers As Type()(), optionalParameterTypeCustomModifiers As Type()()) As SignatureHelper

參數

mod
Module

ModuleBuilder,包含要求 SignatureHelper 的屬性。

callingConvention
CallingConventions

屬性存取子的呼叫慣例。

returnType
Type

屬性型別。

requiredReturnTypeCustomModifiers
Type[]

型別的陣列,表示傳回型別的必要自訂修飾詞,例如 IsConstIsBoxed。 如果傳回類型沒有必要的自訂修飾詞,則指定 null

optionalReturnTypeCustomModifiers
Type[]

型別的陣列,表示傳回型別的選擇性自訂修飾詞,例如 IsConstIsBoxed。 如果傳回類型沒有選擇性的自訂修飾詞,則指定 null

parameterTypes
Type[]

屬性的引數型別,如果屬性沒有引數則為 null

requiredParameterTypeCustomModifiers
Type[][]

類型陣列的陣列。 每一個型別陣列都表示屬性之對應引數的必要自訂修飾詞。 如果特定引數沒有必要的自訂修飾詞,請指定 null,而不要指定型別的陣列。 如果屬性沒有引數,或者沒有任何引數具有必要的自訂修飾詞,請指定 null,而不要指定陣列的陣列。

optionalParameterTypeCustomModifiers
Type[][]

類型陣列的陣列。 每一個型別陣列都表示屬性之對應引數的選擇性自訂修飾詞。 如果特定引數沒有選擇性的自訂修飾詞,請指定 null,而不要指定型別的陣列。 如果屬性沒有引數,或者沒有任何引數具有選擇性自訂修飾詞,請指定 null,而不要指定陣列的陣列。

傳回

屬性的 SignatureHelper 物件。

例外狀況

modnull

-或-

parameterTypes 的項目是 null

-或-

其中一個指定的自訂修飾詞為 null (不過,您可以為任何引數的自訂修飾詞陣列指定 null)。

簽章已經完成。

-或-

mod 不是 ModuleBuilder

-或-

其中一個指定的自訂修飾詞為陣列型別。

-或-

其中一個指定的自訂修飾詞為開放泛型型別。 也就是說,自訂修飾詞的 ContainsGenericParameters 屬性為 true

-或-

requiredParameterTypeCustomModifiersoptionalParameterTypeCustomModifiers 的大小不等於 parameterTypes 的大小。

備註

System.Runtime.CompilerServices如需代表自訂修飾詞的類別,請參閱 命名空間。

如果屬性沒有自訂修飾詞,請使用 GetPropertySigHelper(Module, Type, Type[]) 方法多載。

注意

此方法多載是在 .NET Framework 3.5 或更新版本中引進。

適用於