Inheritance diagram for HouseOver.THARM.Search.ComparableCheck:
Public Member Functions | |
ComparableCheck (string fieldName, string humanReadableName, bool fieldRequired, Type fieldType, object minValue, object maxValue) | |
Constructs a ComparableCheck instance with all details filled out immediately. | |
override bool | Verify (object c) |
Verifies wether the value of c falls within the bounds of the minimum and maximum values minValue and maxValue. | |
ComparableCheck (string fieldName, string humanReadableName, bool fieldRequired, Type fieldType, object minValue, object maxValue) | |
Constructs a ComparableCheck instance with all details filled out immediately. | |
override bool | Verify (object c) |
Verifies wether the value of c falls within the bounds of the minimum and maximum values minValue and maxValue. | |
Properties | |
object | MaxValue [get, set] |
Gets and sets the maximum value (We would love for this to have the IComparable type, BUT then the program crashes on deserialization). | |
object | MinValue [get, set] |
Gets and sets the minimum value (We would love for this to have the IComparable type, BUT then the program crashes on deserialization). | |
Private Attributes | |
object | minValue |
The minimum value the verified object must match. | |
object | maxValue |
The maximum value the verified object must match. |
Definition at line 11 of file ComparableCheck.cs.
HouseOver.THARM.Search.ComparableCheck.ComparableCheck | ( | string | fieldName, | |
string | humanReadableName, | |||
bool | fieldRequired, | |||
Type | fieldType, | |||
object | minValue, | |||
object | maxValue | |||
) |
Constructs a ComparableCheck instance with all details filled out immediately.
fieldName | The name of the field | |
humanReadableName | The human readable name of the field | |
fieldRequired | Wether or not the field is required | |
fieldType | The type of the field | |
minValue | The mínimum required value | |
maxValue | The maximum required value |
Definition at line 51 of file ComparableCheck.cs.
00052 : base(fieldName, humanReadableName, fieldRequired, fieldType) 00053 { 00054 this.minValue = minValue; 00055 this.maxValue = maxValue; 00056 00057 }
HouseOver.THARM.Search.ComparableCheck.ComparableCheck | ( | string | fieldName, | |
string | humanReadableName, | |||
bool | fieldRequired, | |||
Type | fieldType, | |||
object | minValue, | |||
object | maxValue | |||
) |
Constructs a ComparableCheck instance with all details filled out immediately.
fieldName | The name of the field | |
humanReadableName | The human readable name of the field | |
fieldRequired | Wether or not the field is required | |
fieldType | The type of the field | |
minValue | The mínimum required value | |
maxValue | The maximum required value |
Definition at line 51 of file ComparableCheck.cs.
00052 : base(fieldName, humanReadableName, fieldRequired, fieldType) 00053 { 00054 this.minValue = minValue; 00055 this.maxValue = maxValue; 00056 00057 }
override bool HouseOver.THARM.Search.ComparableCheck.Verify | ( | object | c | ) | [virtual] |
Verifies wether the value of c falls within the bounds of the minimum and maximum values minValue and maxValue.
c | The object to check the validity of |
Implements HouseOver.THARM.Search.Check.
Definition at line 64 of file ComparableCheck.cs.
00065 { 00066 if (minValue == null || maxValue == null || !fieldRequired) 00067 return true; 00068 IComparable ic; 00069 try 00070 { 00071 ic = (IComparable)Convert.ChangeType(c, FieldType); 00072 } 00073 catch { 00074 return false; 00075 } 00076 return ic.CompareTo(minValue) >= 0 && ic.CompareTo(maxValue) <= 0; 00077 }
override bool HouseOver.THARM.Search.ComparableCheck.Verify | ( | object | c | ) | [virtual] |
Verifies wether the value of c falls within the bounds of the minimum and maximum values minValue and maxValue.
c | The object to check the validity of |
Implements HouseOver.THARM.Search.Check.
Definition at line 64 of file ComparableCheck.cs.
00065 { 00066 if (minValue == null || maxValue == null || !fieldRequired) 00067 return true; 00068 IComparable ic; 00069 try 00070 { 00071 ic = (IComparable)Convert.ChangeType(c, FieldType); 00072 } 00073 catch { 00074 return false; 00075 } 00076 return ic.CompareTo(minValue) >= 0 && ic.CompareTo(maxValue) <= 0; 00077 }
object HouseOver::THARM::Search.ComparableCheck::minValue [private] |
object HouseOver::THARM::Search.ComparableCheck::maxValue [private] |
object HouseOver::THARM::Search.ComparableCheck::MaxValue [get, set] |
Gets and sets the maximum value (We would love for this to have the IComparable type, BUT then the program crashes on deserialization).
Definition at line 22 of file ComparableCheck.cs.
Referenced by HouseOver.THARM.RealtyManager.SetComparableCheck(), and HouseOver.THARM.RealtyManager.ShowProfileDetails().
object HouseOver::THARM::Search.ComparableCheck::MinValue [get, set] |
Gets and sets the minimum value (We would love for this to have the IComparable type, BUT then the program crashes on deserialization).
Definition at line 34 of file ComparableCheck.cs.
Referenced by HouseOver.THARM.RealtyManager.SetComparableCheck(), and HouseOver.THARM.RealtyManager.ShowProfileDetails().