Example #1
0
        public Oklahoma() : base("OK")
        {
            var dl = new Rchar[10];

            dl[0] = new RcharLimited(0,
                                     'A',
                                     'B',
                                     'C',
                                     'D',
                                     'E',
                                     'F',
                                     'G',
                                     'H',
                                     'J',
                                     'K',
                                     'L',
                                     'M',
                                     'N',
                                     'P',
                                     'R',
                                     'S',
                                     'T',
                                     'U',
                                     'V',
                                     'W',
                                     'Y',
                                     'Z');//no 'I','O', 'X' nor 'Q'
            Array.Copy(Numerics(9, 1), 0, dl, 1, 9);
            dlFormats = new[] { new DriversLicense(dl, this), new DriversLicense(Numerics(9), this) };
        }
Example #2
0
        public Massachusetts() : base("MA")
        {
            var dl = new Rchar[9];

            dl[0] = new RcharLimited(0,
                                     'A',
                                     'B',
                                     'C',
                                     'D',
                                     'E',
                                     'F',
                                     'G',
                                     'H',
                                     'I',
                                     'J',
                                     'K',
                                     'L',
                                     'M',
                                     'N',
                                     'O',
                                     'P',
                                     'Q',
                                     'R',
                                     'S',
                                     'T',
                                     'U',
                                     'V',
                                     'W',
                                     'Y',
                                     'Z');// no 'X'
            Array.Copy(Numerics(8, 1), 0, dl, 1, 8);

            dlFormats = new[] { new DriversLicense(dl, this), new DriversLicense(Numerics(9), this) };
        }
Example #3
0
        public California() : base("CA")
        {
            var dl = new Rchar[8];

            dl[0] = new RcharUAlpha(0);
            Array.Copy(Numerics(7, 1), 0, dl, 1, 7);
            dlFormats = new[] { new DriversLicense(dl, this) };
        }
Example #4
0
        public Wisconsin() : base("WI")
        {
            var dl = new Rchar[13];

            dl[0] = new RcharUAlpha(0);
            Array.Copy(Numerics(12, 1), 0, dl, 1, 12);
            dlFormats = new[] { new DriversLicense(dl, this) };
        }
Example #5
0
        public NewYork() : base("NY")
        {
            var dl = new Rchar[15];//actual length is 16 but last digit is check-digit

            dl[0] = new RcharUAlpha(0);
            Array.Copy(Numerics(14, 1), 0, dl, 1, 14);
            dlFormats = new[] { new DriversLicense(dl, this) };
        }
Example #6
0
 public California()
     : base("CA")
 {
     var dl = new Rchar[8];
     dl[0] = new UAlphaRchar(0);
     Array.Copy(Numerics(7,1), 0, dl, 1, 7);
     dlFormats = new[] { new DriversLicense(dl, this) };
 }
Example #7
0
        public NewJersey() : base("NJ")
        {
            var dl = new Rchar[15];

            dl[0] = new RcharUAlpha(0);
            Array.Copy(Numerics(14, 1), 0, dl, 1, 14);
            dlFormats = new[] { new DriversLicense(dl, this) };
        }
Example #8
0
        public RhodeIsland() : base("RI")
        {
            var dl = new Rchar[7];

            dl[0] = new RcharLimited(0, 'V');
            Array.Copy(Numerics(6, 1), 0, dl, 1, 6);
            dlFormats = new[] { new DriversLicense(dl, this), new DriversLicense(Numerics(7), this) };
        }
Example #9
0
        public Arizona() : base("AZ")
        {
            var dl = new Rchar[9];

            dl[0] = new RcharLimited(0, 'A', 'B', 'D', 'Y');
            Array.Copy(Numerics(8, 1), 0, dl, 1, 8);

            dlFormats = new[] { new DriversLicense(dl, this), new DriversLicense(Numerics(9), this) };
        }
Example #10
0
        public Ohio() : base("OH")
        {
            var dl = new Rchar[9];

            dl[0] = new RcharUAlpha(0);
            dl[1] = new RcharUAlpha(1);
            Array.Copy(Numerics(7, 2), 0, dl, 2, 7);
            dlFormats = new[] { new DriversLicense(dl, this) };
        }
Example #11
0
        public Hawaii() : base("HI")
        {
            var dl = new Rchar[9];

            dl[0] = new RcharLimited(0, 'H');
            Array.Copy(Numerics(8, 1), 0, dl, 1, 8);

            dlFormats = new[] { new DriversLicense(dl, this), new DriversLicense(Numerics(9), this) };
        }
Example #12
0
        public Indiana() : base("IN")
        {
            var dl = new Rchar[10];

            dl[0] = new RcharUAlpha(0);
            Array.Copy(Numerics(9, 1), 0, dl, 1, 9);

            dlFormats = new[] { new DriversLicense(dl, this), new DriversLicense(Numerics(10), this) };
        }
Example #13
0
        public WestVirginia() : base("WV")
        {
            var dl = new Rchar[7];

            dl[0] = new RcharLimited(0, 'A', 'B', 'C', 'D', 'E', 'F', 'I', 'S', '0', '1', 'X');
            Array.Copy(Numerics(6, 1), 0, dl, 1, 6);

            dlFormats = new[] { new DriversLicense(dl, this) };
        }
Example #14
0
        public Kansas() : base("KS")
        {
            var dl = new Rchar[9];

            dl[0] = new RcharUAlpha(0);
            Array.Copy(Numerics(8, 1), 0, dl, 1, 8);

            dlFormats = new[] { new DriversLicense(dl, this) };
        }
Example #15
0
        public Virginia() : base("VA")
        {
            var dl = new Rchar[9];

            dl[0] = new RcharUAlpha(0);
            Array.Copy(Numerics(8, 1), 0, dl, 1, 8);

            dlFormats = new[] { new DriversLicense(dl, this), new DriversLicense(Numerics(12), this) };
        }
Example #16
0
        public Illinois() : base("IL")
        {
            var dl = new Rchar[12];

            dl[0] = new RcharUAlpha(0);
            Array.Copy(Numerics(11, 1), 0, dl, 1, 11);

            dlFormats = new[] { new DriversLicense(dl, this) };
        }
Example #17
0
        public Vermont() : base("VT")
        {
            var dl = new Rchar[8];

            Array.Copy(Numerics(7), 0, dl, 0, 7);
            dl[7] = new RcharLimited(7, 'A');

            dlFormats = new[] { new DriversLicense(dl, this), new DriversLicense(Numerics(8), this) };
        }
Example #18
0
        public Arizona()
            : base("AZ")
        {
            var dl = new Rchar[9];
            dl[0] = new LimitedRchar(0, 'A', 'B', 'D', 'Y');
            Array.Copy(Numerics(8,1), 0, dl, 1, 8);

            dlFormats = new[] { new DriversLicense(dl, this), new DriversLicense(Numerics(9), this) };
        }
Example #19
0
        public DistrictOfColumbia() : base("DC")
        {
            var dl = new Rchar[10];

            dl[0] = new RcharUAlpha(0);
            dl[1] = new RcharUAlpha(1);
            Array.Copy(Numerics(8, 2), 0, dl, 2, 8);
            dlFormats = new[] { new DriversLicense(dl, this) };
        }
Example #20
0
        public Nebraska() : base("NE")
        {
            AgeOfMajority = 19;
            var dl = new Rchar[9];

            dl[0] = new RcharUAlpha(0);
            Array.Copy(Numerics(8, 1), 0, dl, 1, 8);

            dlFormats = new[] { new DriversLicense(dl, this) };
        }
Example #21
0
        public Montana() : base("MT")
        {
            var dl = new Rchar[9];

            dl[0] = new RcharUAlpha(0);
            dl[1] = new RcharNumeric(1);
            dl[2] = new RcharAlphaNumeric(2);
            Array.Copy(Numerics(6, 3), 0, dl, 3, 6);
            dlFormats = new[] { new DriversLicense(dl, this) };
        }
Example #22
0
        public Colorado() : base("CO")
        {
            var dl = new Rchar[8];

            dl[0] = new RcharUAlpha(0);
            dl[1] = new RcharUAlpha(1);
            Array.Copy(Numerics(6, 2), 0, dl, 2, 6);

            dlFormats = new[] { new DriversLicense(dl, this), new DriversLicense(Numerics(9), this) };
        }
Example #23
0
        public Iowa() : base("IA")
        {
            var dl = new Rchar[9];

            for (var i = 0; i < dl.Length; i++)
            {
                dl[i] = new RcharAlphaNumeric(i);
            }

            dlFormats = new[] { new DriversLicense(dl, this), new DriversLicense(Numerics(9), this) };
        }
Example #24
0
        public NorthDakota() : base("ND")
        {
            var dl = new Rchar[9];

            dl[0] = new RcharUAlpha(0);
            dl[1] = new RcharUAlpha(1);
            dl[2] = new RcharUAlpha(2);
            Array.Copy(Numerics(6, 3), 0, dl, 3, 6);

            dlFormats = new[] { new DriversLicense(dl, this), new DriversLicense(Numerics(9), this) };
        }
Example #25
0
        public Michigan() : base("MI")
        {
            var dl = new Rchar[13];

            dl[0] = new RcharUAlpha(0);
            dl[1] = new RcharLimited(1, '1', '2', '3', '4', '5', '6');
            dl[2] = new RcharLimited(1, '1', '2', '3', '4', '5', '6');
            dl[3] = new RcharLimited(1, '1', '2', '3', '4', '5', '6');
            Array.Copy(Numerics(9, 4), 0, dl, 4, 9);

            dlFormats = new[] { new DriversLicense(dl, this) };
        }
Example #26
0
        public NewHampshire() : base("NH")
        {
            var dl = new Rchar[10];

            dl[0] = new RcharNumeric(0);
            dl[1] = new RcharNumeric(1);
            dl[2] = new RcharUAlpha(2);
            dl[3] = new RcharUAlpha(3);
            dl[4] = new RcharUAlpha(4);
            Array.Copy(Numerics(4, 5), 0, dl, 5, 4);
            dl[9] = new RcharLimited(9, '1', '2', '3', '4', '5', '6', '7', '8', '9');//no zero

            dlFormats = new[] { new DriversLicense(dl, this) };
        }
Example #27
0
        public Washington() : base("WA")
        {
            var dl = new Rchar[12];

            dl[0]  = new RcharUAlpha(0);
            dl[1]  = new RcharUAlpha(1);
            dl[2]  = new RcharUAlpha(2);
            dl[3]  = new RcharUAlpha(3);
            dl[4]  = new RcharUAlpha(4);
            dl[5]  = new RcharUAlpha(5);
            dl[6]  = new RcharUAlpha(6);
            dl[7]  = new RcharAlphaNumeric(7);
            dl[8]  = new RcharNumeric(8);
            dl[9]  = new RcharLimited(9, '*');
            dl[10] = new RcharAlphaNumeric(10);
            dl[11] = new RcharAlphaNumeric(11);

            dlFormats = new[] { new DriversLicense(dl, this) };
        }
Example #28
0
        public Connecticut() : base("CT")
        {
            var dl = new Rchar[9];

            dl[0] = new RcharLimited(0, '0');
            dl[1] = new RcharLimited(1, '1', '2', '3', '4', '5', '6', '7', '8', '9');
            Array.Copy(Numerics(7, 2), 0, dl, 2, 7);
            var dlf00 = new DriversLicense(dl, this);

            dl    = new Rchar[9];
            dl[0] = new RcharLimited(0, '1');
            Array.Copy(Numerics(8, 1), 0, dl, 1, 8);
            var dlf01 = new DriversLicense(dl, this);

            dl    = new Rchar[9];
            dl[0] = new RcharLimited(0, '2');
            dl[1] = new RcharLimited(1, '0', '1', '2', '3', '4');
            Array.Copy(Numerics(7, 2), 0, dl, 2, 7);
            var dlf02 = new DriversLicense(dl, this);

            dlFormats = new[] { dlf00, dlf01, dlf02 };
        }
Example #29
0
        public Colorado()
            : base("CO")
        {
            var dl = new Rchar[8];
            dl[0] = new UAlphaRchar(0);
            dl[1] = new UAlphaRchar(1);
            Array.Copy(Numerics(6, 2), 0, dl, 2, 6);

            dlFormats = new[] { new DriversLicense(dl, this), new DriversLicense(Numerics(9), this) };
        }
Example #30
0
 public RhodeIsland()
     : base("RI")
 {
     var dl = new Rchar[7];
     dl[0] = new LimitedRchar(0, 'V');
     Array.Copy(Numerics(6,1),0,dl,1,6);
     dlFormats = new[] {new DriversLicense(dl, this), new DriversLicense(Numerics(7), this) };
 }
Example #31
0
        public Washington()
            : base("WA")
        {
            var dl = new Rchar[12];
            dl[0] = new UAlphaRchar(0);
            dl[1] = new UAlphaRchar(1);
            dl[2] = new UAlphaRchar(2);
            dl[3] = new UAlphaRchar(3);
            dl[4] = new UAlphaRchar(4);
            dl[5] = new UAlphaRchar(5);
            dl[6] = new UAlphaRchar(6);
            dl[7] = new AlphaNumericRchar(7);
            dl[8] = new NumericRchar(8);
            dl[9] = new LimitedRchar(9,'*');
            dl[10] = new AlphaNumericRchar(10);
            dl[11] = new AlphaNumericRchar(11);

            dlFormats = new[] {new DriversLicense(dl, this) };
        }
Example #32
0
        public Michigan()
            : base("MI")
        {
            var dl = new Rchar[13];
            dl[0] = new UAlphaRchar(0);
            dl[1] = new LimitedRchar(1, '1', '2', '3', '4', '5', '6');
            dl[2] = new LimitedRchar(1, '1', '2', '3', '4', '5', '6');
            dl[3] = new LimitedRchar(1, '1', '2', '3', '4', '5', '6');
            Array.Copy(Numerics(9, 4), 0, dl, 4, 9);

            dlFormats = new[] { new DriversLicense(dl, this) };
        }
Example #33
0
 public DriversLicense(Rchar[] format)
 {
     this.format = format;
 }
Example #34
0
 public CreditCardNumber(Rchar[] format)
 {
     CheckDigitFunc = Etc.CalcLuhnCheckDigit;
     this.format = format;
 }
Example #35
0
        public Vermont()
            : base("VT")
        {
            var dl = new Rchar[8];
            Array.Copy(Numerics(7),0,dl,0,7);
            dl[7] = new LimitedRchar(7,'A');

            dlFormats = new[] {new DriversLicense(dl, this), new DriversLicense(Numerics(8), this) };
        }
Example #36
0
 public NewJersey()
     : base("NJ")
 {
     var dl = new Rchar[15];
     dl[0] = new UAlphaRchar(0);
     Array.Copy(Numerics(14,1),0,dl,1,14);
     dlFormats = new[] {new DriversLicense(dl, this) };
 }
Example #37
0
        public NewHampshire()
            : base("NH")
        {
            var dl = new Rchar[10];
            dl[0] = new NumericRchar(0);
            dl[1] = new NumericRchar(1);
            dl[2] = new UAlphaRchar(2);
            dl[3] = new UAlphaRchar(3);
            dl[4] = new UAlphaRchar(4);
            Array.Copy(Numerics(4, 5), 0, dl, 5, 4);
            dl[9] = new LimitedRchar(9,'1','2','3','4','5','6','7','8','9');//no zero

            dlFormats = new[] {new DriversLicense(dl, this) };
        }
Example #38
0
        public Nebraska()
            : base("NE")
        {
            var dl = new Rchar[9];
            dl[0] = new UAlphaRchar(0);
            Array.Copy(Numerics(8, 1), 0, dl, 1, 8);

            dlFormats = new[] { new DriversLicense(dl, this) };
        }
Example #39
0
 public Montana()
     : base("MT")
 {
     var dl = new Rchar[9];
     dl[0] = new UAlphaRchar(0);
     dl[1] = new NumericRchar(1);
     dl[2] = new AlphaNumericRchar(2);
     Array.Copy(Numerics(6, 3), 0, dl, 3, 6);
     dlFormats = new[] { new DriversLicense(dl, this) };
 }
Example #40
0
        public WestVirginia()
            : base("WV")
        {
            var dl = new Rchar[7];
            dl[0] = new LimitedRchar(0,'A','B','C','D','E','F','I','S','0','1','X');
            Array.Copy(Numerics(6,1),0,dl,1,6);

            dlFormats = new[] {new DriversLicense(dl, this) };
        }
Example #41
0
        public Minnesota()
            : base("MN")
        {
            var dl = new Rchar[13];
            dl[0] = new UAlphaRchar(0);
            Array.Copy(Numerics(12, 1), 0, dl, 1, 12);

            dlFormats = new[] { new DriversLicense(dl, this) };
        }
Example #42
0
        public Indiana()
            : base("IN")
        {
            var dl = new Rchar[10];
            dl[0] = new UAlphaRchar(0);
            Array.Copy(Numerics(9, 1), 0, dl, 1, 9);

            dlFormats = new[] { new DriversLicense(dl, this), new DriversLicense(Numerics(10), this) };
        }
Example #43
0
        public Virginia()
            : base("VA")
        {
            var dl = new Rchar[9];
            dl[0] = new UAlphaRchar(0);
            Array.Copy(Numerics(8,1),0,dl,1,8);

            dlFormats = new[] {new DriversLicense(dl, this), new DriversLicense(Numerics(12), this) };
        }
Example #44
0
 public NewYork()
     : base("NY")
 {
     var dl = new Rchar[15];//actual length is 16 but last digit is check-digit
     dl[0] = new UAlphaRchar(0);
     Array.Copy(Numerics(14, 1), 0, dl, 1, 14);
     dlFormats = new[] {new DriversLicense(dl, this) };
 }
Example #45
0
        public Connecticut()
            : base("CT")
        {
            var dl = new Rchar[9];
            dl[0] = new LimitedRchar(0,'0');
            dl[1] = new LimitedRchar(1, '1', '2', '3', '4', '5', '6', '7', '8', '9');
            Array.Copy(Numerics(7, 2), 0, dl, 2, 7);
            var dlf00 = new DriversLicense(dl, this);

            dl = new Rchar[9];
            dl[0] = new LimitedRchar(0, '1');
            Array.Copy(Numerics(8, 1), 0, dl, 1, 8);
            var dlf01 = new DriversLicense(dl, this);

            dl = new Rchar[9];
            dl[0] = new LimitedRchar(0, '2');
            dl[1] = new LimitedRchar(1, '0', '1', '2', '3', '4');
            Array.Copy(Numerics(7, 2), 0, dl, 2, 7);
            var dlf02 = new DriversLicense(dl, this);

            dlFormats = new[] {dlf00, dlf01, dlf02};
        }
Example #46
0
        public Iowa()
            : base("IA")
        {
            var dl = new Rchar[9];
            for (var i = 0; i < dl.Length; i++)
            {
                dl[i] = new AlphaNumericRchar(i);
            }

            dlFormats = new[] {new DriversLicense(dl, this), new DriversLicense(Numerics(9), this) };
        }
Example #47
0
 public DriversLicense(Rchar[] format, UsState issuingState)
     : this(format)
 {
     IssuingState = issuingState;
 }
Example #48
0
        public Illinois()
            : base("IL")
        {
            var dl = new Rchar[12];
            dl[0] = new UAlphaRchar(0);
            Array.Copy(Numerics(11, 1), 0, dl, 1, 11);

            dlFormats = new[] { new DriversLicense(dl, this) };
        }
Example #49
0
        public NorthDakota()
            : base("ND")
        {
            var dl = new Rchar[9];
            dl[0] = new UAlphaRchar(0);
            dl[1] = new UAlphaRchar(1);
            dl[2] = new UAlphaRchar(2);
            Array.Copy(Numerics(6,3),0,dl,3,6);

            dlFormats = new[] { new DriversLicense(dl, this), new DriversLicense(Numerics(9), this) };
        }
Example #50
0
 public DistrictOfColumbia()
     : base("DC")
 {
     var dl = new Rchar[10];
     dl[0] = new UAlphaRchar(0);
     dl[1] = new UAlphaRchar(1);
     Array.Copy(Numerics(8, 2), 0, dl, 2, 8);
     dlFormats = new[] { new DriversLicense(dl, this) };
 }
Example #51
0
 public Ohio()
     : base("OH")
 {
     var dl = new Rchar[9];
     dl[0] = new UAlphaRchar(0);
     dl[1] = new UAlphaRchar(1);
     Array.Copy(Numerics(7, 2), 0, dl, 2, 7);
     dlFormats = new[] {new DriversLicense(dl, this) };
 }
Example #52
0
 public Oklahoma()
     : base("OK")
 {
     var dl = new Rchar[10];
     dl[0] = new LimitedRchar(0,
         'A',
         'B',
         'C',
         'D',
         'E',
         'F',
         'G',
         'H',
         'J',
         'K',
         'L',
         'M',
         'N',
         'P',
         'R',
         'S',
         'T',
         'U',
         'V',
         'W',
         'Y',
         'Z');//no 'I','O', 'X' nor 'Q'
     Array.Copy(Numerics(9,1),0,dl,1,9);
     dlFormats = new[] {new DriversLicense(dl, this), new DriversLicense(Numerics(9), this) };
 }
Example #53
0
        public Massachusetts()
            : base("MA")
        {
            var dl = new Rchar[9];
            dl[0] = new LimitedRchar(0,
                'A',
                'B',
                'C',
                'D',
                'E',
                'F',
                'G',
                'H',
                'I',
                'J',
                'K',
                'L',
                'M',
                'N',
                'O',
                'P',
                'Q',
                'R',
                'S',
                'T',
                'U',
                'V',
                'W',
                'Y',
                'Z');// no 'X'
            Array.Copy(Numerics(8, 1), 0, dl, 1, 8);

            dlFormats = new[] { new DriversLicense(dl, this), new DriversLicense(Numerics(9), this) };
        }
Example #54
0
        public Hawaii()
            : base("HI")
        {
            var dl = new Rchar[9];
            dl[0] = new LimitedRchar(0,'H');
            Array.Copy(Numerics(8, 1), 0, dl, 1, 8);

            dlFormats = new[] { new DriversLicense(dl, this), new DriversLicense(Numerics(9), this) };
        }