public static MODBUSMaster_DiscreteInputRegisterArray Empty() { var discreteInputRegisterArray = new MODBUSMaster_DiscreteInputRegisterArray() { discreteInputRegisters = new List <MODBUSMaster_DiscreteInputRegister>() }; return(discreteInputRegisterArray); }
public static MODBUSMaster_DiscreteInputRegisterArray Parse(SqlString stringToParse) { if (stringToParse.IsNull) { return(Null); } var parsedDiscreteInputRegisterArray = new MODBUSMaster_DiscreteInputRegisterArray() { discreteInputRegisters = new List <MODBUSMaster_DiscreteInputRegister>() }; var parsedString = stringToParse.Value.Split("|".ToCharArray()); for (var i = 0; parsedString.Length > i; i++) { parsedDiscreteInputRegisterArray.DiscreteInputRegisters.Add(MODBUSMaster_DiscreteInputRegister.Parse(parsedString[i])); } return(parsedDiscreteInputRegisterArray); }