Skip to content

GameCore.Collection ​

IterationSafeHashSet 双端 ​

命名空间 GameCore.Collection

csharp
public class IterationSafeHashSet<T> : IEnumerable<T>, IEnumerable

A custom hash set that allows safe removal of elements during iteration.

构造函数 ​

IterationSafeHashSet 双端 ​

csharp
public IterationSafeHashSet()

属性 ​

Count 双端 ​

csharp
public virtual int Count { get; }

Gets the number of elements in the set.

方法 ​

Add 双端 ​

csharp
public bool Add(T item)

Adds an element to the set.

  • item — The element to add.

返回: True if the element was added; false if it already exists.

Remove 双端 ​

csharp
public bool Remove(T item)

Removes an element from the set. If called during iteration, the removal is deferred until the iteration completes.

  • item — The element to remove.

返回: True if the element was removed; false if it was not found.

Clear 双端 ​

csharp
public void Clear()

Clears all elements from the set.

Contains 双端 ​

csharp
public bool Contains(T item)

Checks if the set contains a specific element.

  • item — The element to check.

返回: True if the element exists; otherwise, false.

GetEnumerator 双端 ​

csharp
public IEnumerator<T> GetEnumerator()

Returns an enumerator that iterates through the set.

返回: An enumerator for the set.

YieldCondition 双端 ​

csharp
protected virtual bool YieldCondition(T item)

字段 ​

_pendingRemovals 双端 ​

csharp
protected readonly HashSet<T> _pendingRemovals

ObservableQuickDictionary 双端 ​

命名空间 GameCore.Collection

csharp
public class ObservableQuickDictionary<TKey, TValue> : Dictionary<TKey, TValue> where TKey : notnull

构造函数 ​

ObservableQuickDictionary 双端 ​

csharp
public ObservableQuickDictionary()

方法 ​

Add 双端 ​

csharp
public new void Add(TKey key, TValue value)

TryAdd 双端 ​

csharp
public new bool TryAdd(TKey key, TValue value)

Remove 双端 ​

csharp
public new bool Remove(TKey key)

Remove 双端 ​

csharp
public new bool Remove(TKey key, out TValue value)

ClearValueChangedEvent 双端 ​

csharp
public void ClearValueChangedEvent()

事件 ​

OnValueChanged 双端 ​

csharp
public event Action<TKey, TValue?>? OnValueChanged

索引器 ​

this[] 双端 ​

csharp

OrderedSet 双端 ​

命名空间 GameCore.Collection

csharp
public class OrderedSet<T> : OrderedDictionary<T, T>, IEnumerable<T>, IEnumerable where T : notnull

构造函数 ​

OrderedSet 双端 ​

csharp
public OrderedSet()

方法 ​

Add 双端 ​

csharp
public void Add(T value)

GetEnumerator 双端 ​

csharp
public new IEnumerator<T> GetEnumerator()

ToArray 双端 ​

csharp
public T[] ToArray()

索引器 ​

this[] 双端 ​

csharp

QuickDictionary 双端 ​

命名空间 GameCore.Collection

csharp
public class QuickDictionary<TKey, TValue> : Dictionary<TKey, TValue> where TKey : notnull

构造函数 ​

QuickDictionary 双端 ​

csharp
public QuickDictionary()

索引器 ​

this[] 双端 ​

csharp