C# Класс Faker.Code

A collection of Code related resources.
Показать файл Открыть проект

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

Метод Описание
EAN ( bool validChecksum = true ) : string

Generates a EAN Code

Description of the EAN standard is at Checksum routines are at

FiscalCode ( bool validChecksum = true ) : string

Generates an Italian Fiscal Code

Description of the Fiscal Code standard is at https://en.wikipedia.org/wiki/Italian_fiscal_code_card

FiscalCode ( bool validChecksum, int minAge, int maxAge ) : string

Generates an Italian Fiscal Code

Description of the Fiscal Code standard is at https://en.wikipedia.org/wiki/Italian_fiscal_code_card

FiscalCode ( int minAge, int maxAge ) : string

Generates an Italian Fiscal Code

Description of the Fiscal Code standard is at https://en.wikipedia.org/wiki/Italian_fiscal_code_card

FiscalCode ( string lastName, string firstName, System.DateTime birthday, bool validChecksum = true ) : string

Generates an Italian Fiscal Code

Description of the Fiscal Code standard is at https://en.wikipedia.org/wiki/Italian_fiscal_code_card

ISBN10 ( bool validChecksum = true ) : string

Generates an ISBN-10 Code

Description of the ISBN standard is at Checksum routines are at

ISBN13 ( bool validChecksum = true ) : string

Generates an ISBN-13 Code

Description of the ISBN standard is at Checksum routines are at

NPI ( ) : string

Generates a 10 digit NPI (National Provider Identifier issued to health care providers in the United States)

Description of the NPI standard is at https://en.wikipedia.org/wiki/National_Provider_Identifier. The NPI has replaced the unique physician identification number (UPIN).

NRIC ( bool validChecksum = true, int minAge = 18, int maxAge = 65 ) : string

Generates a Singaporean National Registration Identity Card (NRIC) for holder who is born between specified ages.

Description of the NRIC standard is at . This ID was issued for the first time in 1965 in Singapore. See also:

RUT ( bool validChecksum = true ) : string

Generates a RUT Code

Description of the RUT standard is at Checksum routines are at

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

Метод Описание
ComputeChecksumEan ( int digits ) : int
ComputeChecksumFiscalCode ( string prefix, bool validChecksum ) : char
ComputeChecksumIsbn10 ( int digits ) : int
ComputeChecksumNric ( int digits, char prefix, bool validChecksum ) : char
ComputeChecksumRut ( int digits ) : int
GetFiscalCodeSqueezedName ( string name, bool isFirstName ) : string

This method applies the rule giving the consonants and vowels extracted by the name, according to the algorithm.

IsVowel ( char c ) : bool

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

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

Generates a EAN Code
Description of the EAN standard is at Checksum routines are at
public static EAN ( bool validChecksum = true ) : string
validChecksum bool /// Indicates whether the generated EAN has a valid checksum or not ///
Результат string

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

Generates an Italian Fiscal Code
Description of the Fiscal Code standard is at https://en.wikipedia.org/wiki/Italian_fiscal_code_card
public static FiscalCode ( bool validChecksum = true ) : string
validChecksum bool /// Indicates whether the generated Fiscal Code has a valid checksum or not ///
Результат string

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

Generates an Italian Fiscal Code
Description of the Fiscal Code standard is at https://en.wikipedia.org/wiki/Italian_fiscal_code_card
public static FiscalCode ( bool validChecksum, int minAge, int maxAge ) : string
validChecksum bool /// Indicates whether the generated Fiscal Code has a valid checksum or not ///
minAge int Minimum age of the holder
maxAge int Maximum age of the holder
Результат string

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

Generates an Italian Fiscal Code
Description of the Fiscal Code standard is at https://en.wikipedia.org/wiki/Italian_fiscal_code_card
public static FiscalCode ( int minAge, int maxAge ) : string
minAge int Minimum age of the holder
maxAge int Maximum age of the holder
Результат string

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

Generates an Italian Fiscal Code
Description of the Fiscal Code standard is at https://en.wikipedia.org/wiki/Italian_fiscal_code_card
public static FiscalCode ( string lastName, string firstName, System.DateTime birthday, bool validChecksum = true ) : string
lastName string Last name of the holder
firstName string First name of the holder
birthday System.DateTime Birthday of the holder
validChecksum bool /// Indicates whether the generated Fiscal Code has a valid checksum or not ///
Результат string

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

Generates an ISBN-10 Code
Description of the ISBN standard is at Checksum routines are at
public static ISBN10 ( bool validChecksum = true ) : string
validChecksum bool /// Indicates whether the generated ISBN has a valid checksum or not ///
Результат string

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

Generates an ISBN-13 Code
Description of the ISBN standard is at Checksum routines are at
public static ISBN13 ( bool validChecksum = true ) : string
validChecksum bool /// Indicates whether the generated ISBN has a valid checksum or not ///
Результат string

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

Generates a 10 digit NPI (National Provider Identifier issued to health care providers in the United States)
Description of the NPI standard is at https://en.wikipedia.org/wiki/National_Provider_Identifier. The NPI has replaced the unique physician identification number (UPIN).
public static NPI ( ) : string
Результат string

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

Generates a Singaporean National Registration Identity Card (NRIC) for holder who is born between specified ages.
Description of the NRIC standard is at . This ID was issued for the first time in 1965 in Singapore. See also:
public static NRIC ( bool validChecksum = true, int minAge = 18, int maxAge = 65 ) : string
validChecksum bool /// Indicates whether the generated NRIC has a valid checksum or not ///
minAge int Minimum age of the holder
maxAge int Maximum age of the holder
Результат string

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

Generates a RUT Code
Description of the RUT standard is at Checksum routines are at
public static RUT ( bool validChecksum = true ) : string
validChecksum bool /// Indicates whether the generated RUT has a valid checksum or not ///
Результат string