namespace Zinnia.Rule
{
///
/// Simplifies implementing s that only accept s.
///
public abstract class FloatRule : Rule
{
///
public override bool Accepts(object target)
{
if (ShouldAutoRejectDueToState())
{
return false;
}
float? targetFloat = target as float?;
return targetFloat != null && Accepts((float)targetFloat);
}
///
/// Determines whether a is accepted.
///
/// The to check.
/// if is accepted, otherwise.
protected abstract bool Accepts(float targetFloat);
}
}