📄 customserializer.cs
字号:
using System;
using System.IO;
namespace Perst
{
/// <summary>
/// Interface of custome serializer
/// </summary>
public interface CustomSerializer
{
/// <summary>
/// Serialize object
/// </summary>
/// <param name="obj">object to be packed</param>
/// <param name="output">output stream to which object should be serialized</param>
///
void Pack(CustomSerializable obj, Stream output);
/// <summary>
/// Deserialize object
/// </summary>
/// <param name="input">input stream from which object should be deserialized</param>
/// <returns>unpacked object</returns>
///
CustomSerializable Unpack(Stream input);
/// <summary>
/// Create object from its string representation
/// </summary>summary>
/// <param name="str">string representation of object (created by ToString() method)</param>
///
CustomSerializable Parse(String str);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -