C# Class Qowaiv.Globalization.PostalCodeCountryInfo

Afficher le fichier Open project: Corniel/Qowaiv Class Usage Examples

Private Properties

Свойство Type Description
New PostalCodeCountryInfo
PostalCodeCountryInfo System.Collections.Generic

Méthodes publiques

Méthode Description
Format ( string postalcode ) : string

Formats the postal code.

If the country supports formatting and if the postal code is valid for the country.

GetCountriesWithFormatting ( ) : IEnumerable

Gets countries with postal codes with formatting.

GetCountriesWithSingleValue ( ) : IEnumerable

Gets countries with a single postal code value.

GetCountriesWithoutPostalCode ( ) : IEnumerable

Gets countries without a postal code system.

GetInstance ( Country country ) : PostalCodeCountryInfo

Gets the postal code country info associated with the specified country.

GetSingleValue ( ) : string

Gets the single value if supported, otherwise string.Empty.

IsValid ( string postalcode ) : bool

Returns true if the postal code is valid for the specified country, otherwise false.

Returns false if the country does not have postal codes.

Private Methods

Méthode Description
New ( Country country, string validation, string search = null, string replace = null, bool isSingle = false ) : PostalCodeCountryInfo

Creates a new instance.

Used for ininitalating the Instances dictionary.

PostalCodeCountryInfo ( ) : System.Collections.Generic

Constructor.

Method Details

Format() public méthode

Formats the postal code.
If the country supports formatting and if the postal code is valid for the country.
public Format ( string postalcode ) : string
postalcode string /// The postal code. ///
Résultat string

GetCountriesWithFormatting() public static méthode

Gets countries with postal codes with formatting.
public static GetCountriesWithFormatting ( ) : IEnumerable
Résultat IEnumerable

GetCountriesWithSingleValue() public static méthode

Gets countries with a single postal code value.
public static GetCountriesWithSingleValue ( ) : IEnumerable
Résultat IEnumerable

GetCountriesWithoutPostalCode() public static méthode

Gets countries without a postal code system.
public static GetCountriesWithoutPostalCode ( ) : IEnumerable
Résultat IEnumerable

GetInstance() public static méthode

Gets the postal code country info associated with the specified country.
public static GetInstance ( Country country ) : PostalCodeCountryInfo
country Country /// The specified country. ///
Résultat PostalCodeCountryInfo

GetSingleValue() public méthode

Gets the single value if supported, otherwise string.Empty.
public GetSingleValue ( ) : string
Résultat string

IsValid() public méthode

Returns true if the postal code is valid for the specified country, otherwise false.
Returns false if the country does not have postal codes.
public IsValid ( string postalcode ) : bool
postalcode string /// The postal code to test. ///
Résultat bool