public static ISerializer CreateFromName(string name, GameRunner.GameData data) { return(CreateFromType(SerializerTypes.First(o => o.Name == name), data)); //return (ISerializer)Activator.CreateInstance(SerializerTypes.First(o => o.Name == name), new object[] { }); //return (ISerializer)Activator.CreateInstance(currAss.FullName, name, new object[] { }); }
public static ISerializer CreateFromType(Type t, GameRunner.GameData data) { return((ISerializer)Activator.CreateInstance(t, new object[] { data })); }