Refactored project to module structure
This commit is contained in:
22
Moonlight.Frontend/Admin/Users/Shared/PermissionCategory.cs
Normal file
22
Moonlight.Frontend/Admin/Users/Shared/PermissionCategory.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Moonlight.Frontend.Admin.Users.Shared;
|
||||
|
||||
public record PermissionCategory
|
||||
{
|
||||
public PermissionCategory(string name, Type icon, Permission[] permissions)
|
||||
{
|
||||
Name = name;
|
||||
Icon = icon;
|
||||
Permissions = permissions;
|
||||
}
|
||||
|
||||
public string Name { get; init; }
|
||||
|
||||
// Used to prevent the IL-Trimming from removing this type as its dynamically assigned a type, and we
|
||||
// need it to work properly
|
||||
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)]
|
||||
public Type Icon { get; init; }
|
||||
|
||||
public Permission[] Permissions { get; init; }
|
||||
}
|
||||
Reference in New Issue
Block a user