public static Type GetClassType(this DescriptorType value) { var fieldInfo = typeof(DescriptorType).GetField(value.ToString()); var attribute = (DescriptorClassAttribute)Attribute.GetCustomAttribute(fieldInfo, typeof(DescriptorClassAttribute)); return(attribute.Type); }
/// <summary> /// Returns a <see cref="T:System.String" /> that represents the current class. /// </summary> /// <returns> /// A <see cref="T:System.String" /> that represents the <see cref="DataBlockDescriptorData" /> current class. /// </returns> public override string ToString() => DescriptorType.ToString();