public Word Clone() { var clone = new Word { Id = (string)Id.Clone(), Guid = Guid, Vernacular = (string)Vernacular.Clone(), Plural = (string)Plural.Clone(), Created = (string)Created.Clone(), Modified = (string)Modified.Clone(), PartOfSpeech = (string)PartOfSpeech.Clone(), OtherField = (string)OtherField.Clone(), ProjectId = (string)ProjectId.Clone(), Accessibility = Accessibility, Audio = new List <string>(), EditedBy = new List <string>(), History = new List <string>(), Senses = new List <Sense>(), Note = Note.Clone() }; foreach (var file in Audio) { clone.Audio.Add((string)file.Clone()); } foreach (var id in EditedBy) { clone.EditedBy.Add((string)id.Clone()); } foreach (var id in History) { clone.History.Add((string)id.Clone()); } foreach (var sense in Senses) { clone.Senses.Add(sense.Clone()); } return(clone); }
public Word Clone() { var clone = new Word { Id = Id.Clone() as string, Vernacular = Vernacular.Clone() as string, Plural = Plural.Clone() as string, Created = Created.Clone() as string, Modified = Modified.Clone() as string, PartOfSpeech = PartOfSpeech.Clone() as string, OtherField = OtherField.Clone() as string, ProjectId = ProjectId.Clone() as string, Audio = new List <string>(), EditedBy = new List <string>(), History = new List <string>(), Senses = new List <Sense>() }; foreach (var file in Audio) { clone.Audio.Add(file.Clone() as string); } foreach (var id in EditedBy) { clone.EditedBy.Add(id.Clone() as string); } foreach (var id in History) { clone.History.Add(id.Clone() as string); } foreach (var sense in Senses) { clone.Senses.Add(sense.Clone()); } return(clone); }