Пример #1
0
        public GalleryImageService(ITravelGuideContext context, IGalleryImageFactory imageFactory,
                                   IGalleryLikeFactory likeFactory, IGalleryCommentFactory commentFactory)
        {
            if (context == null)
            {
                throw new ArgumentNullException("Context cannot be null!");
            }

            if (imageFactory == null)
            {
                throw new ArgumentNullException("Image factory cannot be null!");
            }

            if (likeFactory == null)
            {
                throw new ArgumentNullException("Like factory cannot be null!");
            }

            if (commentFactory == null)
            {
                throw new ArgumentNullException("Comment factory cannot be null!");
            }

            this.context        = context;
            this.imageFactory   = imageFactory;
            this.likeFactory    = likeFactory;
            this.commentFactory = commentFactory;
        }
Пример #2
0
 public ExtendedGalleryImageService(ITravelGuideContext context, IGalleryImageFactory imageFactory,
                                    IGalleryLikeFactory likeFactory, IGalleryCommentFactory commentFactory)
     : base(context, imageFactory, likeFactory, commentFactory)
 {
 }