forked from IronLanguages/ironpython3
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCollectionDebugView.cs
More file actions
45 lines (38 loc) · 1.32 KB
/
CollectionDebugView.cs
File metadata and controls
45 lines (38 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using System.Collections;
namespace IronPython.Runtime {
internal class CollectionDebugProxy {
private readonly ICollection _collection;
public CollectionDebugProxy(ICollection collection) {
_collection = collection;
}
[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
internal IList Members {
get {
List<object> res = new List<object>(_collection.Count);
foreach (object o in _collection) {
res.Add(o);
}
return res;
}
}
}
internal class ObjectCollectionDebugProxy {
private readonly ICollection<object> _collection;
public ObjectCollectionDebugProxy(ICollection<object> collection) {
_collection = collection;
}
[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
internal IList<object> Members {
get {
return new List<object>(_collection);
}
}
}
}