pixelgon/Assets/NaughtyAttributes/Scripts/Editor/CodeGeneration/Templates/PropertyValidatorDatabaseTemplate.txt
2020-06-05 11:54:36 -07:00

31 lines
787 B
Text

// This class is auto generated
using System;
using System.Collections.Generic;
namespace NaughtyAttributes.Editor
{
public static class __classname__
{
private static Dictionary<Type, PropertyValidator> validatorsByAttributeType;
static __classname__()
{
validatorsByAttributeType = new Dictionary<Type, PropertyValidator>();
__entries__
}
public static PropertyValidator GetValidatorForAttribute(Type attributeType)
{
PropertyValidator validator;
if (validatorsByAttributeType.TryGetValue(attributeType, out validator))
{
return validator;
}
else
{
return null;
}
}
}
}