C# Класс Qowaiv.Globalization.PostalCodeCountryInfo

Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
New PostalCodeCountryInfo
PostalCodeCountryInfo System.Collections.Generic

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

Format() публичный Метод

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. ///
Результат string

GetCountriesWithFormatting() публичный статический Метод

Gets countries with postal codes with formatting.
public static GetCountriesWithFormatting ( ) : IEnumerable
Результат IEnumerable

GetCountriesWithSingleValue() публичный статический Метод

Gets countries with a single postal code value.
public static GetCountriesWithSingleValue ( ) : IEnumerable
Результат IEnumerable

GetCountriesWithoutPostalCode() публичный статический Метод

Gets countries without a postal code system.
public static GetCountriesWithoutPostalCode ( ) : IEnumerable
Результат IEnumerable

GetInstance() публичный статический Метод

Gets the postal code country info associated with the specified country.
public static GetInstance ( Country country ) : PostalCodeCountryInfo
country Country /// The specified country. ///
Результат PostalCodeCountryInfo

GetSingleValue() публичный Метод

Gets the single value if supported, otherwise string.Empty.
public GetSingleValue ( ) : string
Результат string

IsValid() публичный Метод

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. ///
Результат bool