C# 클래스 Adf.Base.Formatting.FormatHelper

Represent the helper class handling formatting objects. Provides datetime validation and formatting.
파일 보기 프로젝트 열기: NLADP/ADF

공개 메소드들

메소드 설명
Format ( System.DateTime value, string format ) : string

Convert the specified datetime object into specified format.

IsValidDateTime ( string value ) : bool

Validate the datetime value.

ParseToDateTime ( string value ) : DateTime?

/// Get the correct datetime by the specified reference type datetime object. ///

Parse the specified datetime object into specified format.

ToString ( object value, string format = null, bool breakLongWords = false ) : string
ToStringKeepOriginalDecimals ( this quantity, CultureInfo cult ) : string

The default .NET implementation of decimal.ToString(culture) doesn't add the thousand seperator, decimal.ToString(format, culture) only shows 2 decimal digits.

비공개 메소드들

메소드 설명
ParseToDateTime ( string value, System.DateTime &result ) : bool

Parse the specified datetime into specified format.

메소드 상세

Format() 공개 정적인 메소드

Convert the specified datetime object into specified format.
public static Format ( System.DateTime value, string format ) : string
value System.DateTime The datetime value converted into given format.
format string The datetime value will parsed by this format.
리턴 string

IsValidDateTime() 공개 정적인 메소드

Validate the datetime value.
A null reference is passed. The format does not meet parameter specification.
public static IsValidDateTime ( string value ) : bool
value string The datetime value which will be parsed.
리턴 bool

ParseToDateTime() 공개 정적인 메소드

/// Get the correct datetime by the specified reference type datetime object. /// Parse the specified datetime object into specified format.
A null reference is passed. The format does not meet parameter specification.
public static ParseToDateTime ( string value ) : DateTime?
value string The reference type datetime object.
리턴 DateTime?

ToString() 공개 정적인 메소드

public static ToString ( object value, string format = null, bool breakLongWords = false ) : string
value object
format string
breakLongWords bool
리턴 string

ToStringKeepOriginalDecimals() 공개 정적인 메소드

The default .NET implementation of decimal.ToString(culture) doesn't add the thousand seperator, decimal.ToString(format, culture) only shows 2 decimal digits.
public static ToStringKeepOriginalDecimals ( this quantity, CultureInfo cult ) : string
quantity this
cult System.Globalization.CultureInfo
리턴 string