System.Linq.Expressions.Compiler.LabelScopeInfo.AddLabelInfo C# (CSharp) Method

AddLabelInfo() private method

private AddLabelInfo ( LabelTarget target, LabelInfo info ) : void
target LabelTarget
info LabelInfo
return void
        internal void AddLabelInfo(LabelTarget target, LabelInfo info)
        {
            Debug.Assert(CanJumpInto);

            if (_labels == null)
            {
                _labels = new Dictionary<LabelTarget, LabelInfo>();
            }

            _labels.Add(target, info);
        }
    }

Usage Example

コード例 #1
0
 internal void Define(LabelScopeInfo block)
 {
     for (LabelScopeInfo info = block; info != null; info = info.Parent)
     {
         if (info.ContainsTarget(this._node))
         {
             throw System.Linq.Expressions.Error.LabelTargetAlreadyDefined(this._node.Name);
         }
     }
     this._definitions.Add(block);
     block.AddLabelInfo(this._node, this);
     if (this._definitions.Count == 1)
     {
         foreach (LabelScopeInfo info2 in this._references)
         {
             this.ValidateJump(info2);
         }
     }
     else
     {
         if (this._acrossBlockJump)
         {
             throw System.Linq.Expressions.Error.AmbiguousJump(this._node.Name);
         }
         this._labelDefined = false;
     }
 }
All Usage Examples Of System.Linq.Expressions.Compiler.LabelScopeInfo::AddLabelInfo