コード例 #1
0
        public MultimediaService(
            IModelDbFactory modelDbFactory,
            ISanitizer sanitizer,
            IAutoMapperService mapper,
            IEfDbContextSaveChanges context,
            IPhotoArtSystemEfDbRepository <Multimedia> multimedia)
        {
            Guard.WhenArgument(
                modelDbFactory,
                GlobalConstants.ModelDbFactoryRequiredExceptionMessage).IsNull().Throw();
            Guard.WhenArgument(
                sanitizer,
                GlobalConstants.SanitizerRequiredExceptionMessage).IsNull().Throw();
            Guard.WhenArgument(
                mapper,
                GlobalConstants.AutoMapperServiceRequiredExceptionMessage).IsNull().Throw();
            Guard.WhenArgument(
                context,
                GlobalConstants.EfDbContextRequiredExceptionMessage).IsNull().Throw();
            Guard.WhenArgument(
                multimedia,
                GlobalConstants.MultimediaEfDbRepositoryRequiredExceptionMessage).IsNull().Throw();

            this.modelDbFactory = modelDbFactory;
            this.sanitizer      = sanitizer;
            this.mapper         = mapper;
            this.context        = context;
            this.multimedia     = multimedia;
        }
コード例 #2
0
        public ImageService(
            IModelDbFactory modelDbFactory,
            IAutoMapperService mapper,
            IEfDbContextSaveChanges context,
            IPhotoArtSystemEfDbRepository <Image> images,
            IImageCloudStorage storage)
        {
            Guard.WhenArgument(
                modelDbFactory,
                GlobalConstants.ModelDbFactoryRequiredExceptionMessage).IsNull().Throw();
            Guard.WhenArgument(
                mapper,
                GlobalConstants.AutoMapperServiceRequiredExceptionMessage).IsNull().Throw();
            Guard.WhenArgument(
                context,
                GlobalConstants.EfDbContextRequiredExceptionMessage).IsNull().Throw();
            Guard.WhenArgument(
                images,
                GlobalConstants.ImageEfDbRepositoryRequiredExceptionMessage).IsNull().Throw();
            Guard.WhenArgument(
                storage,
                GlobalConstants.CloudStorageRequiredExceptionMessage).IsNull().Throw();

            this.modelDbFactory = modelDbFactory;
            this.mapper         = mapper;
            this.context        = context;
            this.images         = images;
            this.storage        = storage;
        }
コード例 #3
0
        public PhotocourseService(
            IModelDbFactory modelDbFactory,
            ISanitizer sanitizer,
            IAutoMapperService mapper,
            IEfDbContextSaveChanges context,
            IPhotoArtSystemEfDbRepository <Photocourse> photocourses)
        {
            Guard.WhenArgument(
                modelDbFactory,
                GlobalConstants.ModelDbFactoryRequiredExceptionMessage).IsNull().Throw();
            Guard.WhenArgument(
                sanitizer,
                GlobalConstants.SanitizerRequiredExceptionMessage).IsNull().Throw();
            Guard.WhenArgument(
                mapper,
                GlobalConstants.AutoMapperServiceRequiredExceptionMessage).IsNull().Throw();
            Guard.WhenArgument(
                context,
                GlobalConstants.EfDbContextRequiredExceptionMessage).IsNull().Throw();
            Guard.WhenArgument(
                photocourses,
                GlobalConstants.PhotocourseEfDbRepositoryRequiredExceptionMessage).IsNull().Throw();

            this.modelDbFactory = modelDbFactory;
            this.sanitizer      = sanitizer;
            this.mapper         = mapper;
            this.context        = context;
            this.photocourses   = photocourses;
        }
コード例 #4
0
        public ApplicationUserProfileService(IAutoMapperService mapper, IPhotoArtSystemEfDbRepository <ApplicationUser> users)
        {
            Guard.WhenArgument(
                mapper,
                GlobalConstants.AutoMapperServiceRequiredExceptionMessage).IsNull().Throw();
            Guard.WhenArgument(
                users,
                GlobalConstants.ApplicationUserEfDbRepositoryRequiredExceptionMessage).IsNull().Throw();

            this.mapper = mapper;
            this.users  = users;
        }
コード例 #5
0
        public StudentService(IAutoMapperService mapper, IEfDbContextSaveChanges context, IPhotoArtSystemEfDbRepository <Student> students)
        {
            Guard.WhenArgument(
                mapper,
                GlobalConstants.AutoMapperServiceRequiredExceptionMessage).IsNull().Throw();
            Guard.WhenArgument(
                context,
                GlobalConstants.EfDbContextRequiredExceptionMessage).IsNull().Throw();
            Guard.WhenArgument(
                students,
                GlobalConstants.StudentEfDbRepositoryRequiredExceptionMessage).IsNull().Throw();

            this.mapper   = mapper;
            this.context  = context;
            this.students = students;
        }
コード例 #6
0
        public InformationService(
            IAutoMapperService mapper,
            IEfDbContextSaveChanges context,
            IPhotoArtSystemEfDbRepository <Information> information)
        {
            Guard.WhenArgument(
                mapper,
                GlobalConstants.AutoMapperServiceRequiredExceptionMessage).IsNull().Throw();
            Guard.WhenArgument(
                context,
                GlobalConstants.EfDbContextRequiredExceptionMessage).IsNull().Throw();
            Guard.WhenArgument(
                information,
                GlobalConstants.InformationEfDbRepositoryRequiredExceptionMessage).IsNull().Throw();

            this.mapper      = mapper;
            this.context     = context;
            this.information = information;
        }