JD2022-TU1/main/tools/framework/JD.Serialization/Attributes/DisplayPropertyNameAttribute.cs

22 lines
595 B
C#

using System;
namespace JD.Serialization
{
/// <summary>
/// Sets a property name to the current object when displaying it as ToString().
/// </summary>
[AttributeUsage(AttributeTargets.All, Inherited = true)]
public class DisplayPropertyNameAttribute : System.Attribute
{
public DisplayPropertyNameAttribute(string propertyName)
{
PropertyName = propertyName;
}
/// <summary>
/// Specifices the name of the property name to display
/// </summary>
public string PropertyName { get; set; }
}
}