2020-04-05 16:10:56 +00:00
|
|
|
#nullable disable
|
2020-02-04 00:49:27 +00:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
|
2019-01-13 20:02:23 +00:00
|
|
|
using System;
|
2018-12-27 23:27:57 +00:00
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
namespace MediaBrowser.Model.Serialization
|
|
|
|
{
|
|
|
|
public interface IXmlSerializer
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Deserializes from stream.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="type">The type.</param>
|
|
|
|
/// <param name="stream">The stream.</param>
|
|
|
|
/// <returns>System.Object.</returns>
|
|
|
|
object DeserializeFromStream(Type type, Stream stream);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Serializes to stream.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="obj">The obj.</param>
|
|
|
|
/// <param name="stream">The stream.</param>
|
|
|
|
void SerializeToStream(object obj, Stream stream);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Serializes to file.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="obj">The obj.</param>
|
|
|
|
/// <param name="file">The file.</param>
|
|
|
|
void SerializeToFile(object obj, string file);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Deserializes from file.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="type">The type.</param>
|
|
|
|
/// <param name="file">The file.</param>
|
|
|
|
/// <returns>System.Object.</returns>
|
|
|
|
object DeserializeFromFile(Type type, string file);
|
2019-01-07 23:27:46 +00:00
|
|
|
|
2018-12-27 23:27:57 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Deserializes from bytes.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="type">The type.</param>
|
|
|
|
/// <param name="buffer">The buffer.</param>
|
|
|
|
/// <returns>System.Object.</returns>
|
|
|
|
object DeserializeFromBytes(Type type, byte[] buffer);
|
|
|
|
}
|
2019-01-13 19:31:15 +00:00
|
|
|
}
|