Exemple #1
0
        public static void ToValueTcpType(TcpTypeByte tcpType, uint value)
        {
            if (tcpType == null)
            {
                throw new ArgumentNullException(nameof(tcpType));
            }

            tcpType.Value = Convert.ToByte(value);
        }
Exemple #2
0
 protected override void UpdateEnumContentValue(TcpTypeByte enumContent, TEnum value)
 {
     enumContent.Value = Convert.ToByte(value);
 }
Exemple #3
0
 public static int ToInt32(TcpTypeByte value)
 {
     return(value == null ? _DefaultInt32Value : Convert.ToInt32(value.Value));
 }
Exemple #4
0
 public static ushort ToUInt16(TcpTypeByte value)
 {
     return(value == null ? _DefaultUInt16Value : Convert.ToUInt16(value.Value));
 }
Exemple #5
0
 public static byte ToByte(TcpTypeByte value)
 {
     return(value == null ? _DefaultByteValue : Convert.ToByte(value.Value));
 }
Exemple #6
0
 public static bool ToBoolean(TcpTypeByte value)
 {
     return(value == null ? _DefaultBooleanValue : Convert.ToBoolean(value.Value));
 }