Skip to content

Getting Started

Taiizor edited this page Jan 6, 2023 · 27 revisions

So how do I start?

Installation

Skylark is distributed via Microsofts package manager NuGet. We refer to this page for detailed descriptions on how to get started/use NuGet. Here is a link to the Skylark NuGet package.

Using NuGet

By Package Manager (PM):

Install-Package Skylark

By .NET CLI:

dotnet add package Skylark

As DLL

Simply place the Skylark DLL into your .NET project and add a reference to it. Please keep in mind that the .NET version of your solution must match with the runtime version of the Skylark DLL (currently compiled with .NET Standard 2.0 & 2.1).

Example application

The complete example below shows how you can generate a password with all its parameters.

1. Create a new Console Application project

2. Install the Skylark package

At a shell prompt in the project directory, type:

By Package Manager (PM):

Install-Package Skylark

By .NET CLI:

dotnet add package Skylark

3. Add the following code to Program.cs

using Skylark.Enum;
using Skylark.Extension;

namespace SkylarkExample
{
    class Program
    {
        static void Main()
        {
            string Password1 = PasswordExtension.Generate(8, AlphabeticPasswordType.Mixed, SpecialPasswordType.Mixed);
            Console.WriteLine(Password1);

            Console.WriteLine("=====^^=====");

            string Password2 = PasswordExtension.Generate(12, AlphabeticPasswordType.Big, SpecialPasswordType.Number);
            Console.WriteLine(Password2);

            Console.WriteLine("=====^^=====");

            string Password3 = PasswordExtension.Generate(12, AlphabeticPasswordType.Small, SpecialPasswordType.Symbol);
            Console.WriteLine(Password3);

            Console.WriteLine("=====^^=====");

            string Password4 = PasswordExtension.Generate(6, AlphabeticPasswordType.None, SpecialPasswordType.Number, "Prefix");
            Console.WriteLine(Password4);

            Console.WriteLine("=====^^=====");

            string Password5 = PasswordExtension.Generate(4, AlphabeticPasswordType.Big, SpecialPasswordType.None, "Prefix", "Suffix");
            Console.WriteLine(Password5);
        }
    }
}

4. Run the program

Skylark Getting Started Example

Clone this wiki locally