SymWriter.OpenScope(Int32) Método

Definição

Abre um novo escopo léxico no método atual.Opens a new lexical scope in the current method.

public:
 override int OpenScope(int startOffset);
public:
 virtual int OpenScope(int startOffset);
public override int OpenScope (int startOffset);
public virtual int OpenScope (int startOffset);
abstract member OpenScope : int -> int
override this.OpenScope : int -> int
Public Overrides Function OpenScope (startOffset As Integer) As Integer
Public Overridable Function OpenScope (startOffset As Integer) As Integer

Parâmetros

startOffset
Int32

O deslocamento de IL em bytes do início do método até a primeira instrução no escopo léxico.The IL offset in bytes from the beginning of the method to the first instruction in the lexical scope.

Retornos

Int32

Um identificador de escopo opaco que pode ser usado com SetScopeRange(Int32, Int32, Int32) para definir os deslocamentos de início e término de um escopo em um momento posterior.An opaque scope identifier that can be used with SetScopeRange(Int32, Int32, Int32) to define the start and end offsets of a scope at a later time. Nesse caso, os deslocamentos passados para OpenScope(Int32) e CloseScope(Int32) são ignorados.In this case, the offsets passed to OpenScope(Int32) and CloseScope(Int32) are ignored. Um identificador de escopo é válido somente no método atual.A scope identifier is valid only in the current method.

Implementações

Comentários

Esse escopo se torna o novo escopo atual e é enviado por push para uma pilha de escopos.This scope becomes the new current scope and is pushed onto a stack of scopes. Os escopos devem formar uma hierarquia.Scopes must form a hierarchy. Irmãos não têm permissão para se sobrepor.Siblings are not allowed to overlap.

Os identificadores de escopo só são válidos no método atual.Scope identifiers are only valid in the current method.

Aplica-se a