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                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="uSignIn.CommonSettings" Version="3.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add uSignIn.CommonSettings --version 3.1.0                
#r "nuget: uSignIn.CommonSettings, 3.1.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.

Version Downloads Last updated
3.1.0 191 8/7/2024
3.0.0 82 8/6/2024
2.1.0 234 7/21/2024
2.0.0 164 7/21/2024
1.0.0 121 7/21/2024