mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Remove and save custom tags
This commit is contained in:
parent
e36ef6a368
commit
2f3f807911
264 changed files with 1118 additions and 498 deletions
|
@ -15,5 +15,22 @@ public static class IListExtensions
|
|||
{
|
||||
return NullOrEmpty<T>(list) == false;
|
||||
}
|
||||
|
||||
public static void AddDistinct<T>(this IList<T> list, T item)
|
||||
{
|
||||
if (item == null || list.Contains(item))
|
||||
{ return; }
|
||||
|
||||
list.Add(item);
|
||||
}
|
||||
|
||||
public static void AddRangeDistinct<T>(this IList<T> list, IEnumerable<T> collection)
|
||||
{
|
||||
if (collection == null)
|
||||
{ return; }
|
||||
|
||||
foreach(T item in collection)
|
||||
{ AddDistinct(list, item); }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue