2 * Copyright (C) 2013 FooProject
3 * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
6 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
7 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
9 You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
11 #region Using Directives
14 using System.Collections.Generic;
16 using System.Diagnostics;
18 #endregion Using Directives
21 namespace Slusser.Collections.Generic
23 internal sealed class CollectionDebugView<T>
27 private ICollection<T> _collection;
34 public CollectionDebugView(ICollection<T> collection)
36 if (collection == null)
37 throw new ArgumentNullException("collection");
39 this._collection = collection;
42 #endregion Constructors
47 [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
52 T[] array = new T[this._collection.Count];
53 this._collection.CopyTo(array, 0);