mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
* rework ComponentManager create indexing solution, UniqueIndex split out ComponentEventArgs, add sealed variants fix up documentation fix terrible crap make benchmark work * woops, ordered enumerables are already a copy * naming * clean up comments * nullable enable * add some doc comments to unique index * perf tweaks add UniqueIndexHkm for high key mutability extract internal interface mostly for documentation add nullability support and constraints * fix doc comment for UniqueIndexHkm * make PVS threaded * remove redundant member declarations in interface * fix grid loss crap on client shutdown * fix nullability warning when retrieving from always constructed threadlocal * add comment explaining chan == null check remove inParallel parameter
25 lines
811 B
C#
25 lines
811 B
C#
#nullable enable
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
namespace Robust.Shared.Utility
|
|
{
|
|
|
|
/// <summary>
|
|
/// Extension methods for <see cref="UniqueIndex{TKey,TValue}"/>.
|
|
/// </summary>
|
|
public static class UniqueIndexExtensions {
|
|
|
|
/// <summary>
|
|
/// Completely resets a <see cref="UniqueIndex{TKey,TValue}"/>.
|
|
/// </summary>
|
|
/// <param name="index">A given index.</param>
|
|
/// <typeparam name="TKey">The type of key.</typeparam>
|
|
/// <typeparam name="TValue">The type of value.</typeparam>
|
|
/// <seealso cref="UniqueIndex{TKey,TValue}"/>
|
|
[SuppressMessage("ReSharper", "RedundantAssignment")]
|
|
public static void Clear<TKey, TValue>(ref this UniqueIndex<TKey, TValue> index) where TKey: notnull => index = default;
|
|
|
|
}
|
|
|
|
}
|