public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Binary; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (ContentTypeElement != null) { dest.ContentTypeElement = (Hl7.Fhir.Model.Code)ContentTypeElement.DeepCopy(); } if (SecurityContext != null) { dest.SecurityContext = (Hl7.Fhir.Model.ResourceReference)SecurityContext.DeepCopy(); } if (DataElement != null) { dest.DataElement = (Hl7.Fhir.Model.Base64Binary)DataElement.DeepCopy(); } return(dest); }