C# Class GreaterThanAttributeSample.Validation.GreaterThanAttribute

Inheritance: System.ComponentModel.DataAnnotations.ValidationAttribute
Mostrar archivo Open project: tugberkugurlu/ProWebAPI.Samples

Public Methods

Method Description
FormatErrorMessage ( string name ) : string
GreaterThanAttribute ( string otherProperty ) : System

Protected Methods

Method Description
IsValid ( object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext ) : System.ComponentModel.DataAnnotations.ValidationResult

Private Methods

Method Description
GetSecondValue ( Type type, object instance ) : IComparable

Method Details

FormatErrorMessage() public method

public FormatErrorMessage ( string name ) : string
name string
return string

GreaterThanAttribute() public method

public GreaterThanAttribute ( string otherProperty ) : System
otherProperty string
return System

IsValid() protected method

protected IsValid ( object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext ) : System.ComponentModel.DataAnnotations.ValidationResult
value object
validationContext System.ComponentModel.DataAnnotations.ValidationContext
return System.ComponentModel.DataAnnotations.ValidationResult