IDataModule.cs 566 B

1234567891011121314151617181920
  1. namespace XGame.Framework.Data
  2. {
  3. /// <summary>
  4. /// 数据实例管理器
  5. /// </summary>
  6. public interface IDataModule
  7. {
  8. /// <summary>
  9. /// 返回指定类型的数据实例
  10. /// </summary>
  11. /// <typeparam name="TType"></typeparam>
  12. /// <returns></returns>
  13. TType GetOrAdd<TType>() where TType : class, IData, new();
  14. /// <summary>
  15. /// 移除
  16. /// </summary>
  17. /// <typeparam name="TType"></typeparam>
  18. void Remove<TType>() where TType : class, IData, new();
  19. }
  20. }