public static byte[] Hash(BoxedExpression expr, bool trace) { Contract.Ensures(Contract.Result <byte[]>() != null); using (var tw = new HashWriter(trace)) { tw.WriteLine(expr.ToString()); return(tw.GetHash()); } }
public static byte[] Hash <Field, Method>(InferredExpr <Field, Method> expr, bool trace) { Contract.Ensures(Contract.Result <byte[]>() != null); using (var tw = new HashWriter(trace)) { tw.Write(expr.ToHashString()); return(tw.GetHash()); } }
public static byte[] Hash(IEnumerable<BoxedExpression> exprs, bool trace) { Contract.Ensures(Contract.Result<byte[]>() != null); using (var tw = new HashWriter(trace)) { foreach (var expr in exprs) tw.WriteLine(expr.ToString()); return tw.GetHash(); } }