src/openSourceC.DotNetLibrary.Core/Extensions/AttributeExtensions.cs
/// <summary>
///		Gets value of the <see cref="T:EnumMemberGuidAttribute"/> for the specified
///		enumerator member.
/// </summary>
/// <param name="enumerator">The enumerator value.</param>
/// <returns>
///		The value of the <see cref="T:EnumMemberGuidAttribute"/> for the specified
///		enumerator member if it exists; otherwise, null.
/// </returns>
Gets value of the  for the specified
enumerator member.
Gets value of the for the specified enumerator member .
public static Guid? GetEnumMemberGuid(this Enum enumerator)
		{
			return (
				enumerator.GetType().GetField(enumerator.ToString())?.GetCustomAttributes(typeof(EnumMemberGuidAttribute), true).SingleOrDefault() is EnumMemberGuidAttribute attribute
				? attribute.Value
				: (Guid?)null
			);
		}
public static Guid ? GetEnumMemberGuid ( this Enum enumerator ) { return ( enumerator . GetType ( ) . GetField ( enumerator . ToString ( ) ) ? . GetCustomAttributes ( typeof ( EnumMemberGuidAttribute ) , true ) . SingleOrDefault ( ) is EnumMemberGuidAttribute attribute ? attribute . Value : ( Guid ? ) null ) ; }
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, null.
The value of the for the specified enumerator member if it exists ; otherwise null .
Enum
this
enumerator
The enumerator value.
The enumerator value .