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; }
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; }
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; }