C# Class YamuiFramework.Helper.Utilities

Afficher le fichier Open project: jcaillon/3P

Méthodes publiques

Свойство Type Description
KeyPressValidChars char[]>.Dictionary
SimpleTypes Type[]
Validations Predicate>.Dictionary

Méthodes publiques

Méthode Description
ForEachLine ( string filePath, byte dataResources, string>.Action toApplyOnEachLine, Encoding encoding, Action onException ) : bool

Reads all the line of either the filePath (if the file exists) or from byte array dataResources, Apply the action toApplyOnEachLine to each line Uses encoding as the Encoding to read the file or convert the byte array to a string Uses the char # as a comment in the file

GetAll ( Control control, Type type ) : IEnumerable

List all the controls children of "control" of type "type" this is recursive, so it find them all

GetCultureChars ( bool digits, bool neg, bool pos, bool dec = false, bool grp = false, bool e = false ) : char[]
GetCultureChars ( bool timeChars, bool timeSep, bool dateSep, char other ) : char[]
GetFirst ( Control control, Type type ) : Control

Get the first control of the type type it can find

IsInvalidKey ( char keyChar, Type itemType ) : bool
IsSimpleType ( this type ) : bool
IsSupportedType ( Type type ) : bool
MeasureHtmlPrefWidth ( string htmlContent, int minWidth, int maxWidth ) : int

Returns a fair width in which an html can be displayed

Private Methods

Méthode Description
SubForEachLine ( string filePath, byte dataResources, string>.Action toApplyOnEachLine, Encoding encoding ) : void

Method Details

ForEachLine() public static méthode

Reads all the line of either the filePath (if the file exists) or from byte array dataResources, Apply the action toApplyOnEachLine to each line Uses encoding as the Encoding to read the file or convert the byte array to a string Uses the char # as a comment in the file
public static ForEachLine ( string filePath, byte dataResources, string>.Action toApplyOnEachLine, Encoding encoding, Action onException ) : bool
filePath string
dataResources byte
toApplyOnEachLine string>.Action
encoding Encoding
onException Action
Résultat bool

GetAll() public static méthode

List all the controls children of "control" of type "type" this is recursive, so it find them all
public static GetAll ( Control control, Type type ) : IEnumerable
control Control
type Type
Résultat IEnumerable

GetCultureChars() public static méthode

public static GetCultureChars ( bool digits, bool neg, bool pos, bool dec = false, bool grp = false, bool e = false ) : char[]
digits bool
neg bool
pos bool
dec bool
grp bool
e bool
Résultat char[]

GetCultureChars() public static méthode

public static GetCultureChars ( bool timeChars, bool timeSep, bool dateSep, char other ) : char[]
timeChars bool
timeSep bool
dateSep bool
other char
Résultat char[]

GetFirst() public static méthode

Get the first control of the type type it can find
public static GetFirst ( Control control, Type type ) : Control
control Control
type Type
Résultat Control

IsInvalidKey() public static méthode

public static IsInvalidKey ( char keyChar, Type itemType ) : bool
keyChar char
itemType Type
Résultat bool

IsSimpleType() public static méthode

public static IsSimpleType ( this type ) : bool
type this
Résultat bool

IsSupportedType() public static méthode

public static IsSupportedType ( Type type ) : bool
type Type
Résultat bool

MeasureHtmlPrefWidth() public static méthode

Returns a fair width in which an html can be displayed
public static MeasureHtmlPrefWidth ( string htmlContent, int minWidth, int maxWidth ) : int
htmlContent string
minWidth int
maxWidth int
Résultat int

Property Details

KeyPressValidChars public_oe static_oe property

public static Dictionary KeyPressValidChars
Résultat char[]>.Dictionary

SimpleTypes public_oe static_oe property

public static Type[] SimpleTypes
Résultat Type[]

Validations public_oe static_oe property

public static Dictionary> Validations
Résultat Predicate>.Dictionary