added yarn spinner package

This commit is contained in:
2026-08-14 13:27:17 +02:00
parent c140236bf7
commit c483bda3ea
573 changed files with 81459 additions and 0 deletions
@@ -0,0 +1,29 @@
/*
Yarn Spinner is licensed to you under the terms found in the file LICENSE.md.
*/
using System;
using System.Collections.Generic;
#nullable enable
static class EnumerableExtensions
{
public static IEnumerable<T> NonNull<T>(this IEnumerable<T?> collection, bool throwIfAnyNull = false) where T : class
{
foreach (var item in collection)
{
if (item != null)
{
yield return item;
}
else
{
if (throwIfAnyNull)
{
throw new NullReferenceException("Collection contains a null item");
}
}
}
}
}