protected internal override VariableValue Read_(BinaryReader reader, List <Object> objects, short version) { var count = reader.ReadInt32(); var list = new VariableList(); for (var i = 0; i < count; i++) { var item = ReadValue(reader, objects, version); list.AddVariable(item); } return(VariableValue.Create(list)); }
public void LoadFrom(VariableList variables, string availability) { foreach (Variable fromVariable in variables._variables) { var index = _schema != null?_schema.GetIndex(fromVariable.Name) : -1; if (index >= 0) { if (availability == null || _schema[index].Availability == availability) { SetValue(index, fromVariable.Value); } } } }
public void SaveTo(VariableList variables, string availability) { foreach (Variable fromVariable in _variables) { var index = _schema != null?_schema.GetIndex(fromVariable.Name) : -1; if (index >= 0) { if (availability == null || _schema[index].Availability == availability) { variables._variables.Add(fromVariable); } } } variables._version = _version; }