public async Task<List<Comment>> LoadAllComments()
 {
     List<Comment> comments = new List<Comment>();
     Comment comment = new Comment();
     while((comment = await _factory.Read<Comment>("Comment-" + (brojac++) + ".xml")) != null)
     {
         comments.Add(comment);
     }
     return comments;
 }
Example #2
0
 public void WriteComment()
 {
     Comment com = new Comment()
     {
         Content = _commentContent,
         Name = _commentName,
         Id = 2561,
         NewsId = MainViewModel.Instance.CurrentNews.Id,
         PublishDate = DateTime.Now
     };
     Comments.Add(com);
     _commentFactory.WriteComment(com);
 }
 public async void WriteComment(Comment comment)
 {
     await _factory.Write(comment);
 }