Show / Hide Table of Contents

Class TagAttributeExtensions

Extension methods for reflection types and TagAttribute.

Inheritance
System.Object
TagAttributeExtensions
Namespace: Towel
Assembly: Towel.dll
Syntax
public static class TagAttributeExtensions : object

Methods

| Improve this Doc View Source

GetTag(MemberInfo, Nullable<Object>)

Gets a TagAttribute on a .

Declaration
public static (bool Found, object? Value) GetTag(this MemberInfo memberInfo, object? tag)
Parameters
Type Name Description
MemberInfo memberInfo

The type to get the TagAttribute of.

System.Nullable<System.Object> tag

The tag to get the value of.

Returns
Type Description
System.ValueTuple<System.Boolean, System.Nullable<System.Object>>
  • Found: True if the tag was found; False if not or if multiple tags were found (ambiguous).
  • Value: The value if found or default if not.
| Improve this Doc View Source

GetTag(ParameterInfo, Nullable<Object>)

Gets a TagAttribute on a .

Declaration
public static (bool Found, object? Value) GetTag(this ParameterInfo parameterInfo, object? tag)
Parameters
Type Name Description
ParameterInfo parameterInfo

The type to get the TagAttribute of.

System.Nullable<System.Object> tag

The tag to get the value of.

Returns
Type Description
System.ValueTuple<System.Boolean, System.Nullable<System.Object>>
  • Found: True if the tag was found; False if not or if multiple tags were found (ambiguous).
  • Value: The value if found or default if not.
| Improve this Doc View Source

GetTag<TEnum>(TEnum, Nullable<Object>)

Gets a TagAttribute on a .

Declaration
public static (bool Found, object? Value) GetTag<TEnum>(this TEnum enumValue, object? tag)
    where TEnum : Enum
Parameters
Type Name Description
TEnum enumValue

The type of enum field to get the TagAttribute of.

System.Nullable<System.Object> tag

The tag to get the value of.

Returns
Type Description
System.ValueTuple<System.Boolean, System.Nullable<System.Object>>
  • Found: True if the tag was found; False if not or if multiple tags were found (ambiguous).
  • Value: The value if found or default if not.
Type Parameters
Name Description
TEnum

The type of enum to get the atributes on its fields.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX