Oc6.Library 4.0.16

Oc6.Library

A comprehensive .NET library providing utilities and extensions for common development tasks including ASP.NET Core web applications, mathematical computations, text processing, networking, time handling, and more.

Table of Contents


GlobalConfig

Assembly configuration file that makes internal types visible to the test project.

Usage:

[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Oc6.Library.Tests")]

AspNetCore

ASP.NET Core utilities for building web applications. This namespace contains several sub-modules:

Auth

Authentication and authorization utilities for ASP.NET Core applications. See Auth README for details on:

  • Multi-scheme authentication (API Key, Oc6Auth)
  • Oc6AuthorizeAttribute for attribute-based authorization
  • Authentication validation endpoints

DependencyInjection

Automatic dependency injection and application configuration utilities. See DependencyInjection README for details on:

  • AutoDependencyInjectAttribute for automatic service registration
  • IWebApplicationConfigurator for structured app configuration
  • CORS configuration extensions

Options

Automatic configuration binding for the IOptions pattern. See Options README for details on:

  • AutoIOptionsAttribute for automatic options registration
  • Configuration binding utilities
  • Built-in configuration classes

TimeService

Testable time services for ASP.NET Core applications. See TimeService README for details on:

  • IDateTimeOffsetService interface
  • ScopeDateTimeOffsetService for scope-based consistent time
  • FixedDateTimeOffsetService for testing

Collections

Extension methods and utilities for working with collections. See Collections README for details on:

  • Shuffle() - Fisher-Yates shuffle algorithm for lists and arrays
  • TakeAndRemoveLast() - Remove and return the last element

Localization

ISO standard enumerations for internationalization. See Localization README for details on:

  • CountryCode - ISO 3166-1 alpha-2 country codes
  • CultureCode - Language and region combinations
  • CurrencyCode - ISO 4217 currency codes

Locking

Thread-safe async locking mechanisms. See Locking README for details on:

  • AsyncLock<TType> - Generic async lock using SemaphoreSlim
  • AsyncLockFactory - Factory for creating singleton lock instances

Logging

Structured logging system for ASP.NET Core. See Logging README for details on:

  • Audit logging middleware
  • Exception handler middleware
  • JSON serialization to console

Maths

Mathematical utilities and numerical computations. See Maths README for details on:

  • DecimalMath - High-precision decimal mathematics
  • DoubleMath - Double-precision operations
  • Fraction - Rational number representation
  • IntegerMath - Integer operations
  • LoanFunctions - Financial calculations
  • NewtonRaphson - Root-finding algorithm

Migrations

Entity Framework Core database migrations for the Oc6Auth system.

Initial Migration (20251002151834)

Creates the DataProtectionKeys table for ASP.NET Core Data Protection.

Table Structure:

  • Id (int, primary key, identity)
  • FriendlyName (nvarchar(max), nullable)
  • Xml (nvarchar(max), nullable)

Usage:

# Apply migrations
dotnet ef database update --project Oc6.Library.DbHost

Net

Network utilities for IP addresses, REST clients, and web push. See Net README for details on:

  • IP Range - CIDR notation and IP range operations
  • REST - HTTP client utilities
  • WebPush - Web push notification support

Resources

Localized error message resources for the library.

ErrorMessages

Auto-generated resource class providing strongly-typed access to error messages.

Available Messages:

  • InvalidAddressSize - "Invalid address size"
  • InvalidMask - "Invalid mask"
  • InvalidState - "Invalid state"
  • ListCannotBeEmpty - "List cannot be empty"
  • ListCannotBeNull - "List cannot be null"

Usage:

using Oc6.Library.Resources;

throw new ArgumentException(ErrorMessages.ListCannotBeEmpty);

Note: This is an internal class. Error messages are accessed internally by the library and are not intended for direct external use.


Text

Text processing and string manipulation utilities. See Text README for details on:

  • Levenshtein - Edit distance computation
  • StringManipulation - Common string operations

Time

Date and time utilities including simplified date-time structures. See Time README for details on:

  • SimpleDateTime - Timezone-free date-time struct (ISO 8601)
  • SimpleDateTimeJsonConverter - JSON serialization
  • SimpleDateTimeValueConverter - Entity Framework Core value converter
  • PropertyBuilderExtensions - EF Core property configuration

Showing the top 20 packages that depend on Oc6.Library.

Packages Downloads
Oc6.Queue.Client
Provides a QueueClient to enables access to features in the queue.oc6.dk ecosystem.
6
Oc6.Queue.Client
Provides a QueueClient to enables access to features in the queue.oc6.dk ecosystem.
4
Oc6.Queue.Client
Provides a QueueClient to enables access to features in the queue.oc6.dk ecosystem.
3
Oc6.Queue.Client
Provides a QueueClient to enables access to features in the queue.oc6.dk ecosystem.
2
Oc6.Queue.Client
Provides a QueueClient to enables access to features in the queue.oc6.dk ecosystem.
1

.NET 10.0

  • No dependencies.

Version Downloads Last updated
4.0.16 14 01/15/2026
4.0.12 2 01/14/2026
4.0.9 3 01/14/2026
4.0.7 2 01/14/2026
4.0.5 2 01/07/2026
4.0.3 2 01/06/2026
4.0.0 2 01/06/2026
3.1.0 4 01/05/2026
3.0.0 2 12/29/2025
2.2.6 3 12/23/2025
2.2.0 10 12/20/2025
2.1.3 2 12/19/2025
2.1.0 17 12/19/2025