public void Serialize<T>(T output, string filename) { FileGenerationHelper.GenerateFolder(filename); using var file = File.CreateText(filename); _serializer.Serialize(file, output); }
public void Serialize <T>(T output, string filename) { FileGenerationHelper.GenerateFolder(filename); var serializer = new XmlSerializer(typeof(T)); var writer = new StreamWriter(filename); serializer.Serialize(writer, output); writer.Close(); }