/// <summary>
        /// Return a deep copy of this collection
        /// </summary>
        /// <returns>TravelPostCollection object</returns>
        public TravelPostCollection Clone()
        {
            TravelPostCollection clone = new TravelPostCollection();

            foreach (TravelPost post in this)
            {
                clone.Add(post.Clone());
            }
            clone.IsModified = this.IsModified;
            return(clone);
        }
Esempio n. 2
0
 /// <summary>
 /// Adds a post to _postCollection field
 /// </summary>
 /// <param name="image">a post</param>
 private void AddPost(TravelPost post)
 {
     _postCollection.Add(post);
 }