-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored validation configuration. (#14)
- Loading branch information
Showing
9 changed files
with
56 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/Fluxera.Extensions.Validation.Abstractions/IValidationBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
namespace Fluxera.Extensions.Validation | ||
{ | ||
using JetBrains.Annotations; | ||
using Microsoft.Extensions.DependencyInjection; | ||
|
||
[PublicAPI] | ||
public interface IValidationBuilder | ||
{ | ||
IValidationBuilder AddValidatorFactory<T>() where T : class, IValidatorFactory; | ||
|
||
IValidationBuilder AddValidatorFactoryNamed<T>(string name) where T : class, IValidatorFactory; | ||
|
||
IServiceCollection Services { get; } | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/Fluxera.Extensions.Validation.Abstractions/IValidator.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace Fluxera.Extensions.Validation | ||
{ | ||
using System.Threading.Tasks; | ||
using JetBrains.Annotations; | ||
|
||
/// <summary> | ||
/// A contract for validators. The underlying validation frameworks must implement this. | ||
/// </summary> | ||
[PublicAPI] | ||
public interface IValidator | ||
{ | ||
Task<ValidationResult> ValidateAsync(object instance); | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters