Fixed issue in AsReadOnly()
diff --git a/src/ProtocolBuffers/ExtensionRegistryLite.cs b/src/ProtocolBuffers/ExtensionRegistryLite.cs
index 693aeb2..b054823 100644
--- a/src/ProtocolBuffers/ExtensionRegistryLite.cs
+++ b/src/ProtocolBuffers/ExtensionRegistryLite.cs
@@ -119,7 +119,11 @@
get { return empty; }
}
- public virtual ExtensionRegistryLite AsReadOnly() {
+ public ExtensionRegistryLite AsReadOnly() {
+ return MakeReadOnly();
+ }
+
+ protected virtual ExtensionRegistryLite MakeReadOnly() {
return new ExtensionRegistryLite(extensionsByNumber, true);
}