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);
        }
Пример #2
0
 public PhotoPoster(User i_NewLoggedUser, string i_PhotoPath) : base(i_NewLoggedUser)
 {
     PhotoPath = i_PhotoPath;
     LikesPromoter = new PhotoPromoter(i_NewLoggedUser, (postedItem) => postedItem.Comments.Count);
 }