CodeWave.Utils
1.0.7
dotnet add package CodeWave.Utils --version 1.0.7
NuGet\Install-Package CodeWave.Utils -Version 1.0.7
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="CodeWave.Utils" Version="1.0.7" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CodeWave.Utils" Version="1.0.7" />
<PackageReference Include="CodeWave.Utils" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CodeWave.Utils --version 1.0.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CodeWave.Utils, 1.0.7"
#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.
#addin nuget:?package=CodeWave.Utils&version=1.0.7
#tool nuget:?package=CodeWave.Utils&version=1.0.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CodeWave.Utils
This is a general purpose library with nice to have gadgets for APIs
You can include all items separatedly as you wich, but the simple way of using it is by using:
builder.AddAll();
and
app.UseAll();
Make sure to add the later before the app.UseAuthorization(); line from the default template
Example:
using CodeWave.Utils;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.AddAll();
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
app.UseDeveloperExceptionPage();
}
app.UseHttpsRedirection();
app.UseAll();
app.UseAuthorization();
app.MapControllers();
await app.RunAsync();
Configuration
All elements on the configuration are optional. Use only the ones needed.
Configuration should be set in this format:
{
"ApiInfo": {
"Id": "my-api",
"Title": "My Super Api",
"Version": "v1",
"Contact": {
"Name": "The Digital Team",
"Email": "digital@gmail.com"
}
},
"KeyVaultName": "my-keyvault-name",
"SqlServer": "my-sql-server-name",
"SqlCatalog": "my-sql-catalog",
"ServiceBusName": "my-sb-name",
"ServiceBusTopic": "my-sb-topic",
"StorageAccountName": "my-storage-account-name",
"ActiveDirectory": {
"Authority": "https://login.microsoftonline.com/***************************/v2.0",
"Audiences": []
},
"AzureActiveDirectory": {
"Authority": "https://login.microsoftonline.com/***************************/v2.0",
"Audiences": []
},
"SendGridKey: : "mysendgridkey**************",
"Twilio" : {
"AppId" : "my-twilio-appId",
"Token" : "my-twilio-token",
"FromNumber" : "+0987654321",
"WhatsappNumber" : "+1234567890"
}
}
General
All items in the configuration are optional. If correctly set:
- Heltchecks are added for elements selected in the config.
- The key vault is added as a configuration source, accessible using IConfiguration
- The SQL is added as a configuration source, it will automaticaly create a table named configurations.
- Connection string constructed automatically configuration["ConnectionStrings:Sql"]
- Default OData endpoint enabled to list/add/remove configurations
- Clients for storage are automatically added. Use BlobServiceClient, TableServiceClient, QueueServiceClient
- Service bus is automatically added. Use ServiceBusClient, ServiceBusAdministrationClient
- Swagger set up to use "documentation.xml", additional headers added
- Default active directory configuration added
- SendGrid client is automatically added. Use IEmailService
- Twillio client for SMS and whatsapp is added. Use ISmsService and IWhatsappService
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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- AspNetCore.HealthChecks.Azure.Data.Tables (>= 8.0.1)
- AspNetCore.HealthChecks.Azure.Storage.Blobs (>= 8.0.1)
- AspNetCore.HealthChecks.Azure.Storage.Queues (>= 8.0.1)
- AspNetCore.HealthChecks.AzureServiceBus (>= 8.0.1)
- AspNetCore.HealthChecks.SqlServer (>= 8.0.1)
- AutoMapper (>= 14.0.0)
- Azure.Data.Tables (>= 12.10.0)
- Azure.Extensions.AspNetCore.Configuration.Secrets (>= 1.4.0)
- Azure.Identity (>= 1.13.2)
- Azure.Messaging.ServiceBus (>= 7.19.0)
- Azure.Storage.Blobs (>= 12.24.0)
- Azure.Storage.Queues (>= 12.22.0)
- Fluid.Core (>= 2.22.0)
- Handlebars.Net (>= 2.1.6)
- Jsonata.Net.Native (>= 2.10.0)
- Microsoft.ApplicationInsights.AspNetCore (>= 2.23.0)
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 8.0.15)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.3.0)
- Microsoft.AspNetCore.OData (>= 8.3.0)
- Microsoft.AspNetCore.SpaServices.Extensions (>= 8.0.15)
- Microsoft.ClearScript (>= 7.5.0)
- Microsoft.EntityFrameworkCore (>= 8.0.15)
- Microsoft.EntityFrameworkCore.SqlServer (>= 8.0.15)
- Microsoft.Identity.Web (>= 3.8.4)
- Microsoft.Identity.Web.UI (>= 3.8.4)
- Newtonsoft.Json (>= 13.0.3)
- RulesEngine (>= 5.0.6)
- SendGrid (>= 9.29.3)
- Serilog (>= 4.2.0)
- Serilog.AspNetCore (>= 8.0.3)
- Serilog.Sinks.ApplicationInsights (>= 4.0.0)
- Swashbuckle.AspNetCore (>= 6.4.0)
- Twilio (>= 7.10.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.