Files
2026-08-27 10:56:38 -06:00

27 lines
553 B
C#

using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace Microsoft.CodeAnalysis.Collections.Internal;
internal sealed class ICollectionDebugView<T>
{
private readonly ICollection<T> _collection;
[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
public T[] Items
{
get
{
T[] array = new T[_collection.Count];
_collection.CopyTo(array, 0);
return array;
}
}
public ICollectionDebugView(ICollection<T> collection)
{
_collection = collection ?? throw new ArgumentNullException("collection");
}
}