Обработка через CSharper

This commit is contained in:
2025-04-24 18:10:05 +04:00
parent cc7e97b6ff
commit 7dcf582c3e
89 changed files with 377 additions and 324 deletions
+5 -3
View File
@@ -1,7 +1,7 @@
using Pf2eModel.Model;
using System.Reflection;
using Pf2eModel.Model;
using Pf2eModel.Model.Base;
using Pf2eModel.Model.Enum;
using System.Reflection;
namespace Pf2eModel;
@@ -21,7 +21,9 @@ public class EntityOfTypeAttribute(EntityType type) : Attribute
if (!type.IsAssignableTo(typeof(IEntity)))
{
throw new Exception($"'EntityOfTypeAttribute' attribute should only be applied to children of 'IEntity' class. '{type.FullName}' is not.");
throw new Exception(
$"'EntityOfTypeAttribute' attribute should only be applied to children of 'IEntity' class. '{type.FullName}' is not."
);
}
EntityOfTypeAttribute attribute = type.GetCustomAttribute<EntityOfTypeAttribute>()!;