Files
BH3/Assets/Plugins/Assembly-CSharp-firstpass/UniRx/DisposableExtensions.cs
2025-08-13 09:26:42 +08:00

23 lines
455 B
C#

using System;
using System.Collections.Generic;
namespace UniRx
{
public static class DisposableExtensions
{
public static T AddTo<T>(this T disposable, ICollection<IDisposable> container) where T : IDisposable
{
if (disposable == null)
{
throw new ArgumentNullException("disposable");
}
if (container == null)
{
throw new ArgumentNullException("container");
}
container.Add(disposable);
return disposable;
}
}
}