mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 05:05:05 +00:00
feat: Add overload to GuidUtils to combine an IEnumerable of guids into a new deterministic guid
This commit is contained in:
committed by
Chris Cameron
parent
d090ab0085
commit
45a3c5c5a1
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user