Files
Moonlight/Moonlight.Frontend/Models/PermissionCategory.cs

21 lines
625 B
C#

using System.Diagnostics.CodeAnalysis;
namespace Moonlight.Frontend.Models;
public record PermissionCategory
{
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; }
public PermissionCategory(string name, Type icon, Permission[] permissions)
{
Name = name;
Icon = icon;
Permissions = permissions;
}
}