internal static void InjectSerializers() { var typeArray = InjectedTypes.ToArray(); _injectedSerializer = new XmlSerializer(typeof(SaveGame), SerialiserTypes.Concat(InjectedTypes).ToArray()); _injectedFarmerSerializer = new XmlSerializer(typeof(Farmer), FarmerTypes.Concat(InjectedTypes).ToArray()); _injectedLocationSerializer = new XmlSerializer(typeof(GameLocation), LocationTypes.Concat(InjectedTypes).ToArray()); SaveGame.serializer = _injectedSerializer; SaveGame.farmerSerializer = _injectedFarmerSerializer; SaveGame.locationSerializer = _injectedLocationSerializer; _injected = true; }