feat: Add overload to GuidUtils to combine an IEnumerable of guids into a new deterministic guid

This commit is contained in:
Austin Noska
2021-01-19 15:52:50 -05:00
committed by Chris Cameron
parent d090ab0085
commit 45a3c5c5a1
2 changed files with 12 additions and 0 deletions

View File

@@ -1,4 +1,6 @@
using System;
using System.Collections.Generic;
using ICD.Common.Utils.Extensions;
namespace ICD.Common.Utils
{
@@ -30,5 +32,13 @@ namespace ICD.Common.Utils
return new Guid(aBytes);
}
/// <summary>
/// Combines the guids in the given order to make a new, deterministic guid.
/// </summary>
public static Guid Combine(IEnumerable<Guid> guids)
{
return guids.AggregateOrDefault(Combine, default(Guid));
}
}
}