IwbRolePermissionCacheItem.cs 664 B

1234567891011121314151617181920212223242526272829
  1. using System;
  2. using System.Collections.Generic;
  3. namespace IwbZero.Caching
  4. {
  5. /// <summary>
  6. /// Used to cache permissions of a role.
  7. /// </summary>
  8. [Serializable]
  9. public class IwbRolePermissionCacheItem
  10. {
  11. public const string CacheStoreName = "IwbAdminRolePermissions";
  12. public long RoleId { get; set; }
  13. public HashSet<string> GrantedPermissions { get; set; }
  14. public IwbRolePermissionCacheItem()
  15. {
  16. GrantedPermissions = new HashSet<string>();
  17. }
  18. public IwbRolePermissionCacheItem(int roleId)
  19. : this()
  20. {
  21. RoleId = roleId;
  22. }
  23. }
  24. }