Beispiel #1
0
 public static string ToDisplayString(this HardwareVersionEnum source)
 {
     return(string.Format("{0}: {1}", HexUtils.ByteToHexString((byte)source.GetValue()), source.GetDescription()));
 }
Beispiel #2
0
 /// <summary>
 /// Gets the hardware version description.
 /// </summary>
 /// <param name="source"></param>
 /// <returns>The hardware version description.</returns>
 public static string GetDescription(this HardwareVersionEnum source)
 {
     return(lookupTable[source]);
 }
Beispiel #3
0
 /// <summary>
 /// Gets the <see cref="HardwareVersionEnum"/> associated to the given numeric value.
 /// </summary>
 /// <param name="source"></param>
 /// <param name="value">Numeric value of the <see cref="HardwareVersionEnum"/> to retrieve.</param>
 /// <returns>The <see cref="HardwareVersionEnum"/> associated to the given numeric value.</returns>
 public static HardwareVersionEnum Get(this HardwareVersionEnum dumb, int value)
 {
     return((HardwareVersionEnum)value);
 }
Beispiel #4
0
 /// <summary>
 /// Gets the Hardware version numeric value.
 /// </summary>
 /// <param name="source"></param>
 /// <returns>The hardware version numeric value.</returns>
 public static int GetValue(this HardwareVersionEnum source)
 {
     return((int)source);
 }