Slight refactoring of Extensions to support lookup by name, added compatibility tests for text and binary formats.
diff --git a/src/ProtocolBuffers.Test/CompatTests/BinaryCompatibilityTests.cs b/src/ProtocolBuffers.Test/CompatTests/BinaryCompatibilityTests.cs
new file mode 100644
index 0000000..fe8a1e3
--- /dev/null
+++ b/src/ProtocolBuffers.Test/CompatTests/BinaryCompatibilityTests.cs
@@ -0,0 +1,22 @@
+using System;
+using NUnit.Framework;
+
+namespace Google.ProtocolBuffers.CompatTests
+{
+ [TestFixture]
+ public class BinaryCompatibilityTests : CompatibilityTests
+ {
+ protected override string TestName { get { return "binary"; } }
+
+ protected override object SerializeMessage<TMessage, TBuilder>(TMessage message)
+ {
+ byte[] bresult = message.ToByteArray();
+ return bresult;
+ }
+
+ protected override TBuilder DeerializeMessage<TMessage, TBuilder>(object message, TBuilder builder, ExtensionRegistry registry)
+ {
+ return builder.MergeFrom((byte[])message, registry);
+ }
+ }
+}
\ No newline at end of file