![]() |
VOOZH | about |
dotnet add package StoneKit.Infrastructure --version 2024.1.1.391401
NuGet\Install-Package StoneKit.Infrastructure -Version 2024.1.1.391401
<PackageReference Include="StoneKit.Infrastructure" Version="2024.1.1.391401" />
<PackageVersion Include="StoneKit.Infrastructure" Version="2024.1.1.391401" />Directory.Packages.props
<PackageReference Include="StoneKit.Infrastructure" />Project file
paket add StoneKit.Infrastructure --version 2024.1.1.391401
#r "nuget: StoneKit.Infrastructure, 2024.1.1.391401"
#:package StoneKit.Infrastructure@2024.1.1.391401
#addin nuget:?package=StoneKit.Infrastructure&version=2024.1.1.391401Install as a Cake Addin
#tool nuget:?package=StoneKit.Infrastructure&version=2024.1.1.391401Install as a Cake Tool
StoneKit Infrastructure is a comprehensive boilerplate for starting new ASP.NET Core 8 API projects. It integrates essential libraries and services, including FluentValidation, Serilog logging, hashing, HttpClient, OpenAPI documentation, and more, to streamline the setup and development process.
You can install StoneKit.Infrastructure via NuGet Package Manager:
PM> Install-Package StoneKit.Infrastructure
Logging:
Validation:
Hashing:
HTTP Client:
OpenAPI Documentation:
CORS Configuration:
Middleware:
SignalR:
Dependency Injection:
Controller Configuration:
Security:
Configure Services:
In your Program.cs, use the ConfigureServices method to configure all necessary services.
using Microsoft.Extensions.Configuration;
var builder = WebApplication.CreateBuilder(args);
var configOptions = new AppConfigurationOptions
{
// Set your options here
};
builder.ConfigureServices(configOptions);
var app = builder.BuildApp(configOptions);
app.Run();
App Configuration Options:
Define your configuration options to customize the setup.
public class AppConfigurationOptions : BaseConfiguration
{
// Define properties like AppName, SerilogOptions, OpenApiOptions, etc.
}
FluentValidation:
Add validators to your project by inheriting from AbstractValidator<T> and ensure they are in the configured assembly.
using FluentValidation;
public class SampleModelValidator : AbstractValidator<SampleModel>
{
public SampleModelValidator()
{
RuleFor(x => x.Property).NotEmpty();
}
}
public class ExceptionHandlerMiddleware : IMiddleware
{
public async Task InvokeAsync(HttpContext context, RequestDelegate next)
{
try
{
await next(context);
}
catch (Exception ex)
{
// Handle exception
}
}
}
public interface IHasher
{
string Hash(string input);
}
public class Hasher : IHasher
{
public string Hash(string input)
{
using var sha256 = SHA256.Create();
var bytes = sha256.ComputeHash(Encoding.UTF8.GetBytes(input));
return Convert.ToBase64String(bytes);
}
}
public static void ConfigureOpenApi(this WebApplicationBuilder builder, string appName, OpenApiOptions options, Assembly validatorAssembly)
{
// OpenAPI configuration logic
}
Contributions and feedback are welcome! Feel free to submit issues, feature requests, or pull requests on the GitHub repository.
This project is licensed under the MIT License - see the file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 5 NuGet packages that depend on StoneKit.Infrastructure:
| Package | Downloads |
|---|---|
|
StoneKit.Trustee.Host
rtwert |
|
|
StoneKit.Trustee.Providers.AzureKeyVault
Package Description |
|
|
StoneKit.Trustee.Providers.Git
Package Description |
|
|
StoneKit.Trustee.Providers.HashicorpVault
Package Description |
|
|
StoneKit.Trustee.Providers.FileSystem
Package Description |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2024.1.1.391401 | 265 | 10/5/2024 |
| 2024.1.1.305385 | 275 | 8/5/2024 |
| 2024.1.1.268769 | 202 | 7/9/2024 |
| 2024.1.1.261674 | 211 | 7/4/2024 |
| 2024.1.1.261665 | 208 | 7/4/2024 |
| 2024.1.1.261630 | 201 | 7/4/2024 |
| 2024.1.1.260673 | 219 | 7/3/2024 |
| 2024.1.1.260489 | 229 | 7/3/2024 |
| 2024.1.1.260485 | 202 | 7/3/2024 |
| 1.24.703.180801 | 944 | 7/3/2024 |
| 1.24.703.164607 | 671 | 7/3/2024 |
| 1.24.703.121215 | 353 | 7/3/2024 |
| 1.24.626.192714 | 200 | 6/26/2024 |
| 1.24.612.917 | 188 | 6/11/2024 |
| 1.24.611.233128 | 190 | 6/11/2024 |
| 1.24.611.232751 | 199 | 6/11/2024 |
| 1.24.603.121931 | 973 | 6/3/2024 |