/// <summary> /// Create a HashInfo instance from HashType. /// </summary> public static HashInfo Find(HashType hashType) { var hit = HashInfoByType.TryGetValue(hashType, out var hashInfo); if (!hit) { throw new NotImplementedException($"Invalid HashType passed for HashInfoLookup: {hashType.Serialize()}, hashCode: {hashType.GetHashCode()}"); } #pragma warning disable CS8603 // Possible null reference return. return(hashInfo); #pragma warning restore CS8603 // Possible null reference return. }
/// <summary> /// Create a HashInfo instance from HashType. /// </summary> public static HashInfo Find(HashType hashType) { Contract.Check(HashInfoByType.ContainsKey(hashType))?.Assert($"Invalid HashType passed for HashInfoLookup: [{hashType.ToString()}], hashCode: {hashType.GetHashCode()}"); return(HashInfoByType[hashType]); }