public static object ReadObject <T>(ReaderState reader, object identifier) { if (reader.CustomObjectFactories == null || !reader.CustomObjectFactories.TryGetValue(typeof(T), out var customObjectCreator)) { return(GetObjectReaderGeneric <T> .Reader.Read(reader)); } var result = customObjectCreator.Create(identifier); ObjectReaders.Populate <T>(reader, result); return(result); }
public static void Populate <T>(T obj, ReaderState reader) => ObjectReaders.Populate <T>(reader, obj);