C# 클래스 Habanero.Faces.Base.ValidationUtil

Provide comparison of string data. This class currently implements System.Web.UI.WebControls validation so that we don't have to write more code. Eventually, we may want to implement out own code.
파일 보기 프로젝트 열기: Chillisoft/habanero.faces

공개 메소드들

메소드 설명
CanConvert ( string text, System vdt ) : bool
CompareTypes ( string leftText, ValidationDataType type ) : bool
CompareValues ( string leftText, string rightText, ValidationCompareOperator op, ValidationDataType type ) : bool

Compare two values using provided operator and data type.

FileToString ( string sFile ) : string

Load the entire text file into a string.

FileToString ( string sFile, int size ) : string

Load the text file with specified size as return text.

ObjectToXmlString ( object obj ) : string

Write object to xml string.

StringToFile ( string strValue, string strFileName ) : void

Save a string to file.

StringToFile ( string strValue, string strFileName, bool bAppendToFile ) : void

Save a string to file.

ValidateRegEx ( string valueText, string patternText ) : bool

Utility method validation regular expression.

XmlStringToObject ( string xmlString, System type ) : object

Get object from an xml string.

비공개 메소드들

메소드 설명
ValidationUtil ( ) : System

Disable default ctor.

메소드 상세

CanConvert() 공개 정적인 메소드

public static CanConvert ( string text, System vdt ) : bool
text string
vdt System
리턴 bool

CompareTypes() 공개 정적인 메소드

public static CompareTypes ( string leftText, ValidationDataType type ) : bool
leftText string
type ValidationDataType
리턴 bool

CompareValues() 공개 정적인 메소드

Compare two values using provided operator and data type.
public static CompareValues ( string leftText, string rightText, ValidationCompareOperator op, ValidationDataType type ) : bool
leftText string
rightText string
op ValidationCompareOperator
type ValidationDataType
리턴 bool

FileToString() 공개 정적인 메소드

Load the entire text file into a string.
public static FileToString ( string sFile ) : string
sFile string Full pathname of file to read.
리턴 string

FileToString() 공개 정적인 메소드

Load the text file with specified size as return text.
public static FileToString ( string sFile, int size ) : string
sFile string File to read from.
size int Number of char to read.
리턴 string

ObjectToXmlString() 공개 정적인 메소드

Write object to xml string.
public static ObjectToXmlString ( object obj ) : string
obj object
리턴 string

StringToFile() 공개 정적인 메소드

Save a string to file.
public static StringToFile ( string strValue, string strFileName ) : void
strValue string
strFileName string
리턴 void

StringToFile() 공개 정적인 메소드

Save a string to file.
public static StringToFile ( string strValue, string strFileName, bool bAppendToFile ) : void
strValue string String value to save.
strFileName string File name to save to.
bAppendToFile bool True - to append string to file. Default false - overwrite file.
리턴 void

ValidateRegEx() 공개 정적인 메소드

Utility method validation regular expression.
public static ValidateRegEx ( string valueText, string patternText ) : bool
valueText string
patternText string
리턴 bool

XmlStringToObject() 공개 정적인 메소드

Get object from an xml string.
public static XmlStringToObject ( string xmlString, System type ) : object
xmlString string
type System
리턴 object