/// <summary> /// Clones GreyFoxUser object and clones child objects with cloning or replication. /// as the parent object. /// </summary> /// <returns> A new GreyFoxUser object reflecting the replicated GreyFoxUser object.</returns> public GreyFoxUser Clone() { lock (this) { GreyFoxUser clonedGreyFoxUser = new GreyFoxUser(); clonedGreyFoxUser.iD = iD; clonedGreyFoxUser.isSynced = isSynced; clonedGreyFoxUser.userName = userName; clonedGreyFoxUser.isDisabled = isDisabled; clonedGreyFoxUser.loginDate = loginDate; clonedGreyFoxUser.loginCount = loginCount; clonedGreyFoxUser.loginPassword = loginPassword; clonedGreyFoxUser.activationID = activationID; if (contact != null) { clonedGreyFoxUser.contact = contact.Duplicate("sysGlobal_Contacts"); } if (roles != null) { clonedGreyFoxUser.roles = roles.Clone(); } return(clonedGreyFoxUser); } }