BinaryFileaccess Class

public class BinaryFileaccess
Namespace: yaTDL.Classes
Inherits from: Fileaccess

Provides the possibility to save and read a collection of projects to/from a binary file.
The resulting file contains a serialized Collection<Project>

As this class serializes a collections of projects and every Project contains a collections of Tasks it is difficult to make changes to Task Class or Project Class as this will break this class when the a file that was created with an older version of yaTDL is read.

Members

Public Members
public override string defaultFileName Returns the default filename, which is TaskStore.dat in the default directory.(Implements a abstract method inherited from Fileaccess)
public override void SaveProjects(Collection<Project> projects) Serializes the Collection<Project> at saves it to the the default location.(Implements a abstract method inherited from Fileaccess)
public override void SaveProjects(Collection<Project> projects, string fileName) Serializes the Collection<Project> at saves it to the file indicated in filename.(Implements a abstract method inherited from Fileaccess)
public override Collection<Project> OpenProjects() Deserializes a binary file at the default location to a Collection<Project> (Implements a abstract method inherited from Fileaccess)
public override Collection<Project> OpenProjects(string fileName) Deserializes a binary file at the indicated location to a Collection<Project> (Implements a abstract method inherited from Fileaccess)
public string defaultDirectory Inherited from Fileaccess


Protected Members
protected void backupTaskStore(string fileName) Inherited from Fileaccess
protected string getDirectory(string fileName) Inherited from Fileaccess
protected string getFileExtension(string fileName) Inherited from Fileaccess


Private Members
private BinaryFormatter formatter A BinaryFormatter used to serialize and deserialize a Collection<Project>

Last edited Aug 24, 2009 at 4:13 PM by apoll0, version 4

Comments

No comments yet.