AdaskoTheBeAsT.FluentValidation.SimpleInjector alternatives and similar packages
Based on the "IoC" category.
Alternatively, view AdaskoTheBeAsT.FluentValidation.SimpleInjector alternatives based on common mentions on social networks and blogs.
-
Castle Windsor
Castle Windsor is a best of breed, mature Inversion of Control container available for .NET -
Microsoft.Extensions.DependencyInjection
7.3 0.0 L5 AdaskoTheBeAsT.FluentValidation.SimpleInjector VS Microsoft.Extensions.DependencyInjectionDISCONTINUED. The default IoC container for ASP.NET Core applications. -
Simple Injector
An easy, flexible, and fast Dependency Injection library that promotes best practice to steer developers towards the pit of success. -
TinyIoC
An easy to use, hassle free, Inversion of Control Container for small projects, libraries and beginners alike. -
DryIoc is fast, small, full-featured IoC Container for .NET
DryIoc is fast, small, full-featured IoC Container for .NET -
Simplify.DI
Simplify is an open-source set of lightweight .NET libraries that provide infrastructure for your applications. DI and mocking friendly.
InfluxDB - Purpose built for real-time analytics at any scale.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of AdaskoTheBeAsT.FluentValidation.SimpleInjector or a related project?
README
AdaskoTheBeAsT.FluentValidation.SimpleInjector
FluentValidation extensions to SimpleInjector
Badges
Usage
This library scans assemblies and adds implementations of IValidator<>
to the SimpleInjector container.
There are few options to use with Container
instance:
- Marker type from assembly which will be scanned
container.AddFluentValidation(typeof(MyValidator), type2 /*, ...*/);
- List of assemblies which will be scanned.
Below is sample for scanning assemblies from some solution.
```cs
[ExcludeFromCodeCoverage]
public static class FluentValidationConfigurator
{
private const string NamespacePrefix = "YourNamespace";
public static void Configure(Container container)
{
var loadedAssemblies = AppDomain.CurrentDomain.GetAssemblies().ToList();
var assemblies = new List<Assembly>();
var mainAssembly = typeof(FluentValidationConfigurator).Assembly;
var refAssemblies = mainAssembly.GetReferencedAssemblies();
foreach (var assemblyName in refAssemblies
.Where(a => a.FullName.StartsWith(NamespacePrefix, StringComparison.OrdinalIgnoreCase)))
{
var assembly = loadedAssemblies.Find(l => l.FullName == assemblyName.FullName)
?? AppDomain.CurrentDomain.Load(assemblyName);
assemblies.Add(assembly);
}
container.AddFluentValidation(assemblies);
}
}
1. Special configuration action with different lifetime for validators
```cs
container.AddFluentValidation(
cfg =>
{
cfg.WithAssembliesToScan(assemblies);
cfg.AsScoped();
});