Fluxera.Extensions.Validation.DataAnnotations 8.1.0

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

// Install Fluxera.Extensions.Validation.DataAnnotations as a Cake Tool
#tool nuget:?package=Fluxera.Extensions.Validation.DataAnnotations&version=8.1.0                

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 net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
8.1.0 1,370 4/18/2024
8.0.7 328 4/13/2024
8.0.6 128 4/13/2024
8.0.5 294 3/19/2024
8.0.4 823 2/22/2024
8.0.3 747 1/21/2024
8.0.2 1,614 1/4/2024
8.0.1 545 11/23/2023
8.0.0 609 11/15/2023
7.2.4 480 7/23/2023
7.2.3 179 7/20/2023
7.2.2 445 6/21/2023
7.2.1 520 4/29/2023
7.2.0 538 4/25/2023
7.1.3 1,266 4/13/2023
7.1.2 548 3/16/2023
7.1.1 856 2/27/2023
7.1.0 1,053 1/18/2023
7.0.5 1,029 12/22/2022
7.0.4 317 12/13/2022
7.0.3 682 12/5/2022
7.0.2 364 11/15/2022
7.0.1 377 11/12/2022
7.0.0 365 11/9/2022
6.1.8 1,038 10/12/2022
6.1.7 2,740 9/20/2022
6.1.6 1,635 9/15/2022
6.1.5 1,036 7/30/2022
6.1.4 1,098 6/30/2022
6.1.3 1,055 6/15/2022
6.1.2 1,098 6/7/2022
6.1.1 478 6/4/2022
6.1.0 449 6/4/2022
6.0.34 449 6/4/2022
6.0.33 2,171 5/28/2022
6.0.32 1,082 5/27/2022
6.0.31 453 5/27/2022
6.0.29 2,707 5/10/2022
6.0.28 1,088 5/5/2022
6.0.27 479 4/20/2022
6.0.26 460 4/20/2022
6.0.25 459 4/19/2022
6.0.23 470 4/11/2022
6.0.22 457 4/11/2022
6.0.20 472 4/10/2022
6.0.19 480 3/24/2022
6.0.18 470 2/17/2022
6.0.14 356 12/17/2021
6.0.13 287 12/14/2021
6.0.11 318 12/13/2021
6.0.8 337 12/13/2021
6.0.6 355 12/13/2021
6.0.4 393 12/13/2021
6.0.2 513 12/12/2021