Explorar o código

Remove unnecessary check in GetIsExtensionsInitialized

Sydney Acksman %!s(int64=6) %!d(string=hai) anos
pai
achega
8dc69ede45

+ 0 - 5
csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs

@@ -138,11 +138,6 @@ namespace Google.Protobuf.Reflection
 
 
         internal bool GetIsExtensionsInitialized(IMessage message)
         internal bool GetIsExtensionsInitialized(IMessage message)
         {
         {
-            if (!object.ReferenceEquals(message.Descriptor, this))
-            {
-                throw new InvalidOperationException("message's descriptor reference does not match this");
-            }
-
             if (Proto.ExtensionRange.Count == 0)
             if (Proto.ExtensionRange.Count == 0)
             {
             {
                 return true;
                 return true;