Пример #1
0
 public bool NotifyFollowers(User userToFollow)
 {
     bool result = true;
     Notification notification = new Notification();
     foreach (User follower in Followers)
     {
         // code for notifying followers of new activity
         result = notification.NotifyUser(this, this.UserName + " is now following " + userToFollow.UserName);
         if (!result)
         {
             break;
         }
     }
     return result;
 }
Пример #2
0
 public bool FollowerAdded(User newFollower)
 {
     // code for notifying user that they have an added follower
     Notification notification = new Notification();
     return notification.NotifyUser(this, newFollower.UserName + " is now following you!");
 }