mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-02-14 05:36:30 +00:00
22 lines
548 B
C#
22 lines
548 B
C#
namespace SabreTools.Serialization.Files
|
|
{
|
|
/// <summary>
|
|
/// Base class for other XML serializers
|
|
/// </summary>
|
|
/// <typeparam name="T"></typeparam>
|
|
public partial class XmlFile<T> : IFileSerializer<T>
|
|
{
|
|
/// <inheritdoc/>
|
|
#if NET48
|
|
public T Deserialize(string path)
|
|
#else
|
|
public T? Deserialize(string? path)
|
|
#endif
|
|
{
|
|
using (var data = PathProcessor.OpenStream(path))
|
|
{
|
|
return new Streams.XmlFile<T>().Deserialize(data);
|
|
}
|
|
}
|
|
}
|
|
} |