forked from LEGO/AsyncAPI.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDisplayAttribute.cs
More file actions
29 lines (25 loc) · 827 Bytes
/
Copy pathDisplayAttribute.cs
File metadata and controls
29 lines (25 loc) · 827 Bytes
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
// Copyright (c) The LEGO Group. All rights reserved.
namespace LEGO.AsyncAPI.Attributes
{
using System;
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
public class DisplayAttribute : Attribute
{
/// <summary>
/// Initializes a new instance of the <see cref="DisplayAttribute"/> class.
/// </summary>
/// <param name="name">The display name.</param>
public DisplayAttribute(string name)
{
if (string.IsNullOrWhiteSpace(name))
{
throw new ArgumentException($"'{nameof(name)}' cannot be null or whitespace.", nameof(name));
}
this.Name = name;
}
/// <summary>
/// The display Name.
/// </summary>
public string Name { get; }
}
}