public static void ToValueTcpType(TcpTypeWord tcpType, uint value) { if (tcpType == null) { throw new ArgumentNullException(nameof(tcpType)); } tcpType.Value = Convert.ToUInt16(value); }
protected override void UpdateEnumContentValue(TcpTypeWord enumContent, TEnum value) { enumContent.Value = Convert.ToUInt16(value); }
public static ushort ToUInt16(TcpTypeWord value) { return(value == null ? _DefaultUInt16Value : Convert.ToUInt16(value.Value)); }
public static byte ToByte(TcpTypeWord value) { return(value == null ? _DefaultByteValue : Convert.ToByte(value.Value)); }
public static bool ToBoolean(TcpTypeWord value) { return(value == null ? _DefaultBooleanValue : Convert.ToBoolean(value.Value)); }
public static uint ToUInt32(TcpTypeWord value) { return(value == null ? _DefaultUInt32Value : Convert.ToUInt32(value.Value)); }