-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIAttributeConfiguration.cs
40 lines (35 loc) · 1.32 KB
/
IAttributeConfiguration.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
namespace NHail.ComponentModel.DataAnnotations.Fluent
{
public interface IAttributeConfiguration<TSource>
{
/// <summary>
/// Adds the attributes to the property
/// </summary>
/// <typeparam name="TProperty"></typeparam>
/// <param name="property"></param>
/// <param name="attributes"></param>
/// <returns></returns>
IAttributeConfiguration<TSource> AddPropertyAttributes<TProperty>(Expression<Func<TSource, TProperty>> property,
params Attribute[] attributes);
/// <summary>
/// Adds the attributes to the property
/// </summary>
/// <typeparam name="TProperty"></typeparam>
/// <param name="property"></param>
/// <param name="attributes"></param>
/// <returns></returns>
IAttributeConfiguration<TSource> AddPropertyAttributes(string propertyName, params Attribute[] attributes);
/// <summary>
/// Adds the attributes to the class
/// </summary>
/// <param name="attributes"></param>
/// <returns></returns>
IAttributeConfiguration<TSource> AddAttributes(params Attribute[] attributes);
}
}