MetadataBuilder.AddLocalScope(MethodDefinitionHandle, ImportScopeHandle, LocalVariableHandle, LocalConstantHandle, Int32, Int32) Método
Definición
Agrega información de depuración del ámbito local.Adds local scope debug information.
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
Parámetros
- method
- MethodDefinitionHandle
El método contenedor.The containing method.
- importScope
- ImportScopeHandle
El identificador del ámbito de importación asociado.The handle of the associated import scope.
- variableList
- LocalVariableHandle
Si el ámbito declara variables, establézcalo en el identificador de la primera.If the scope declares variables, set this to the handle of the first one. De lo contrario, establézcalo en el identificador de la primera variable declarada por la definición de ámbito siguiente.Otherwise, set this to the handle of the first variable declared by the next scope definition. Si ningún ámbito define variables, System.Reflection.Metadata.Ecma335.MetadataTokens.LocalVariableHandle(1)
.If no scope defines any variables, System.Reflection.Metadata.Ecma335.MetadataTokens.LocalVariableHandle(1)
.
- constantList
- LocalConstantHandle
Si el ámbito declara constantes, establézcalo en el identificador de la primera.If the scope declares constants, set this the handle of the first one. De lo contrario, establézcalo en el identificador de la primera constante declarada por la definición de ámbito siguiente.Otherwise, set this to the handle of the first constant declared by the next scope definition. Si ningún ámbito define constantes, System.Reflection.Metadata.Ecma335.MetadataTokens.LocalConstantHandle(1)
.If no scope defines any constants, System.Reflection.Metadata.Ecma335.MetadataTokens.LocalConstantHandle(1)
.
- startOffset
- Int32
El desplazamiento de la primera instrucción incluida en el ámbito.The offset of the first instruction covered by the scope.
- length
- Int32
La longitud (en bytes) del bloque ámbito.The length (in bytes) of the scope.
Devoluciones
Un identificador del ámbito local agregado.A handle to the added local scope.
Comentarios
Los ámbitos locales deben agregarse en el mismo orden que la definición de método correspondiente.Local scopes should be added in the same order as the corresponding method definition.
Dentro de un método, se deben ordenar de forma ascendente startOffset
y descendente length
.Within a method, they should be ordered by ascending startOffset
and then by descending length
.