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

            tcpType.Value = Convert.ToUInt32(value);
        }
 protected override void UpdateEnumContentValue(TcpTypeDWord enumContent, TEnum value)
 {
     enumContent.Value = Convert.ToUInt16(value);
 }
Example #3
0
 public static ushort ToUInt16(TcpTypeDWord value)
 {
     return(value == null ? _DefaultUInt16Value : Convert.ToUInt16(value.Value));
 }
Example #4
0
 public static byte ToByte(TcpTypeDWord value)
 {
     return(value == null ? _DefaultByteValue : Convert.ToByte(value.Value));
 }
Example #5
0
 public static bool ToBoolean(TcpTypeDWord value)
 {
     return(value == null ? _DefaultBooleanValue : Convert.ToBoolean(value.Value));
 }
Example #6
0
 public static uint ToUInt32(TcpTypeDWord value)
 {
     return(value == null ? _DefaultUInt32Value : Convert.ToUInt32(value.Value));
 }