public static Promoter PromoterCreator(ePromoterType i_PromoterOptionChoosed, User i_UserToPromote) { Promoter createdPromoter; switch (i_PromoterOptionChoosed) { case ePromoterType.Photo: createdPromoter = new PhotoPromoter(i_UserToPromote, (postedItem) => postedItem.Comments.Count); break; case ePromoterType.Status: createdPromoter = new PostPromoter(i_UserToPromote, (postedItem) => postedItem.Comments.Count); break; default: createdPromoter = null; break; } return(createdPromoter); }
public StatusPoster(User i_NewLoggedUser, string i_StatusText) : base(i_NewLoggedUser) { StatusText = i_StatusText; LikesPromoter = new PostPromoter(i_NewLoggedUser, (postedItem) => postedItem.Comments.Count); }