Validator.CheckAndTrimString Method (String, String, String, IPropertyValidator, Int32, Boolean)
Inline validation method for string properties that cannot be too long. Whether it can be empty or not can be configured. This method trims the string and do comparison.
Namespace: Microsoft.TeamFoundation.TestManagement.Client.Internal
Assembly: Microsoft.TeamFoundation.TestManagement.Client (in Microsoft.TeamFoundation.TestManagement.Client.dll)
Syntax
'Declaration
Public Shared Function CheckAndTrimString ( _
ByRef value As String, _
propertyName As String, _
displayPropertyName As String, _
propertyValidator As IPropertyValidator, _
maxLength As Integer, _
canBeEmpty As Boolean _
) As Boolean
public static bool CheckAndTrimString(
ref string value,
string propertyName,
string displayPropertyName,
IPropertyValidator propertyValidator,
int maxLength,
bool canBeEmpty
)
public:
static bool CheckAndTrimString(
String^% value,
String^ propertyName,
String^ displayPropertyName,
IPropertyValidator^ propertyValidator,
int maxLength,
bool canBeEmpty
)
static member CheckAndTrimString :
value:string byref *
propertyName:string *
displayPropertyName:string *
propertyValidator:IPropertyValidator *
maxLength:int *
canBeEmpty:bool -> bool
public static function CheckAndTrimString(
value : String,
propertyName : String,
displayPropertyName : String,
propertyValidator : IPropertyValidator,
maxLength : int,
canBeEmpty : boolean
) : boolean
Parameters
- value
Type: System.String%
- propertyName
Type: System.String
- displayPropertyName
Type: System.String
- propertyValidator
Type: Microsoft.TeamFoundation.TestManagement.Client.Internal.IPropertyValidator
- maxLength
Type: System.Int32
- canBeEmpty
Type: System.Boolean
Return Value
Type: System.Boolean
True if the validation was successful; false if any part of the validation failed.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.TeamFoundation.TestManagement.Client.Internal Namespace