Fluxera.Extensions.DependencyInjection.Abstractions 9.0.2

Prefix Reserved
dotnet add package Fluxera.Extensions.DependencyInjection.Abstractions --version 9.0.2                
NuGet\Install-Package Fluxera.Extensions.DependencyInjection.Abstractions -Version 9.0.2                
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="Fluxera.Extensions.DependencyInjection.Abstractions" Version="9.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Fluxera.Extensions.DependencyInjection.Abstractions --version 9.0.2                
#r "nuget: Fluxera.Extensions.DependencyInjection.Abstractions, 9.0.2"                
#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.
// Install Fluxera.Extensions.DependencyInjection.Abstractions as a Cake Addin
#addin nuget:?package=Fluxera.Extensions.DependencyInjection.Abstractions&version=9.0.2

// Install Fluxera.Extensions.DependencyInjection.Abstractions as a Cake Tool
#tool nuget:?package=Fluxera.Extensions.DependencyInjection.Abstractions&version=9.0.2                

Build Status

Fluxera.Extensions

A library that extends the Microsoft.Extensions.* libraries with custom functionality and also provices custom extensions.

Fluxera.Extensions.Caching

This extension contains Option classes for configuring a remote distributed cache server and several useful extension methods for the IDistributedCache service.

Fluxera.Extensions.Common

This extension contains several custom services:

  • IDateTimeOffsetProvider A service that provides mockable access to static DateTimeOffset.
  • IDateTimeProvider A service that provides mockable access to static DateTime.
  • IGuidGenerator A service to generate Guid using different generators.
  • IHashCalculator A service to calculate hashes from input values.
  • IJitterCalculator A service that adds entropy to any given number.
  • IPasswordGenerator A service that generates random passwords.
  • IRetryDelayCalculator A service that calculates retry delay with (truncated) binary exponential back-off.
  • IStringEncryptionService A service that can be used to simply encrypt/decrypt texts.

Fluxera.Extensions.DataManagement

This extension contains an infrastructure for inserting seed data into databases.

Fluxera.Extensions.DependencyInjection

This extension contains several additions to the dependency injection extension.

  • Decorator
    • Add decorators to services.
  • Named Services
    • Add named service implementations.
  • Lazy Services
    • Add Lazy<T> as open generic sevice type. Any service will be resolved lazily from it.
  • Object Accessor
    • Provides a way to access object instances from the IServiceCollection while still configuring services.

Fluxera.Extensions.Http

This extension provides a way to register named HttpClient services and several custom DelegatingHandler implementations.

public interface ITestHttpClientService : IHttpClientService
{
    Task<string> GetSomethingAsync();
}

public class TestHttpClientService : HttpClientServiceBase, ITestHttpClientService
{
    /// <inheritdoc />
    public TestHttpClientService(string name, HttpClient httpClient, RemoteService options)
        : base(name, httpClient, options)
    {
    }

    public async Task<string> GetSomethingAsync()
    {
        HttpResponseMessage response = await this.HttpClient.GetAsync("/");
        return await response.Content.ReadAsStringAsync();
    }
}

services.AddHttpClientService<ITestHttpClientService, TestHttpClientService>(
	context => new TestHttpClientService(context.Name, context.HttpClient, context.Options));

Fluxera.Extensions.Localization

This extension contains several extension methods IStringLocalizer service.

Fluxera.Extensions.OData

This extension provides a way to register named ODataClient services using Simple.OData.Client.

public interface ITestODataClientService : IODataClientService
{
}

public class TestODataClientService : ODataClientServiceBase<Person, string>, ITestODataClientService
{
    /// <inheritdoc />
    public TestODataClientService(string name, string collectionName, IODataClient oDataClient, RemoteService options)
        : base(name, collectionName, oDataClient, options)
    {
    }
}

services.AddODataClientService<ITestODataClientService, TestODataClientService>("People",
    context => new TestODataClientService(context.Name, context.CollectionName, context.ODataClient, context.Options));

Fluxera.Extensions.Validation

This extension provides an abstraction over validation frameworks. Any one framework can be used together with other ones. The validation results will merged by the extension.

At the moment System.ComponentModel.Annotations and FluentValidation is supported. One can configure the validators to use like this:

IServiceCollection services = new ServiceCollection();

services.AddValidation(builder =>
{
    builder
        .AddDataAnnotations()
        .AddFluentValidation(registration =>
        {
            registration.AddValidator<PersonValidator>();
        });
});

References

Steve Collins

Product 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 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Fluxera.Extensions.DependencyInjection.Abstractions:

Package Downloads
Fluxera.Extensions.DependencyInjection

The custom extensions for dependency injection.

Fluxera.Extensions.Hosting.Abstractions

The abstractions for the modular application host.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
9.0.2 659 11/16/2024
9.0.1 189 11/14/2024
9.0.0 98 11/14/2024
8.3.4 907 11/1/2024
8.3.3 321 7/9/2024
8.3.2 2,644 6/12/2024
8.3.1 1,156 6/2/2024
8.3.0 1,111 5/26/2024
8.2.1 162 5/24/2024
8.2.0 4,073 4/24/2024
8.1.0 5,943 4/18/2024
8.0.7 1,578 4/13/2024
8.0.6 419 4/13/2024
8.0.5 1,287 3/19/2024
8.0.4 3,572 2/22/2024
8.0.3 1,683 1/21/2024
8.0.2 8,117 1/4/2024
8.0.1 1,619 11/23/2023
8.0.0 1,696 11/15/2023
7.2.4 1,508 7/23/2023
7.2.3 527 7/20/2023
7.2.2 1,281 6/21/2023
7.2.1 1,228 4/29/2023
7.2.0 2,664 4/25/2023
7.1.3 4,320 4/13/2023
7.1.2 1,878 3/16/2023
7.1.1 2,465 2/27/2023
7.1.0 4,204 1/18/2023
7.0.5 4,907 12/22/2022
7.0.4 791 12/13/2022
7.0.3 3,958 12/5/2022
7.0.2 1,840 11/15/2022
7.0.1 1,767 11/12/2022
7.0.0 1,520 11/9/2022
6.1.8 8,668 10/12/2022
6.1.7 23,246 9/20/2022
6.1.6 13,114 9/15/2022
6.1.5 7,876 7/30/2022
6.1.4 7,759 6/30/2022
6.1.3 7,712 6/15/2022
6.1.2 9,421 6/7/2022
6.1.1 6,760 6/4/2022
6.1.0 1,565 6/4/2022
6.0.34 1,674 6/4/2022
6.0.33 21,429 5/28/2022
6.0.32 4,093 5/27/2022
6.0.31 1,578 5/27/2022
6.0.29 22,729 5/10/2022
6.0.28 7,390 5/5/2022
6.0.27 6,975 4/20/2022
6.0.26 3,889 4/20/2022
6.0.25 1,579 4/19/2022
6.0.23 5,365 4/11/2022
6.0.22 1,596 4/11/2022
6.0.20 3,097 4/10/2022
6.0.19 6,526 3/24/2022
6.0.18 3,969 2/17/2022
6.0.14 2,128 12/17/2021
6.0.13 806 12/14/2021
6.0.11 826 12/13/2021
6.0.8 842 12/13/2021
6.0.6 855 12/13/2021
6.0.4 445 12/13/2021
6.0.2 598 12/12/2021