Corner49.Infra.Core 10.0.169

dotnet add package Corner49.Infra.Core --version 10.0.169
                    
NuGet\Install-Package Corner49.Infra.Core -Version 10.0.169
                    
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="Corner49.Infra.Core" Version="10.0.169" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Corner49.Infra.Core" Version="10.0.169" />
                    
Directory.Packages.props
<PackageReference Include="Corner49.Infra.Core" />
                    
Project file
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 Corner49.Infra.Core --version 10.0.169
                    
#r "nuget: Corner49.Infra.Core, 10.0.169"
                    
#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.
#:package Corner49.Infra.Core@10.0.169
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Corner49.Infra.Core&version=10.0.169
                    
Install as a Cake Addin
#tool nuget:?package=Corner49.Infra.Core&version=10.0.169
                    
Install as a Cake Tool

Corner49.Infra.Core

Shared abstractions and utilities for the Corner49.Infra packages – a set of packages that provide opinionated tooling for infrastructure in .NET applications.

You normally do not install this package directly: it comes along with Corner49.Infra, Corner49.Infra.CLI and the Azure packages. Install it on its own when you write your own infra extension or only want the utilities.

dotnet add package Corner49.Infra.Core

Abstractions

Type Purpose
IInfraBuilder The builder contract every extension targets: Name, Services, Configuration and AddExtension(...). Implemented by InfraBuilder in Corner49.Infra and Corner49.Infra.CLI.
InfraExtension Base class for a pluggable feature. Build runs before the host is built (register services here), Start runs after it is built (initialise resources here).
LoggingOptions Options for WithLogging(...): TrackActivity, TrackDependencies, TrackContent, WriteToConsoleAsJson, FilterCategoryPrefix.

Writing an extension

using Corner49.Infra;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

public class CacheExtension : InfraExtension {

    public override Task Build(IInfraBuilder infra, IConfiguration config) {
        infra.Services.Configure<CacheOptions>(config.GetSection("Cache"));
        infra.Services.AddSingleton<ICache, RedisCache>();
        return Task.CompletedTask;
    }

    public override Task Start(IServiceProvider serviceProvider) {
        return serviceProvider.GetRequiredService<ICache>().Connect();
    }
}

public static class CacheServiceExtensions {
    public static IInfraBuilder AddCache(this IInfraBuilder infra) {
        return infra.AddExtension(new CacheExtension());
    }
}

Because the extension only depends on IInfraBuilder, it works in both web apps and console apps.

Utilities

All in the Corner49.Infra.Tools namespace.

Type What it does
JsonHelper JsonHelper.Options and options.SetDefault() – the System.Text.Json defaults used across the packages: camelCase names, enums as strings, nulls omitted on write, numbers readable from strings.
Base36, Base62 Compact ids: NewId() (from a GUID), FromGuid / ToGuid, FromNumber / ToNumber. Base36.NewShortId() combines a timestamp with a random number.
Base64 Encode / Decode for UTF-8 strings.
Generator NewId() (short base36 id), GetCRC(string) and Guid.ToShort().
Hasher GetEmailHash(email) – a deterministic obfuscated key for an e-mail address. Not a cryptographic hash.
DateTimeExtensions Time-zone aware conversion and formatting: ConvertToUtc, ConvertToLocalTime, ToLocalString, FormatToString, FirstOfMonth. The time zone defaults to Europe/Brussels when none is passed.
DateTimeHelper DateToInt / DateFromInt – dates as yyyyMMdd integers.
using Corner49.Infra.Tools;

string id = Generator.NewId();
string json = JsonSerializer.Serialize(order, JsonHelper.Options);
DateTime utc = localTime.ConvertToUtc("Europe/Amsterdam");
int day = DateTime.Today.DateToInt();   // 20261007

Source: https://github.com/FrankVDL2471/Corner49.Infra

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on Corner49.Infra.Core:

Package Downloads
Corner49.Infra

Opinionated bootstrap for ASP.NET Core web apps and APIs: configuration, logging, OpenAPI, Auth0, health checks, jobs, Cosmos DB, Service Bus and Blob Storage. The main package of the Corner49.Infra packages

Corner49.Infra.AzureStorage

Opinionated wrappers for Azure Blob Storage and Azure File Shares. Part of the Corner49.Infra packages

Corner49.Infra.AzureCosmosDB

Opinionated repository layer for Azure Cosmos DB: automatic container creation, paging, bulk operations, change feed and RU monitoring. Part of the Corner49.Infra packages

Corner49.Infra.AzureServiceBus

Opinionated messaging on Azure Service Bus: auto-provisioned queues and topics, typed messages and hosted handlers. Part of the Corner49.Infra packages

Corner49.Infra.CLI

Opinionated bootstrap for .NET console apps, workers and containerised jobs: configuration, logging, named jobs and System.CommandLine. Part of the Corner49.Infra packages

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.169 0 10/21/2026
10.0.168 0 10/21/2026
10.0.167 0 10/21/2026
10.0.166 71 10/20/2026
10.0.165 76 10/20/2026
10.0.164 63 10/20/2026
10.0.163 58 10/20/2026
10.0.162 61 10/20/2026
10.0.161 61 10/20/2026
10.0.159 65 10/20/2026
10.0.158 100 10/19/2026
10.0.157 87 10/19/2026
10.0.156 153 10/16/2026
10.0.154 173 10/14/2026
10.0.153 142 10/14/2026
10.0.151 290 10/8/2026
10.0.150 143 10/8/2026
10.0.149 137 10/8/2026
10.0.148 140 10/8/2026
10.0.147 141 10/8/2026
Loading failed