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