Example #1
0
 public virtual void Delete()
 {
     Status = ItemStatus.Delete();
     _votes.Clear();
     DocumentDownloads.Clear();
     AddEvent(new DocumentDeletedEvent(this));
 }
Example #2
0
 public virtual void Flag(string messageFlagReason, User user)
 {
     if (User == user)
     {
         throw new UnauthorizedAccessException("you cannot flag your own question");
     }
     Status = Status.Flag(messageFlagReason, user);
 }
Example #3
0
 public virtual void UnFlag()
 {
     if (Status.State != ItemState.Flagged)
     {
         return;
     }
     Status = Public;
 }
Example #4
0
 public virtual void Delete()
 {
     //_votes.Clear();
     Status = ItemStatus.Delete();
 }
Example #5
0
 public virtual void Delete()
 {
     Status = ItemStatus.Delete();
     _answers.Clear();
 }