Example #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);
        }
Example #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);
            }
        }
Example #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);
       }
 }
Example #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);
 }
 /// <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);
 }