There is ALWAYS a way....
What I had to do was first serialize each object and convert the streams to byte arrays.
I then do a compare of the byte arrays using an extension method:
public static bool EqualTo(this byte[] byteArray1, byte[] byteArray2)
{
if (byteArray1 == null && byteArray2 != null) { return false; }
if (byteArray2 == null && byteArray1 != null) { return false; }
if (byteArray1 != null && byteArray2 != null)
{
if (byteArray1.Length != byteArray2.Length) { return false; }
int i = 0;
while ((i < byteArray1.Length) && byteArray1[i] == byteArray2[i])
{
i++;
}
return i == byteArray1.Length;
}
return true;
}
It may not be pretty and may not be the most efficient way....but it gets the job done.
I would hope that in the future there would be a way to do this provided in the generated code for us to use.
I first looked at the interpret methods of the predicate classes and realized that that code is almost 80% of what would be needed....