Session.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace CommonLang.Net
  6. {
  7. public interface AbstractSession
  8. {
  9. /// <summary>
  10. /// 获取属性
  11. /// </summary>
  12. /// <param name="key"></param>
  13. /// <returns></returns>
  14. object GetAttribute(string key);
  15. /// <summary>
  16. /// 设置属性
  17. /// </summary>
  18. /// <param name="key"></param>
  19. /// <param name="value"></param>
  20. /// <returns></returns>
  21. void SetAttribute(string key, object value);
  22. /// <summary>
  23. /// 移除属性
  24. /// </summary>
  25. /// <param name="key"></param>
  26. /// <returns></returns>
  27. void RemoveAttribute(string key);
  28. /// <summary>
  29. /// 是否包含属性
  30. /// </summary>
  31. /// <param name="key"></param>
  32. /// <returns></returns>
  33. bool ContainsAttribute(string key);
  34. /// <summary>
  35. /// 遍历属性列表
  36. /// </summary>
  37. /// <returns></returns>
  38. ICollection<string> GetAttributeKeys();
  39. }
  40. }