It appears that in the C# lib, you can't parse messages containing 
extensions without passing in an ExtensionRegistry that contains the 
corresponding Extensions.

The C# code generator helpfully creates Extension objects as static members 
of the [filename]Extensions class; this is good.

But is there a way to get an ExtensionRegistry containing all Extensions 
from a file, without listing them individually?

It does appear that the list of all extensions in the file is passed to the 
FileDescriptor that can be obtained from [filename]Reflection.Descriptor, 
but the Extensions property of this returns an ExtensionCollection, which 
is a different animal; and it's unclear how to turn this into a list of 
Extensions and/or an ExtensionRegistry.

Alternatively, maybe the code generator should make a more-accessible list 
of extensions, perhaps already stored as an ExtensionRegistry?

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/84ee940c-967e-4aae-b6d4-73284dc7fb85%40googlegroups.com.

Reply via email to