-
-
Notifications
You must be signed in to change notification settings - Fork 114
/
Copy pathComponentAttribute.cs
33 lines (30 loc) · 1.05 KB
/
ComponentAttribute.cs
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
30
31
32
33
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace System.Device.Model
{
/// <summary>
/// Component attribute class referencing to an interface.
/// </summary>
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
public class ComponentAttribute : Attribute
{
/// <summary>
/// Gets name of the component.
/// </summary>
public string? Name { get; }
/// <summary>
/// Initializes a new instance of the <see cref="ComponentAttribute" /> class.
/// </summary>
/// <param name="name">Optional name of the component. If not provided property name will be used.</param>
public ComponentAttribute(string? name)
{
Name = name;
}
/// <summary>
/// Initializes a new instance of the <see cref="ComponentAttribute" /> class.
/// </summary>
public ComponentAttribute()
{
}
}
}