Commit dce2b9d1 authored by csharptest's avatar csharptest Committed by unknown

Fixed issue in AsReadOnly()

parent d9c59e66
...@@ -119,9 +119,12 @@ namespace Google.ProtocolBuffers { ...@@ -119,9 +119,12 @@ namespace Google.ProtocolBuffers {
get { return empty; } get { return empty; }
} }
public override ExtensionRegistryLite AsReadOnly() { public new ExtensionRegistry AsReadOnly() {
return new ExtensionRegistry(extensionsByName, extensionsByNumber, true); return new ExtensionRegistry(extensionsByName, extensionsByNumber, true);
} }
protected override ExtensionRegistryLite MakeReadOnly() {
return AsReadOnly();
}
/// <summary> /// <summary>
/// Finds an extension by fully-qualified field name, in the /// Finds an extension by fully-qualified field name, in the
......
...@@ -119,7 +119,11 @@ namespace Google.ProtocolBuffers { ...@@ -119,7 +119,11 @@ namespace Google.ProtocolBuffers {
get { return empty; } get { return empty; }
} }
public virtual ExtensionRegistryLite AsReadOnly() { public ExtensionRegistryLite AsReadOnly() {
return MakeReadOnly();
}
protected virtual ExtensionRegistryLite MakeReadOnly() {
return new ExtensionRegistryLite(extensionsByNumber, true); return new ExtensionRegistryLite(extensionsByNumber, true);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment