123456789101112131415161718192021 |
- using System.IO;
- namespace TBL.CSharp.Serialization.Marshal
- {
- /// <summary>
- /// Marshal 风格的序列化器
- /// </summary>
- public interface IMarshalSerializer
- {
- /// <summary>
- /// 使用指定上下文序列化对象
- /// </summary>
- public void Serialize(object self, Stream stream, IMarshalContext context);
- /// <summary>
- /// 使用指定上下文和指定目标对象进行反序列化
- /// <para>如果序列化结果如不匹配,将不会对目标对象进行操作</para>
- /// </summary>
- public object Deserialize(Stream stream, IMarshalContext context, object target);
- }
- }
|