override public object Clone() { Property clone = (Property)FormatterServices.GetUninitializedObject(typeof(Property)); 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 != _parameters) { clone._parameters = _parameters.Clone() as ParameterDeclarationCollection; clone._parameters.InitializeParent(clone); } if (null != _getter) { clone._getter = _getter.Clone() as Method; clone._getter.InitializeParent(clone); } if (null != _setter) { clone._setter = _setter.Clone() as Method; clone._setter.InitializeParent(clone); } if (null != _type) { clone._type = _type.Clone() as TypeReference; clone._type.InitializeParent(clone); } if (null != _explicitInfo) { clone._explicitInfo = _explicitInfo.Clone() as ExplicitMemberInfo; clone._explicitInfo.InitializeParent(clone); } return(clone); }
override public object Clone() { Event clone = (Event)FormatterServices.GetUninitializedObject(typeof(Event)); 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 != _add) { clone._add = _add.Clone() as Method; clone._add.InitializeParent(clone); } if (null != _remove) { clone._remove = _remove.Clone() as Method; clone._remove.InitializeParent(clone); } if (null != _raise) { clone._raise = _raise.Clone() as Method; clone._raise.InitializeParent(clone); } if (null != _type) { clone._type = _type.Clone() as TypeReference; clone._type.InitializeParent(clone); } return(clone); }