public override void Read(OsiReader reader) { base.Read(reader); Calls = reader.ReadList<Call>(); Variables = new List<Variable>(); var variables = reader.ReadByte(); while (variables-- > 0) { var type = reader.ReadByte(); if (type != 1) throw new InvalidDataException("Illegal value type in rule variable list"); var variable = new Variable(); variable.Read(reader); if (variable.Adapted) { variable.VariableName = String.Format("_Var{0}", Variables.Count + 1); } Variables.Add(variable); } Line = reader.ReadUInt32(); if (reader.MajorVersion > 1 || (reader.MajorVersion == 1 && reader.MinorVersion >= 6)) IsQuery = reader.ReadBoolean(); else IsQuery = false; }
public override void Read(OsiReader reader) { base.Read(reader); Calls = reader.ReadList <Call>(); Variables = new List <Variable>(); var variables = reader.ReadByte(); while (variables-- > 0) { var type = reader.ReadByte(); if (type != 1) { throw new InvalidDataException("Illegal value type in rule variable list"); } var variable = new Variable(); variable.Read(reader); if (variable.Adapted) { variable.VariableName = String.Format("_Var{0}", Variables.Count + 1); } Variables.Add(variable); } Line = reader.ReadUInt32(); if (reader.Ver >= OsiVersion.VerAddQuery) { IsQuery = reader.ReadBoolean(); } else { IsQuery = false; } }