narsil/Tanshu.Accounts.Contracts/DisplayAttribute.cs

26 lines
763 B
C#
Raw Normal View History

using System;
namespace Tanshu.Accounts.Contracts
{
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
public class DisplayAttribute : Attribute
{
public DisplayAttribute(string name, bool showInChoices, int group)
{
Name = name;
ShowInChoices = showInChoices;
Group = group;
}
public DisplayAttribute(string name, bool showInChoices, int group, bool print)
: this(name, showInChoices, group)
{
Print = print;
}
public string Name { get; private set; }
public int Group { get; private set; }
public bool ShowInChoices { get; private set; }
public bool Print { get; private set; }
}
}