コード例 #1
0
 /// <summary>
 /// Gets the association indication status value.
 /// </summary>
 /// <param name="source"></param>
 /// <returns>The association indication status value.</returns>
 public static byte GetValue(this AssociationIndicationStatus source)
 {
     return((byte)source);
 }
コード例 #2
0
        public static string ToDisplayString(this AssociationIndicationStatus source)
        {
            var data = lookupTable[source];

            return(string.Format("{0}: {1}", HexUtils.ByteToHexString((byte)source), data));
        }
コード例 #3
0
 /// <summary>
 /// Gets the association indication status description.
 /// </summary>
 /// <param name="source"></param>
 /// <returns>The association indication status description.</returns>
 public static string GetDescription(this AssociationIndicationStatus source)
 {
     return(lookupTable[source]);
 }
コード例 #4
0
 public static AssociationIndicationStatus Get(this AssociationIndicationStatus dumb, byte value)
 {
     //var values = Enum.GetValues(typeof(AssociationIndicationStatus));
     //if (values.OfType<byte>().Contains(value))
     return((AssociationIndicationStatus)value);
 }
コード例 #5
0
 /// <summary>
 /// Gets the <see cref="AssociationIndicationStatus"/> associated with the specified
 /// <paramref name="value"/>.
 /// </summary>
 /// <param name="source"></param>
 /// <param name="value">The value to retrieve the associated
 /// <see cref="AssociationIndicationStatus"/> for.</param>
 /// <returns>The <see cref="AssociationIndicationStatus"/> associated with the specified
 /// <paramref name="value"/>.</returns>
 public static AssociationIndicationStatus Get(this AssociationIndicationStatus source, byte value)
 {
     return((AssociationIndicationStatus)value);
 }