/// <summary> /// Makes a shallow copy of the current DojoTestListJournalEntryTypeCollection. /// as the parent object. /// </summary> /// <returns>DojoTestListJournalEntryTypeCollection</returns> public DojoTestListJournalEntryTypeCollection Clone() { DojoTestListJournalEntryTypeCollection clonedDojoTestListJournalEntryType = new DojoTestListJournalEntryTypeCollection(count); lock (this) { foreach (DojoTestListJournalEntryType item in this) { clonedDojoTestListJournalEntryType.Add(item); } } return(clonedDojoTestListJournalEntryType); }
/// <summary> /// Makes a deep copy of the current DojoTestListJournalEntryType. /// </summary> /// <param name="isolation">Placeholders are used to isolate the /// items in the DojoTestListJournalEntryTypeCollection from their children.</param> public DojoTestListJournalEntryTypeCollection Copy(bool isolated) { DojoTestListJournalEntryTypeCollection isolatedCollection = new DojoTestListJournalEntryTypeCollection(count); lock (this) { if (isolated) { for (int i = 0; i < count; i++) { isolatedCollection.Add(DojoTestListJournalEntryTypeArray[i].NewPlaceHolder()); } } else { for (int i = 0; i < count; i++) { isolatedCollection.Add(DojoTestListJournalEntryTypeArray[i].Copy()); } } } return(isolatedCollection); }