Обработка через CSharper
This commit is contained in:
@@ -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>()!;
|
||||
|
||||
Reference in New Issue
Block a user