mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 21:24:58 +00:00
test: Added count to collection debugger displays
This commit is contained in:
@@ -2,6 +2,9 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using ICD.Common.Properties;
|
using ICD.Common.Properties;
|
||||||
|
#if !SIMPLSHARP
|
||||||
|
using System.Diagnostics;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace ICD.Common.Utils.Collections
|
namespace ICD.Common.Utils.Collections
|
||||||
{
|
{
|
||||||
@@ -10,6 +13,9 @@ namespace ICD.Common.Utils.Collections
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="TKey"></typeparam>
|
/// <typeparam name="TKey"></typeparam>
|
||||||
/// <typeparam name="TValue"></typeparam>
|
/// <typeparam name="TValue"></typeparam>
|
||||||
|
#if !SIMPLSHARP
|
||||||
|
[DebuggerDisplay("Count = {Count}")]
|
||||||
|
#endif
|
||||||
public sealed class BiDictionary<TKey, TValue> : IDictionary<TKey, TValue>
|
public sealed class BiDictionary<TKey, TValue> : IDictionary<TKey, TValue>
|
||||||
{
|
{
|
||||||
private readonly Dictionary<TKey, TValue> m_KeyToValue;
|
private readonly Dictionary<TKey, TValue> m_KeyToValue;
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using ICD.Common.Properties;
|
using ICD.Common.Properties;
|
||||||
using ICD.Common.Utils.Extensions;
|
using ICD.Common.Utils.Extensions;
|
||||||
|
#if !SIMPLSHARP
|
||||||
|
using System.Diagnostics;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace ICD.Common.Utils.Collections
|
namespace ICD.Common.Utils.Collections
|
||||||
{
|
{
|
||||||
@@ -11,6 +14,9 @@ namespace ICD.Common.Utils.Collections
|
|||||||
/// A collection containing only unique items.
|
/// A collection containing only unique items.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="T"></typeparam>
|
/// <typeparam name="T"></typeparam>
|
||||||
|
#if !SIMPLSHARP
|
||||||
|
[DebuggerDisplay("Count = {Count}")]
|
||||||
|
#endif
|
||||||
public sealed class IcdHashSet<T> : ICollection<T>
|
public sealed class IcdHashSet<T> : ICollection<T>
|
||||||
{
|
{
|
||||||
private readonly Dictionary<T, object> m_Dict;
|
private readonly Dictionary<T, object> m_Dict;
|
||||||
|
|||||||
@@ -4,9 +4,15 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using ICD.Common.Properties;
|
using ICD.Common.Properties;
|
||||||
using ICD.Common.Utils.Extensions;
|
using ICD.Common.Utils.Extensions;
|
||||||
|
#if !SIMPLSHARP
|
||||||
|
using System.Diagnostics;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace ICD.Common.Utils.Collections
|
namespace ICD.Common.Utils.Collections
|
||||||
{
|
{
|
||||||
|
#if !SIMPLSHARP
|
||||||
|
[DebuggerDisplay("Count = {Count}")]
|
||||||
|
#endif
|
||||||
public sealed class IcdOrderedDictionary<TKey, TValue> : IDictionary<TKey, TValue>
|
public sealed class IcdOrderedDictionary<TKey, TValue> : IDictionary<TKey, TValue>
|
||||||
{
|
{
|
||||||
private readonly List<TKey> m_OrderedKeys;
|
private readonly List<TKey> m_OrderedKeys;
|
||||||
|
|||||||
@@ -4,12 +4,18 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using ICD.Common.Properties;
|
using ICD.Common.Properties;
|
||||||
using ICD.Common.Utils.Extensions;
|
using ICD.Common.Utils.Extensions;
|
||||||
|
#if !SIMPLSHARP
|
||||||
|
using System.Diagnostics;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace ICD.Common.Utils.Collections
|
namespace ICD.Common.Utils.Collections
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides a first-in first-out collection with enhanced insertion features.
|
/// Provides a first-in first-out collection with enhanced insertion features.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
#if !SIMPLSHARP
|
||||||
|
[DebuggerDisplay("Count = {Count}")]
|
||||||
|
#endif
|
||||||
public sealed class PriorityQueue<T> : IEnumerable<T>, ICollection
|
public sealed class PriorityQueue<T> : IEnumerable<T>, ICollection
|
||||||
{
|
{
|
||||||
private readonly IcdOrderedDictionary<int, List<T>> m_PriorityToQueue;
|
private readonly IcdOrderedDictionary<int, List<T>> m_PriorityToQueue;
|
||||||
|
|||||||
@@ -5,12 +5,18 @@ using ICD.Common.Properties;
|
|||||||
using ICD.Common.Utils.EventArguments;
|
using ICD.Common.Utils.EventArguments;
|
||||||
using ICD.Common.Utils.Extensions;
|
using ICD.Common.Utils.Extensions;
|
||||||
using ICD.Common.Utils.Timers;
|
using ICD.Common.Utils.Timers;
|
||||||
|
#if !SIMPLSHARP
|
||||||
|
using System.Diagnostics;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace ICD.Common.Utils.Collections
|
namespace ICD.Common.Utils.Collections
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// RateLimitedEventQueue provides features for enqueing items to be raised via an event at a controlled interval.
|
/// RateLimitedEventQueue provides features for enqueing items to be raised via an event at a controlled interval.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
#if !SIMPLSHARP
|
||||||
|
[DebuggerDisplay("Count = {Count}")]
|
||||||
|
#endif
|
||||||
public sealed class RateLimitedEventQueue<T> : IEnumerable<T>, ICollection, IDisposable
|
public sealed class RateLimitedEventQueue<T> : IEnumerable<T>, ICollection, IDisposable
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using ICD.Common.Properties;
|
using ICD.Common.Properties;
|
||||||
|
#if !SIMPLSHARP
|
||||||
|
using System.Diagnostics;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace ICD.Common.Utils.Collections
|
namespace ICD.Common.Utils.Collections
|
||||||
{
|
{
|
||||||
@@ -10,6 +13,9 @@ namespace ICD.Common.Utils.Collections
|
|||||||
/// are removed as new items are added.
|
/// are removed as new items are added.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="TContents"></typeparam>
|
/// <typeparam name="TContents"></typeparam>
|
||||||
|
#if !SIMPLSHARP
|
||||||
|
[DebuggerDisplay("Count = {Count}")]
|
||||||
|
#endif
|
||||||
public sealed class ScrollQueue<TContents> : IEnumerable<TContents>, ICollection
|
public sealed class ScrollQueue<TContents> : IEnumerable<TContents>, ICollection
|
||||||
{
|
{
|
||||||
private readonly LinkedList<TContents> m_Collection;
|
private readonly LinkedList<TContents> m_Collection;
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using ICD.Common.Properties;
|
using ICD.Common.Properties;
|
||||||
using ICD.Common.Utils.Extensions;
|
using ICD.Common.Utils.Extensions;
|
||||||
|
#if !SIMPLSHARP
|
||||||
|
using System.Diagnostics;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace ICD.Common.Utils.Collections
|
namespace ICD.Common.Utils.Collections
|
||||||
{
|
{
|
||||||
@@ -108,6 +111,9 @@ namespace ICD.Common.Utils.Collections
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="TKey"></typeparam>
|
/// <typeparam name="TKey"></typeparam>
|
||||||
/// <typeparam name="TValue"></typeparam>
|
/// <typeparam name="TValue"></typeparam>
|
||||||
|
#if !SIMPLSHARP
|
||||||
|
[DebuggerDisplay("Count = {Count}")]
|
||||||
|
#endif
|
||||||
public sealed class WeakKeyDictionary<TKey, TValue> : IDictionary<TKey, TValue>
|
public sealed class WeakKeyDictionary<TKey, TValue> : IDictionary<TKey, TValue>
|
||||||
{
|
{
|
||||||
private readonly Dictionary<WeakKeyReference<TKey>, TValue> m_Dictionary;
|
private readonly Dictionary<WeakKeyReference<TKey>, TValue> m_Dictionary;
|
||||||
|
|||||||
Reference in New Issue
Block a user