2017-02-12 20:43:30 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using Tapeti.Config;
|
|
|
|
|
|
|
|
|
|
namespace Tapeti.DataAnnotations
|
|
|
|
|
{
|
2019-08-14 10:20:53 +00:00
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Provides the DataAnnotations validation middleware.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class DataAnnotationsExtension : ITapetiExtension
|
2017-02-12 20:43:30 +00:00
|
|
|
|
{
|
2019-08-14 10:20:53 +00:00
|
|
|
|
/// <inheritdoc />
|
2017-02-12 20:43:30 +00:00
|
|
|
|
public void RegisterDefaults(IDependencyContainer container)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2019-08-14 10:20:53 +00:00
|
|
|
|
/// <inheritdoc />
|
2017-02-12 20:43:30 +00:00
|
|
|
|
public IEnumerable<object> GetMiddleware(IDependencyResolver dependencyResolver)
|
|
|
|
|
{
|
|
|
|
|
return new object[]
|
|
|
|
|
{
|
|
|
|
|
new DataAnnotationsMessageMiddleware(),
|
|
|
|
|
new DataAnnotationsPublishMiddleware()
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|