// Copyright (c) The LEGO Group. All rights reserved.
namespace LEGO.AsyncAPI.Attributes
{
using System;
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
public class DisplayAttribute : Attribute
{
///
/// Initializes a new instance of the class.
///
/// The display name.
public DisplayAttribute(string name)
{
if (string.IsNullOrWhiteSpace(name))
{
throw new ArgumentException($"'{nameof(name)}' cannot be null or whitespace.", nameof(name));
}
this.Name = name;
}
///
/// The display Name.
///
public string Name { get; }
}
}