Added component validators
This commit is contained in:
parent
35f271e12b
commit
d7145ad772
30 changed files with 448 additions and 200 deletions
|
|
@ -41,11 +41,15 @@ namespace Module.ProjectValidator.Editor
|
|||
internal static string GetAttributeShortName(Attribute attribute)
|
||||
{
|
||||
var str = attribute.GetType().Name;
|
||||
var index = str.IndexOf("Attribute", StringComparison.Ordinal);
|
||||
|
||||
if (index != -1)
|
||||
str = str[..index];
|
||||
|
||||
str = str.Replace("Attribute", string.Empty);
|
||||
str = ObjectNames.NicifyVariableName(str);
|
||||
return str;
|
||||
}
|
||||
|
||||
internal static string GetComponentValidatorShortName(object obj)
|
||||
{
|
||||
var str = obj.GetType().Name;
|
||||
str = str.Replace("ComponentValidator", string.Empty);
|
||||
str = ObjectNames.NicifyVariableName(str);
|
||||
return str;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue