Example #1
0
 public void Unfollow(ChirperId chirper)
 {
     Apply(new ChirperUnfollowed(Id)
     {
         Chirper = chirper
     });
 }
Example #2
0
 void Process(ChirperId chirperId, FollowerId followerId, Action<MyFollows, Chirper> updateMyFollows, Action<MyFollowers, Follower> updateMyFollowers)
 {
     var chirper = _chirperRepository.GetById(chirperId);
     var follower = _followerRepository.GetById(followerId);
     UpdateMyFollowers(chirper, follower, updateMyFollowers);
     UpdateMyFollows(follower, chirper, updateMyFollows);
 }
Example #3
0
 public OrderedStream GetMyChirpsFor(ChirperId chirper)
 {
     return new OrderedStream(_chirpView.Query.Where(c => c.ChirpedBy.ChirperId == chirper).AsEnumerable());
 }
Example #4
0
 public MyFollowers(ChirperId chirper) : this()
 {
     ChirperId = chirper;
 }
Example #5
0
 public void RemoveFollow(ChirperId follow)
 {
     if (_following.Contains(follow))
         _following.Remove(follow);
 }
Example #6
0
 public void AddFollow(ChirperId follow)
 {
     if (!_following.Contains(follow))
         _following.Add(follow);
 }
Example #7
0
 public static Chirper Get(ChirperId id)
 {
     return GetAll().SingleOrDefault(c => c.ChirperId == id);
 }
Example #8
0
 public ChirpersFollowers(ChirperId chirper) : this()
 {
     Chirper = chirper;
 }
Example #9
0
 bool ChirperExists(ChirperId chirper)
 {
     var funcs = Kernel.Get<Read.Domain.Chirping.ChirperFuncs>();
     return funcs.ChirperExists().Invoke(chirper);
 }
Example #10
0
 bool ChirpIsNotADuplicate(ChirperId chirper, ChirpId chirp)
 {
     var funcs = Kernel.Get<Read.Domain.Chirping.ChirpingFuncs>();
     return funcs.ChirpIsNotADuplicate().Invoke(chirper, chirp);
 }
Example #11
0
 bool ChirpHasBeenChirpedByChirper(ChirperId chirper, ChirpId chirp)
 {
     var funcs = Kernel.Get<Read.Domain.Chirping.ChirpingFuncs>();
     return funcs.ChirpHasBeenChirpedByChirper().Invoke(chirper, chirp);
 }