Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Collections/ICollectionBase.cs @ 2909

Last change on this file since 2909 was 2768, checked in by mkommend, 14 years ago

added solution folders and sources for the netron library (ticket #867)

File size: 3.4 KB
Line 
1using System;
2using System.Collections;
3using System.Collections.Generic;
4using System.IO;
5namespace Netron.Diagramming.Core
6{
7    /// <summary>
8    /// Describes the CollectionBase collection.
9    /// </summary>
10    /// <typeparam name="T"></typeparam>
11    public interface ICollectionBase<T> : ICollection<T>, IList<T>
12    {
13        #region Events
14        /// <summary>
15        /// Occurs when the collection is cleared.
16        /// </summary>
17        event EventHandler OnClear;
18        /// <summary>
19        /// Occurs when an item is added to the collection.
20        /// </summary>
21        event EventHandler<CollectionEventArgs<T>> OnItemAdded;
22        /// <summary>
23        /// Occurs when en item is removed from the collection.
24        /// </summary>
25        event EventHandler<CollectionEventArgs<T>> OnItemRemoved;
26        #endregion
27
28        #region Properties
29     
30        #endregion
31
32        #region Methods
33        /// <summary>
34        /// Adds the range of items to the collection.
35        /// </summary>
36        /// <param name="items">The items.</param>
37        void AddRange(CollectionBase<T> items);
38        /// <summary>
39        /// Copies this instance.
40        /// </summary>
41        /// <returns></returns>
42        CollectionBase<T> Copy();
43        /// <summary>
44        /// Creates a deep copy of this instance.
45        /// </summary>
46        /// <returns></returns>
47        CollectionBase<T> DeepCopy();
48        /// <summary>
49        /// Uses the given predicate to test the existence of a certain item in the collection.
50        /// </summary>
51        /// <param name="predicate">The predicate.</param>
52        /// <returns></returns>
53        bool Exists(Predicate<T> predicate);
54        /// <summary>
55        /// Finds the specified predicate.
56        /// </summary>
57        /// <param name="predicate">The predicate.</param>
58        /// <returns></returns>
59        T Find(Predicate<T> predicate);
60        /// <summary>
61        /// Uses the given Action to act on the collection items
62        /// </summary>
63        /// <param name="action">The action.</param>
64        void ForEach(Action<T> action);
65       
66     
67        ICollection<T> RemoveAll(Predicate<T> predicate);
68
69        /// <summary>
70        /// Converts the collection to an array.
71        /// </summary>
72        /// <returns></returns>
73        T[] ToArray();
74        /// <summary>
75        /// Specific copy/paste utility function.
76        /// </summary>
77        /// <returns></returns>
78        System.IO.MemoryStream ToStream();
79        /// <summary>
80        /// Returns a string representation of the collection.
81        /// </summary>
82        /// <param name="format">The format.</param>
83        /// <param name="formatProvider">The format provider.</param>
84        /// <returns></returns>
85        string ToString(string format, IFormatProvider formatProvider);
86        /// <summary>
87        /// Returns a string representation of the collection.
88        /// </summary>
89        /// <returns></returns>
90        string ToString();
91        /// <summary>
92        /// Checks, using the given predicate, whether a certain property is true for all items in the collection.
93        /// </summary>
94        /// <param name="predicate">The predicate.</param>
95        /// <returns></returns>
96        bool TrueForAll(Predicate<T> predicate);
97        #endregion
98
99       
100       
101    }
102}
Note: See TracBrowser for help on using the repository browser.