src/openSourceC.DotNetLibrary.Core/Extensions/AttributeExtensions.cs
/// <summary>
///		Gets value of the <see cref="T:ActionNameAttribute"/> for the specified enumerator
///		member.
/// </summary>
/// <param name="enumerator">The enumerator value.</param>
/// <returns>
///		The value of the <see cref="T:ActionNameAttribute"/> for the specified enumerator
///		member if it exists; otherwise, the member name.
/// </returns>
Gets value of the  for the specified enumerator
member.
Gets value of the for the specified enumerator member .
public static string GetActionName(this Enum enumerator)
		{
			return (
				enumerator.GetType().GetField(enumerator.ToString())?.GetCustomAttributes(typeof(ActionNameAttribute), true).SingleOrDefault() is ActionNameAttribute attribute
				? attribute.ActionName
				: enumerator.ToString()
			);
		}
public static string GetActionName ( this Enum enumerator ) { return ( enumerator . GetType ( ) . GetField ( enumerator . ToString ( ) ) ? . GetCustomAttributes ( typeof ( ActionNameAttribute ) , true ) . SingleOrDefault ( ) is ActionNameAttribute attribute ? attribute . ActionName : enumerator . ToString ( ) ) ; }
Gets value of the  for the specified enumerator
member.
Gets value of the for the specified enumerator member .
The value of the  for the specified enumerator
member if it exists; otherwise, the member name.
The value of the for the specified enumerator member if it exists ; otherwise the member name .
Enum
this
enumerator
The enumerator value.
The enumerator value .