public static PostInteraction_Database Parse(string text) { List <PostInteraction> result = (new TextConverter()).ParsePostInteractions(text); PostInteraction_Database db = new PostInteraction_Database(); db.AddPosts(result); return(db); }
private void loadPostDatabase() { string text = this.fileIo.ReadAllText(this.postDatabase_filePath); if (text != null && text != "") { this.postDatabase = PostInteraction_Database.Parse(text); } }
public string ConvertToString(PostInteraction_Database postDatabase) { StringBuilder result = new StringBuilder(); foreach (PostInteraction post in postDatabase.GetPosts()) { result.Append(this.ConvertToString(post)); } return(result.ToString()); }