mirror of
https://github.com/AssetRipper/AssetRipper.git
synced 2025-12-11 20:15:29 +01:00
29 lines
612 B
C#
29 lines
612 B
C#
using AssetRipper.DocExtraction.DataStructures;
|
|
|
|
namespace AssetRipper.AssemblyDumper.Documentation;
|
|
|
|
internal static class HistoryBaseExtensions
|
|
{
|
|
|
|
public static IEnumerable<UnityVersionRange> GetVersionRange(this HistoryBase history)
|
|
{
|
|
if (history.Exists.Count == 0)
|
|
{
|
|
yield return default;
|
|
}
|
|
else if (history.Exists.Count == 1)
|
|
{
|
|
yield return new UnityVersionRange(history.Exists[0].Key, UnityVersion.MaxVersion);
|
|
}
|
|
else
|
|
{
|
|
for (int i = 0; i < history.Exists.Count; i++)
|
|
{
|
|
if (history.Exists[i].Value)
|
|
{
|
|
yield return history.Exists.GetRange(i);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |