예제 #1
0
        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);
        }
예제 #2
0
 /// <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();