Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
NHail.ComponentModel.DataAnnotations.Fluent/IAttributeConfiguration.cs
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
40 lines (35 sloc)
1.32 KB
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
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); | |
} | |
} |