Пример #1
0
        override public object Clone()
        {
            StatementTypeMember clone = (StatementTypeMember)FormatterServices.GetUninitializedObject(typeof(StatementTypeMember));

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

            clone._modifiers = _modifiers;
            clone._name      = _name;
            if (null != _attributes)
            {
                clone._attributes = _attributes.Clone() as AttributeCollection;
                clone._attributes.InitializeParent(clone);
            }
            if (null != _statement)
            {
                clone._statement = _statement.Clone() as Statement;
                clone._statement.InitializeParent(clone);
            }
            return(clone);
        }
Пример #2
0
        override public object Clone()
        {
            StatementTypeMember clone = new StatementTypeMember();

            clone._lexicalInfo       = _lexicalInfo;
            clone._endSourceLocation = _endSourceLocation;
            clone._documentation     = _documentation;
            clone._isSynthetic       = _isSynthetic;
            clone._entity            = _entity;
            if (_annotations != null)
            {
                clone._annotations = (Hashtable)_annotations.Clone();
            }
            clone._modifiers = _modifiers;
            clone._name      = _name;
            if (null != _attributes)
            {
                clone._attributes = _attributes.Clone() as AttributeCollection;
                clone._attributes.InitializeParent(clone);
            }
            if (null != _statement)
            {
                clone._statement = _statement.Clone() as Statement;
                clone._statement.InitializeParent(clone);
            }
            return(clone);
        }