namespace Deltares.Standard.Specifications
{
///
/// Abstract specification class that implements base properties
///
/// The type of the candidate.
public abstract class SpecificationBase : ISpecification
{
protected SpecificationBase()
{
Name = this.GetType().Name;
}
///
/// Gets or sets the name of the specification. (Short description)
///
///
/// The name string value should be a required property for each specification.
///
public string Name { get; set; }
///
/// Gets or sets the description of the specification. (Long description)
///
///
/// The description string value.
///
public string Description { get; set; }
///
/// Determines whether the candidate satisfies the specification.
///
/// The candidate to test.
///
/// true if the candidate satisfies the specification otherwise, false.
///
bool ISpecification.IsSatisfiedBy(object candidate)
{
return IsSatisfiedBy((TCandidate)candidate);
}
///
/// Determines whether the candidate satisfies the specification.
///
/// The candidate to test.
///
/// true if the candidate satisfies the specification otherwise, false.
///
public abstract bool IsSatisfiedBy(TCandidate candidate);
}
}