1
0
mirror of synced 2024-11-05 11:09:17 +00:00
Tapeti/Tapeti.DataAnnotations/DataAnnotationsExtension.cs

27 lines
692 B
C#
Raw Normal View History

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