Added AssociateStringAttribute to associate a string with a code element.

pull/161/head
dahall 2020-07-17 15:28:21 -06:00
parent 44bcc6d163
commit ce2d837a5c
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
using System;
namespace Vanara.PInvoke
{
/// <summary>Associates a string with an element.</summary>
/// <seealso cref="Attribute"/>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Delegate | AttributeTargets.Enum | AttributeTargets.Event |
AttributeTargets.Field | AttributeTargets.Interface | AttributeTargets.Method |
AttributeTargets.Property | AttributeTargets.Struct, AllowMultiple = true, Inherited = false)]
public class AssociateStringAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="AssociateStringAttribute"/> class.</summary>
/// <param name="value">A string value.</param>
public AssociateStringAttribute(string value) => Value = value;
/// <summary>Gets or sets the GUID associated with this element.</summary>
/// <value>A GUID value.</value>
public string Value { get; }
}
}