private void VerifyUdfSerDe(Delegate expectedUdf, Delegate actualUdf, bool hasClosure) { VerifyUdfData( UdfSerDe.Serialize(expectedUdf), UdfSerDe.Serialize(actualUdf), hasClosure); VerifyDelegate(expectedUdf, actualUdf); }
private byte[] Serialize(Delegate udf) { UdfSerDe.UdfData udfData = UdfSerDe.Serialize(udf); using (var ms = new MemoryStream()) { var bf = new BinaryFormatter(); bf.Serialize(ms, udfData); return(ms.ToArray()); } }