AWLStringGenerator 1.0.0
dotnet add package AWLStringGenerator --version 1.0.0
NuGet\Install-Package AWLStringGenerator -Version 1.0.0
<PackageReference Include="AWLStringGenerator" Version="1.0.0" />
paket add AWLStringGenerator --version 1.0.0
#r "nuget: AWLStringGenerator, 1.0.0"
// Install AWLStringGenerator as a Cake Addin #addin nuget:?package=AWLStringGenerator&version=1.0.0 // Install AWLStringGenerator as a Cake Tool #tool nuget:?package=AWLStringGenerator&version=1.0.0
String Generator
Basic service to allow configurable generation of randomly composed strings.
Installation
There are required settings that must be made available through app settings. Those settings are as follows:
{
"StringGenerator": {
"IncludeCharacters": true | false, //Should characters be included in the generated strings
"IncludeNumbers": true | false, //Should numbers be included in the generated strings
"IncludeUpperCase": true | false, //Should upper case characters be included in the generated strings
"IncludeSpecialCharacters": true | false, //Should special characters be included in the generated strings
}
}
Usage
To initialise the connection to the database, the method AddStringGenerator
should be called passing in an IConfiguration
instance that contains the above configuration settings.
I.e. .AddStringGenerator(_configuration);
To then utilise the string generator service, ensure the interface IStringGeneratorService
is injected wherever it needs to be utilised.
I.e.
private readonly IStringGeneratorService _stringGeneratorService;
private readonly int _length = 10;
public MyRepository (IStringGeneratorService stringGeneratorService) {
_stringGeneratorService = stringGeneratorService;
}
public Task<List<Entity>> GetString =>
_stringGeneratorService.GenerateString(_length);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Microsoft.Extensions.Configuration (>= 7.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0.0)
- Swashbuckle.AspNetCore.Newtonsoft (>= 6.2.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 177 | 5/23/2023 |