Share via


MetadataBuilder.AddLocalScope メソッド

定義

ローカル スコープのデバッグ情報を追加します。

public:
 System::Reflection::Metadata::LocalScopeHandle AddLocalScope(System::Reflection::Metadata::MethodDefinitionHandle method, System::Reflection::Metadata::ImportScopeHandle importScope, System::Reflection::Metadata::LocalVariableHandle variableList, System::Reflection::Metadata::LocalConstantHandle constantList, int startOffset, int length);
public System.Reflection.Metadata.LocalScopeHandle AddLocalScope (System.Reflection.Metadata.MethodDefinitionHandle method, System.Reflection.Metadata.ImportScopeHandle importScope, System.Reflection.Metadata.LocalVariableHandle variableList, System.Reflection.Metadata.LocalConstantHandle constantList, int startOffset, int length);
member this.AddLocalScope : System.Reflection.Metadata.MethodDefinitionHandle * System.Reflection.Metadata.ImportScopeHandle * System.Reflection.Metadata.LocalVariableHandle * System.Reflection.Metadata.LocalConstantHandle * int * int -> System.Reflection.Metadata.LocalScopeHandle
Public Function AddLocalScope (method As MethodDefinitionHandle, importScope As ImportScopeHandle, variableList As LocalVariableHandle, constantList As LocalConstantHandle, startOffset As Integer, length As Integer) As LocalScopeHandle

パラメーター

method
MethodDefinitionHandle

含まれているメソッド。

importScope
ImportScopeHandle

関連付けられたインポート スコープのハンドル。

variableList
LocalVariableHandle

スコープで変数が宣言されている場合は、これは最初のハンドルに設定します。 それ以外の場合は、次のスコープ定義で宣言されている最初の変数のハンドルに設定します。 スコープに変数が定義されていない場合は、System.Reflection.Metadata.Ecma335.MetadataTokens.LocalVariableHandle(1) とします。

constantList
LocalConstantHandle

スコープで定数が宣言されている場合は、これを最初のハンドルに設定します。 それ以外の場合は、次のスコープ定義で宣言されている最初の定数のハンドルに設定します。 スコープに定数が定義されていない場合は、System.Reflection.Metadata.Ecma335.MetadataTokens.LocalConstantHandle(1) とします。

startOffset
Int32

スコープによってカバーされる最初の命令のオフセット。

length
Int32

スコープの長さ (バイト単位)。

戻り値

追加されたローカル スコープのハンドル。

注釈

ローカル スコープは、対応するメソッド定義と同じ順序で追加する必要があります。

メソッド内では、昇順で並べ替え、次に をlength降順に並べstartOffset替える必要があります。

適用対象