Permalink
Browse files

ValidateAttribute inherits ParametersValidationAttribute

  • Loading branch information...
1 parent 8c0f0cd commit bf913265a9fb38ccf6ad1708ceb45a392f992489 @adrianaisemberg adrianaisemberg committed Oct 25, 2011
View
@@ -72,6 +72,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="CollectionValidationAttribute.cs" />
<Compile Include="ErrorAttribute.cs" />
<Compile Include="FileSystemHelper.cs" />
<Compile Include="FW2Stuff.cs" />
@@ -90,7 +91,6 @@
<Compile Include="Utils.cs" />
<Compile Include="ValidationAttribute.cs" />
<Compile Include="HelpAttribute.cs" />
- <Compile Include="ParametersValidationAttribute.cs" />
<Compile Include="Validation\PathExistsAttribute.cs" />
<Compile Include="Validation\DirectoryExistsAttribute.cs" />
<Compile Include="Validation\FileExistsAttribute.cs" />
@@ -11,7 +11,7 @@ namespace CLAP.Validation
/// http://msdn.microsoft.com/en-us/library/system.data.datacolumn.expression.aspx
/// </remarks>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = true)]
- public sealed class ValidateAttribute : Attribute, IValidation
+ public sealed class ValidateAttribute : ParametersValidationAttribute
{
#region Properties
@@ -25,7 +25,7 @@ public sealed class ValidateAttribute : Attribute, IValidation
/// </summary>
public bool CaseSensitive { get; set; }
- public string Description
+ public override string Description
{
get
{
@@ -55,7 +55,7 @@ public ValidateAttribute(string expression)
#region Methods
- public IInfoValidator GetValidator()
+ public override IInfoValidator GetValidator()
{
return new ParametersExpressionValidator(Expression, CaseSensitive);
}
@@ -7,7 +7,6 @@ namespace CLAP
/// Validation on the parameter's value
/// </summary>
[Serializable]
- [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = true)]
public abstract class ValidationAttribute : Attribute
{
/// <summary>

0 comments on commit bf91326

Please sign in to comment.