Server.Data.BinaryData Class Reference

Saves a DataContainer in a set of binary files. More...

Inheritance diagram for Server.Data.BinaryData:

Inheritance graph
[legend]
Collaboration diagram for Server.Data.BinaryData:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BinaryData (string directory)
 Creates a new BinaryData object.
DataContainer LoadData ()
 Loads Data from binary files.
void SaveData (DataContainer data)
 Saves a DataContainer in a set of binary files using serialization.

Private Member Functions

void SerializeComment (Comment c, Comment parent, BinaryFormatter bf, Stream stream)
 Recursive function that saves a comment and all its child comments.

Private Attributes

string directory = ""

Detailed Description

Saves a DataContainer in a set of binary files.

Definition at line 14 of file BinaryData.cs.


Constructor & Destructor Documentation

Server.Data.BinaryData.BinaryData ( string  directory  ) 

Creates a new BinaryData object.

Parameters:
directory A path where the binary data files should be saved.

Definition at line 21 of file BinaryData.cs.


Member Function Documentation

DataContainer Server.Data.BinaryData.LoadData (  ) 

Loads Data from binary files.

Returns:
A DataContainer containing all previously saved data.

Implements Server.Data.IPersistentData.

Definition at line 33 of file BinaryData.cs.

References Shared.LiteratureInfo.creator, Shared.CommentInfo.date, Shared.ReviewInfo.date, Shared.SuggestionInfo.date, Shared.ReferenceInfo.date, Shared.TagInfo.ID, Server.UniquelyIdentifiable.ID, Shared.CommentInfo.id, Shared.LiteratureInfo.id, Shared.ProjectInfo.id, Shared.ReviewInfo.literature, Shared.SuggestionInfo.literature, Shared.ReferenceInfo.literature, Shared.TagInfo.Name, Shared.CommentInfo.parent, Shared.ReviewInfo.person, Shared.SuggestionInfo.person, Shared.CommentInfo.poster, Shared.CommentInfo.project, Shared.ReviewInfo.project, Shared.SuggestionInfo.project, Shared.ReferenceInfo.project, Shared.RoleInfo.Project, Shared.ReviewInfo.rating, Shared.SuggestionInfo.reason, Shared.ReviewInfo.status, Shared.SuggestionInfo.status, Shared.ReferenceInfo.status, Shared.CommentInfo.text, Shared.ReviewInfo.text, Shared.CommentInfo.title, Shared.ReviewInfo.title, Shared.CommentInfo.type, Shared.RoleInfo.Type, Shared.ReviewInfo.used, Shared.SuggestionInfo.used, Shared.ReferenceInfo.used, Shared.TagInfo.UserName, Shared.RoleInfo.UserName, and Shared.PersonInfo.username.

void Server.Data.BinaryData.SerializeComment ( Comment  c,
Comment  parent,
BinaryFormatter  bf,
Stream  stream 
) [private]

Recursive function that saves a comment and all its child comments.

Parameters:
c Comment to be saved.
parent Current comment's parent
bf A binaryformatter
stream The stream onto which the comment should be saved

Definition at line 194 of file BinaryData.cs.

References Server.Comment.Comments, Server.Comment.Date, Server.UniquelyIdentifiable.ID, Server.Comment.Poster, Server.Comment.Text, Server.Comment.Title, and Server.Person.UserName.

void Server.Data.BinaryData.SaveData ( DataContainer  data  ) 

Saves a DataContainer in a set of binary files using serialization.

Parameters:
data The DataContainer object to be saved.

Implements Server.Data.IPersistentData.

Definition at line 204 of file BinaryData.cs.

References Server.Data.DataContainer.LiteratureTable, Shared.PersonInfo.password, Server.Data.DataContainer.PersonTable, Server.Data.DataContainer.ProjectTable, and Server.Data.DataContainer.Tags.


The documentation for this class was generated from the following file:
Generated on Thu Dec 21 06:25:14 2006 for SCRAML by  doxygen 1.5.1-p1