12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- namespace TBL.CSharp.Serialization.Marshal
- {
- /// <summary>
- /// Marshal 风格的序列化上下文接口
- /// </summary>
- public interface IMarshalContext
- {
- /// <summary>
- /// 清空上下文内容
- /// </summary>
- void Clear();
- /// <summary>
- /// 获取可链接符号
- /// </summary>
- string GetLinkableSymbol(int index);
- /// <summary>
- /// 添加可链接符号
- /// </summary>
- string AddLinkableSymbol(string symbol);
-
- /// <summary>
- /// 寻找可链接符号的索引
- /// </summary>
- bool FindLinkableSymbol(string symbol, out int index);
- /// <summary>
- /// 获取可链接对象
- /// </summary>
- object GetLinkableObject(int index);
- /// <summary>
- /// 添加可链接对象
- /// </summary>
- T AddLinkableObject<T>(T element);
- /// <summary>
- /// 寻找可链接对象的索引
- /// </summary>
- bool FindLinkableObject(object element, out int index);
- }
- }
|