SystemLibrary.Common.Framework
8.0.0.33
dotnet add package SystemLibrary.Common.Framework --version 8.0.0.33
NuGet\Install-Package SystemLibrary.Common.Framework -Version 8.0.0.33
<PackageReference Include="SystemLibrary.Common.Framework" Version="8.0.0.33" />
<PackageVersion Include="SystemLibrary.Common.Framework" Version="8.0.0.33" />
<PackageReference Include="SystemLibrary.Common.Framework" />
paket add SystemLibrary.Common.Framework --version 8.0.0.33
#r "nuget: SystemLibrary.Common.Framework, 8.0.0.33"
#addin nuget:?package=SystemLibrary.Common.Framework&version=8.0.0.33
#tool nuget:?package=SystemLibrary.Common.Framework&version=8.0.0.33
SystemLibrary Common Framework
Description
Framework for every .NET application.
Requirements
- >= .NET 8
🚀 Features
🔧 Initialization
Use AddFrameworkServices()
and AddFrameworkMiddlewares()
to enable HTTPS redirection, caching, logging, auth, cookie policies, endpoints, and more.
var options = new FrameworkOptions();
services.AddFrameworkServices(options);
app.AddFrameworkMiddlewares(options);
⚙️ Config Mapping
Auto-binds JSON config files to C# classes by name, with transformations based on environment name.
~/myconfig.json: { url: "www.systemlibrary.com" }
class MyConfig : Config<MyConfig> { public string Url { get; set; } }
var url = MyConfig.Instance.Url;
🪵 Logging
Global Log
instance with .Dump()
– similar to console.log
in JavaScript.
Log.Dump(typeof(string));
Log.Error("hello");
🧠 Cache
Sharded global cache with fallback, metrics, and auto key generation.
var value = Cache.Get<string>("key", () => Compute());
🌐 HTTP Client
Client which caches underlying HttpClient
with retry policies, circuit breaker, and metrics.
var json = Client.Get<string>("https://api.example.com/data");
var json2 = "https://api.example.com/data".Get<string>();
📦 Extensions
.Json()
, .PartialJson()
, .Encrypt()
, .Decrypt()
, .ToBase64()
, .FromBase64()
, .Compress()
, .Decompress()
, .Obfuscate()
, .Deobfuscate()
, .Is()
, .IsNot()
, .GetCompressedKey
and more...
var json = user.Json();
var encrypted = json.Encrypt();
var obfuscated = encrypted.Obfuscate();
var compressedKey = obfuscated.GetCompressedKey();
"hi".ToSha256();
"hi".Compress();
"hi".ToBase64();
"hi".Obfuscate();
🔐 Encryption
Encrypt/decrypt using AES CBC PKCS7 via string/byte extensions with global key management.
var encrypted = "secret".Encrypt();
var decrypted = encrypted.Decrypt();
🧩 Enhanced Enums
Decorate enums with [EnumText]
and [EnumValue]
for better JSON control and use ToValue()
or ToText()
on the Enum.
enum Role { [EnumText("Administrator")] Admin }
...
var role = user.Role.ToText(); // `Administrator`
📡 API Base
BaseApiController
with filter attributes like [OriginFilter]
, [ApiTokenFilter]
and [UserAgentFilter]
.
[ApiTokenFilter(name: "hello", value: "world")]
public class MyApi : BaseApiController { }
🔗 ModelBinder
Model bindings auto-registered for DateTime and enum types — built to correctly parse most inputs into the values you actually want.
Index(Role role, DateTime, date) {
}
📖 Self-Documenting APIs
Automatic /docs
endpoint listing all routes, inputs, and metadata.
Latest Release Notes
- 8.0.0.33
- UseCookiePolicy option removed (feature)
- Cookie policies always applied, all cookies are lax, httpOnly as false, except the three authentication cookie schemes, Cookies, Identity App and External (feature)
- Cookie policy: identity.application scheme has a sliding 24 hours expiration (new)
- Cookie policy: cookies has a 8 hour non sliding expiration (new)
- Randomness.String: rewritten into char array and generating all bytes in one go (optimized)
- GetCompressedKey: rewritten, compressed from 9th char, for very long strings adds a simple fingerprint based on a sample of 100 chars (optimized)
Version history
- View git history of this file if interested
Installation
Documentation
Nuget
Source
Suggestions and feedback
License
- Free with Tiered Pricing for additional features
Dependencies
- Chart.js, licensed under the MIT License.
- Prometheus-net, licensed under the MIT License.
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. net10.0 was computed. 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. |
-
net8.0
- Microsoft.Extensions.Http.Polly (>= 8.0.15)
- prometheus-net (>= 8.2.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SystemLibrary.Common.Framework:
Package | Downloads |
---|---|
SystemLibrary.Common.Episerver
Library with classes, methods and dijits for every .NET >= 8 episerver web application https://github.com/systemlibrary/systemlibrary-common-episerver/#Description Installation https://systemlibrary.github.io/systemlibrary-common-episerver/Install.html Documentation with sample code https://systemlibrary.github.io/systemlibrary-common-episerver/ |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
8.0.0.33 | 0 | 15 hours ago |