uSignIn.CommonSettings
3.1.0
Prefix Reserved
dotnet add package uSignIn.CommonSettings --version 3.1.0
NuGet\Install-Package uSignIn.CommonSettings -Version 3.1.0
<PackageReference Include="uSignIn.CommonSettings" Version="3.1.0" />
paket add uSignIn.CommonSettings --version 3.1.0
#r "nuget: uSignIn.CommonSettings, 3.1.0"
// Install uSignIn.CommonSettings as a Cake Addin #addin nuget:?package=uSignIn.CommonSettings&version=3.1.0 // Install uSignIn.CommonSettings as a Cake Tool #tool nuget:?package=uSignIn.CommonSettings&version=3.1.0
uSignIn.CommonSettings
uSignIn.CommonSettings is an open-source C# class library that provides a wrapper around Common settings in the appsettings.json
Features
- All common settings that need to used by your project or packages can be accessed via this service
Contributing
We welcome contributions! If you find a bug, have an idea for improvement, please submit an issue or a pull request on GitHub.
Getting Started
NuGet Package
To include uSignIn.CommonSettings in your project, install the NuGet package:
dotnet add package uSignIn.CommonSettings
Then in your appsettings.json
add the following sample configuration and change the values to match the details of your credentials to the various services.
"Settings": {
"BaseUrl": "https://[YOUR-HOSTNAME]",
"RequestTimeSpanRangeInMilliseconds": "-120000:120000"
}
The RequestTimeSpanRangeInMilliseconds
example above means that all communication to the server cannot be replayed, as the server timestamp needs to match the client timestamp allowed within a range of -120 seconds to 120 seconds.
After the above is done, you can just Dependency inject the SettingsService
in your C# class.
For example:
Here is a Sample Service SampleService
C# class that injects the SettingsService
and then uses the _settingsService.BaseUri
using uSignIn.CommonSettings.Settings;
namespace Test.Stuff
{
public sealed class SampleService
{
private readonly SettingsService _settingsService;
public SampleService(
SettingsService settingsService
{
_settingsService = settingsService;
}
internal string NotificationUrl => new Uri(_settingsService.BaseUri, "/helloWorld").ToString();
}
}
GitHub Repository
Visit our GitHub repository for the latest updates, documentation, and community contributions. https://github.com/prmeyn/CommonSettings
License
This project is licensed under the GNU GENERAL PUBLIC LICENSE.
Happy coding! 🚀🌐📚
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
-
net8.0
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.2)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.1)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on uSignIn.CommonSettings:
Package | Downloads |
---|---|
SMSwitch
Package Description |
|
EmailSwitch
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.