Serialization an object type to/from a string
- Generics support
- URI safe format
var str = TypeSerializer.Serialize(typeof(Dictionary<int,string>));
Console.WriteLine(str);
// Console output:
// Dictionary(Int32-String)
var deserializer = new TypeDeserializer(/* add your possible types for resolving */);
var type = deserializer.Deserialize("Dictionary(Int32-String)");
Console.WriteLine(type);
// Console output:
// System.Collections.Generic.Dictionary`2[System.Int32,System.String]