On Tuesday, 8 March 2016 22:39:28 UTC, Benjamin Krämer wrote: > > I have ported the MessageDifferencer from C++ to C# since I need to look > for changes in various protos. The only thing missing is the unpacking of > the Any messages. > > Therefore I would like to get a descriptor for which I know the name and > which is also compiled into the application. In C++, I can use the > DynamicMessageFactory or look it up with DescriptorPool::generated_pool(). > It seems, like there is no generated or central pool in C#. >
Indeed there isn't. It's not clear to me at what point messages would get registered - after all, a new assembly with extra messages could be loaded at any point. > Each FileDescriptor seems to have it's own DescriptorPool containing only > it's own descriptor with it's dependencies. Also the DependencyPool in C# > is internal and the only way to access it seems to use the FindTypeByName > method of the FileDescriptor. > > Is it somehow possible to get the descriptor in C# or do I have to > aggregate the DescriptorPool by myself? > If you mean the descriptor proto - no, that's deliberately internal as it's a proto2 message; we know we don't modify it within the Google.Protobuf library, and have investigated all the differences in behaviour - basically we treat it as a proto3 message, with care. We definitely don't want to expose that to callers. Jon -- 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 post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
