예제 #1
0
        /// <summary>
        /// Begins a lexical scope.
        /// </summary>
        public void BeginScope()
        {
            ILGeneratorScope scope = new ILGeneratorScope(this.offset, this.host.NameTable, this.method);

            this.scopeStack.Push(scope);
            this.scopes.Add(scope);
        }
예제 #2
0
        /// <summary>
        /// Begins a lexical scope.
        /// </summary>
        public void BeginScope(uint numberOfIteratorLocalsInScope)
        {
            ILGeneratorScope scope = new ILGeneratorScope(this.offset, this.host.NameTable, this.method);

            this.scopeStack.Push(scope);
            this.scopes.Add(scope);
            if (numberOfIteratorLocalsInScope == 0)
            {
                return;
            }
            if (this.iteratorScopes == null)
            {
                this.iteratorScopes = new List <ILocalScope>();
            }
            while (numberOfIteratorLocalsInScope-- > 0)
            {
                this.iteratorScopes.Add(scope);
            }
        }
예제 #3
0
 /// <summary>
 /// Begins a lexical scope.
 /// </summary>
 public void BeginScope(uint numberOfIteratorLocalsInScope)
 {
     ILGeneratorScope scope = new ILGeneratorScope(this.offset, this.host.NameTable, this.method);
       this.scopeStack.Push(scope);
       this.scopes.Add(scope);
       if (numberOfIteratorLocalsInScope == 0) return;
       if (this.iteratorScopes == null) this.iteratorScopes = new List<ILocalScope>();
       while (numberOfIteratorLocalsInScope-- > 0) {
     this.iteratorScopes.Add(scope);
       }
 }
예제 #4
0
 /// <summary>
 /// Begins a lexical scope.
 /// </summary>
 public void BeginScope()
 {
     ILGeneratorScope scope = new ILGeneratorScope(this.offset, this.host.NameTable, this.method);
       this.scopeStack.Push(scope);
       this.scopes.Add(scope);
 }
예제 #5
0
 /// <summary>
 /// Begins a lexical scope.
 /// </summary>
 public void BeginScope()
 {
     var startLabel = new ILGeneratorLabel();
       this.MarkLabel(startLabel);
       ILGeneratorScope scope = new ILGeneratorScope(startLabel, this.host.NameTable, this.method);
       this.scopeStack.Push(scope);
       this.scopes.Add(scope);
 }