public void Read() { HasRead = true; if (Debug) { _Groups = SerialXMLReadWrite <List <Group> > .Read(_DebugFileName); for (int i = 0; i < _Groups.Count; i++) { _Groups[i].Reinit(); } } else { _Groups = SerialBinaryReadWrite <List <Group> > .Read(_FileName); for (int i = 0; i < _Groups.Count; i++) { _Groups[i].Reinit(); } } for (int i = 0; i < _Groups.Count; i++) { _Groups[i].OnStatusChanged += Group_OnStatusChanged; } if (OnRead != null) { OnRead(); } }
public void Write() { if (Debug) { SerialXMLReadWrite <List <Group> > .Write(_Groups, _DebugFileName); } else { SerialBinaryReadWrite <List <Group> > .Write(_Groups, _FileName); } }
public void Write(string fileName) { if (Debug) { SerialXMLReadWrite <List <Manifest> > .Write(_Metadata, fileName); } else { SerialBinaryReadWrite <List <Manifest> > .Write(_Metadata, fileName); } }
public void Read(string fileName) { if (Debug) { _Metadata = SerialXMLReadWrite <List <Manifest> > .Read(fileName); } else { _Metadata = SerialBinaryReadWrite <List <Manifest> > .Read(fileName);// new List<DownloadManifest>(); } }