public static void Swallow <T>(this T target, Action <T> action) { Guarder.CheckNull(target, "target"); Guarder.CheckNull(action, "action"); try { action(target); } catch { //quiet } }
public long[] Hash(byte[] bytes) { Guarder.CheckNull(bytes); var hash = OFFSET_BASIS; foreach (var b in bytes) { unchecked { hash *= FNV_PRIME; hash ^= b; } } return(new [] { (long)hash }); }