public Deserializer CreateDeserializer(Type t) { Deserializer deserializer; var builder = new TreeBuilder(_converter); var generator = new DeserializeCodeGenerator(builder); var knownTypeDel = builder.TryGetKnownTypeDelegate(t); if (knownTypeDel == null) { var root = builder.CreateTree(t); var del = generator.Generate(root); deserializer = new Deserializer { Method = del }; } else { deserializer = new Deserializer { Method = knownTypeDel }; } return deserializer; }
public DeserializeCodeGenerator(TreeBuilder builder) { _treeBuilder = builder; }