Esempio n. 1
0
        override public object Clone()
        {
            Block clone = new Block();

            clone._lexicalInfo       = _lexicalInfo;
            clone._endSourceLocation = _endSourceLocation;
            clone._documentation     = _documentation;
            clone._isSynthetic       = _isSynthetic;
            clone._entity            = _entity;
            if (_annotations != null)
            {
                clone._annotations = (Hashtable)_annotations.Clone();
            }
            if (null != _modifier)
            {
                clone._modifier = _modifier.Clone() as StatementModifier;
                clone._modifier.InitializeParent(clone);
            }
            if (null != _statements)
            {
                clone._statements = _statements.Clone() as StatementCollection;
                clone._statements.InitializeParent(clone);
            }
            return(clone);
        }
Esempio n. 2
0
        override public object Clone()
        {
            Block clone = (Block)FormatterServices.GetUninitializedObject(typeof(Block));

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

            if (null != _modifier)
            {
                clone._modifier = _modifier.Clone() as StatementModifier;
                clone._modifier.InitializeParent(clone);
            }
            if (null != _statements)
            {
                clone._statements = _statements.Clone() as StatementCollection;
                clone._statements.InitializeParent(clone);
            }
            return(clone);
        }