public static void AllowDependencyInjection(this ViewModelSerializationMap map) { map.SetConstructor(ActivatorUtilities.CreateFactory(map.Type, Type.EmptyTypes)); }
public static void SetConstructor(this ViewModelSerializationMap map, ObjectFactory factory) { map.SetConstructor(p => factory.Invoke(p, new object[0])); }