PasswordGenerator.cs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
using System;

namespace PasswordGenerator
{
    [ObsoleteAttribute("The class 'PasswordGenerator' is obsolete. Use 'Password' instead.")]
    public class PasswordGenerator : Password
    {
        public PasswordGenerator()
        {

        }

        public PasswordGenerator(PasswordGeneratorSettings settings) : base (settings)
        {
        }

        public PasswordGenerator(int passwordLength) : base(passwordLength)
        {
        }

        public PasswordGenerator(bool includeLowercase, bool includeUppercase, bool includeNumeric, bool includeSpecial) : base(includeLowercase, includeUppercase, includeNumeric, includeSpecial)
        {
        }

        public PasswordGenerator(bool includeLowercase, bool includeUppercase, bool includeNumeric, bool includeSpecial,
            int passwordLength) : base(includeLowercase, includeUppercase, includeNumeric, includeSpecial, passwordLength)
        {
        }

        public PasswordGenerator(bool includeLowercase, bool includeUppercase, bool includeNumeric, bool includeSpecial,
            int passwordLength, int maximumAttempts) : base(includeLowercase, includeUppercase, includeNumeric, includeSpecial,
            passwordLength, maximumAttempts)
        {
        }

        public PasswordGenerator IncludeLowercase()
        {
            base.Settings = base.Settings.AddLowercase();
            return this;
        }

        public PasswordGenerator IncludeUppercase()
        {
            base.Settings = base.Settings.AddUppercase();
            return this;
        }

        public PasswordGenerator IncludeNumeric()
        {
            base.Settings = base.Settings.AddNumeric();
            return this;
        }

        public PasswordGenerator IncludeSpecial()
        {
            base.Settings = base.Settings.AddSpecial();
            return this;
        }

        public PasswordGenerator LengthRequired(int passwordLength)
        {
            base.Settings.PasswordLength = passwordLength;
            return this;
        }
    }
}