コード例 #1
0
        override public object Clone()
        {
            ExtendedGeneratorExpression clone = (ExtendedGeneratorExpression)FormatterServices.GetUninitializedObject(typeof(ExtendedGeneratorExpression));

            clone._lexicalInfo       = _lexicalInfo;
            clone._endSourceLocation = _endSourceLocation;
            clone._documentation     = _documentation;
            clone._entity            = _entity;
            if (_annotations != null)
            {
                clone._annotations = (Hashtable)_annotations.Clone();
            }

            clone._expressionType = _expressionType;
            if (null != _items)
            {
                clone._items = _items.Clone() as GeneratorExpressionCollection;
                clone._items.InitializeParent(clone);
            }
            return(clone);
        }
コード例 #2
0
        override public object Clone()
        {
            ExtendedGeneratorExpression clone = new ExtendedGeneratorExpression();

            clone._lexicalInfo       = _lexicalInfo;
            clone._endSourceLocation = _endSourceLocation;
            clone._documentation     = _documentation;
            clone._isSynthetic       = _isSynthetic;
            clone._entity            = _entity;
            if (_annotations != null)
            {
                clone._annotations = (Hashtable)_annotations.Clone();
            }
            clone._expressionType = _expressionType;
            if (null != _items)
            {
                clone._items = _items.Clone() as GeneratorExpressionCollection;
                clone._items.InitializeParent(clone);
            }
            return(clone);
        }