Q:

c# protobuf reflection usage

I am using official c# protobuf(not Protobuf-net). Dose it support create a message object according to its type?
The typical deserialize is like：
MyProtoMessageClass obj = MyProtoMessageClass.Parser.ParseFrom(byteArray);

But how to generate the instance according to a string which is
"MyProtoMessageClass"

or a obj of Google.Protobuf.Reflection.MessageDescriptor which is
MyProtoMessageClass.Descriptor

?
UPDATE
delegate void handler(object data);
class Wrapper
{
    public handler h;
    public global::Google.Protobuf.IMessage m;
}
Dictionary<ushort, Wrapper> dict = new Dictionary<ushort, Wrapper>();

// register
class HandlerClass {
    public void handle(object o) {
        ProtoMessageClass data = (ProtoMessageClass)o;
        // use data 
    }
}
h = HandlerClassObj.handle;
m = new ProtoMessageClass();
dict[1] = new Wrapper{h = h, m = m};

// call
ushort cmd = 1;// from socket
byte[] dataRecv; // from socket
var w = dict[cmd];
Google.Protobuf.IMessage msg = w.m.Descriptor.Parser.ParseFrom(dataRecv);
w.h.Invoke(msg);

A:

Assume we got this proto definition:
syntax = "proto3";
package tutorial;
option csharp_namespace = "T1.Models";

message Person {
    int32 id = 1;
    string name = 2;
}

Compiling this proto file, we get a class called Person that implements Google.Protobuf.IMessage.
This interface contains a property MessageDescriptor Descriptor { get; }, which is implemented by the class Person and returns a public static property of type MessageDescriptor.
The MessageDescriptor contains a public static property called Parser, and we can call the ParseFrom(byteArray) of this.
the code:
var typ = Assembly.GetExecutingAssembly().GetTypes().First(t => t.Name == "Person"); //get the type using the string we got, here it is 'Person'
var descriptor = (MessageDescriptor)typ.GetProperty("Descriptor", BindingFlags.Public | BindingFlags.Static).GetValue(null, null); // get the static property Descriptor
var person = descriptor.Parser.ParseFrom(byteArray); // parse the byte array to Person

