public void CopyTo(MethodDeclaration copy) { copy._name = _name; copy._sigType = _sigType; copy._flags = _flags; copy._implFlags = _implFlags; if (PInvoke != null) { PInvoke.CopyTo(copy.CreatePInvoke()); } ReturnType.CopyTo(copy.ReturnType); Parameters.CopyTo(copy.Parameters); GenericParameters.CopyTo(copy.GenericParameters); Overrides.CopyTo(copy.Overrides); CustomAttributes.CopyTo(copy.CustomAttributes); SecurityAttributes.CopyTo(copy.SecurityAttributes); if (MethodBody.IsValid(this)) { var methodBody = MethodBody.Load(this); methodBody.Build(copy); } }
public void CopyTo(TypeDeclaration copy) { copy._name = _name; copy._namespace = _namespace; copy._flags = _flags; copy._packingSize = PackingSize; copy._classSize = ClassSize; copy._baseType = BaseType; Interfaces.CopyTo(copy.Interfaces); GenericParameters.CopyTo(copy.GenericParameters); Methods.CopyTo(copy.Methods); Fields.CopyTo(copy.Fields); Properties.CopyTo(copy.Properties); Events.CopyTo(copy.Events); CustomAttributes.CopyTo(copy.CustomAttributes); SecurityAttributes.CopyTo(copy.SecurityAttributes); NestedTypes.CopyTo(copy.NestedTypes); }