perf: Adding contrains for enum methods, faster HasFlag/s checks

This commit is contained in:
Chris Cameron
2018-07-26 10:56:08 -04:00
parent 1a87ce9f00
commit 668994be18
5 changed files with 71 additions and 66 deletions

View File

@@ -155,6 +155,7 @@ namespace ICD.Common.Utils.Extensions
/// <returns></returns>
[PublicAPI]
public static T GetValueAsEnum<T>(this JsonReader extends)
where T : struct, IConvertible
{
if (extends == null)
throw new ArgumentNullException("extends");