C# Class CreditCardNumberGenerator.RandomCreditCardNumberGenerator

Afficher le fichier Open project: grahamking/darkcoding-credit-card

Méthodes publiques

Свойство Type Description
AMEX_PREFIX_LIST string[]
DINERS_PREFIX_LIST string[]
DISCOVER_PREFIX_LIST string[]
ENROUTE_PREFIX_LIST string[]
JCB_PREFIX_LIST String[]
MASTERCARD_PREFIX_LIST string[]
VISA_PREFIX_LIST string[]
VOYAGER_PREFIX_LIST string[]

Méthodes publiques

Méthode Description
BuildPrefixAndLengthArrayForVisaMasterCardAmex ( ) : PrefixAndLength[]

This is an example how BuildPrefixAndLengthList can be used

BuildPrefixAndLengthList ( string prefixList, int length ) : IEnumerable
GenerateMasterCardNumber ( ) : string
GenerateMasterCardNumbers ( int howMany ) : IEnumerable
GetCreditCardNumbers ( PrefixAndLength prefixAndLengthList, int howMany ) : IEnumerable

Better to use extension overload with [this Random random] paramenter. See http://stackoverflow.com/questions/2706500/how-do-i-generate-a-random-int-number-in-c

GetCreditCardNumbers ( string prefixList, int length, int howMany ) : IEnumerable
GetCreditCardNumbers ( this random, PrefixAndLength prefixAndLengthList, int howMany ) : IEnumerable
IsValidCreditCardNumber ( string creditCardNumber ) : bool

Private Methods

Méthode Description
CreateFakeCreditCardNumber ( this random, string prefix, int length ) : string

Method Details

BuildPrefixAndLengthArrayForVisaMasterCardAmex() public static méthode

This is an example how BuildPrefixAndLengthList can be used
public static BuildPrefixAndLengthArrayForVisaMasterCardAmex ( ) : PrefixAndLength[]
Résultat PrefixAndLength[]

BuildPrefixAndLengthList() public static méthode

public static BuildPrefixAndLengthList ( string prefixList, int length ) : IEnumerable
prefixList string
length int
Résultat IEnumerable

GenerateMasterCardNumber() public static méthode

public static GenerateMasterCardNumber ( ) : string
Résultat string

GenerateMasterCardNumbers() public static méthode

public static GenerateMasterCardNumbers ( int howMany ) : IEnumerable
howMany int
Résultat IEnumerable

GetCreditCardNumbers() public static méthode

Better to use extension overload with [this Random random] paramenter. See http://stackoverflow.com/questions/2706500/how-do-i-generate-a-random-int-number-in-c
public static GetCreditCardNumbers ( PrefixAndLength prefixAndLengthList, int howMany ) : IEnumerable
prefixAndLengthList PrefixAndLength
howMany int
Résultat IEnumerable

GetCreditCardNumbers() public static méthode

public static GetCreditCardNumbers ( string prefixList, int length, int howMany ) : IEnumerable
prefixList string
length int
howMany int
Résultat IEnumerable

GetCreditCardNumbers() public static méthode

public static GetCreditCardNumbers ( this random, PrefixAndLength prefixAndLengthList, int howMany ) : IEnumerable
random this
prefixAndLengthList PrefixAndLength
howMany int
Résultat IEnumerable

IsValidCreditCardNumber() public static méthode

public static IsValidCreditCardNumber ( string creditCardNumber ) : bool
creditCardNumber string
Résultat bool

Property Details

AMEX_PREFIX_LIST public_oe static_oe property

public static string[] AMEX_PREFIX_LIST
Résultat string[]

DINERS_PREFIX_LIST public_oe static_oe property

public static string[] DINERS_PREFIX_LIST
Résultat string[]

DISCOVER_PREFIX_LIST public_oe static_oe property

public static string[] DISCOVER_PREFIX_LIST
Résultat string[]

ENROUTE_PREFIX_LIST public_oe static_oe property

public static string[] ENROUTE_PREFIX_LIST
Résultat string[]

JCB_PREFIX_LIST public_oe static_oe property

public static String[] JCB_PREFIX_LIST
Résultat String[]

MASTERCARD_PREFIX_LIST public_oe static_oe property

public static string[] MASTERCARD_PREFIX_LIST
Résultat string[]

VISA_PREFIX_LIST public_oe static_oe property

public static string[] VISA_PREFIX_LIST
Résultat string[]

VOYAGER_PREFIX_LIST public_oe static_oe property

public static string[] VOYAGER_PREFIX_LIST
Résultat string[]