Initial commit
[mono.git] / mcs / class / referencesource / System.Core / System / Collections / Generic / HashSetDebugView.cs
1 using System;
2 using System.Collections;
3 using System.Collections.Generic;
4 using System.Diagnostics;
5 using System.Text;
6
7 namespace System.Collections.Generic {
8
9     /// <summary>
10     /// Debug view for HashSet
11     /// </summary>
12     /// <typeparam name="T"></typeparam>
13     internal class HashSetDebugView<T> {
14         private HashSet<T> set;
15
16         public HashSetDebugView(HashSet<T> set) {
17             if (set == null) {
18                 throw new ArgumentNullException("set");
19             }
20
21             this.set = set;
22         }
23
24         [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
25         public T[] Items {
26             get {
27                 return set.ToArray();
28             }
29         }
30     }
31
32 }