Exemplo n.º 1
0
        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());
            }
        }
Exemplo n.º 2
0
        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());
            }
        }
Exemplo n.º 3
0
    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();
      }
    }