public NotificationEventOperations(IMainGenericDb <NotificationEvent> repo, IExistElement existElement, IAgroSearch search, ICommonQueries commonQueries, IEmail email, IUploadImage uploadImage, IWeatherApi weather, ICommonDbOperations <NotificationEvent> commonDb, IValidator validators) : base(repo, existElement, search, commonDb, validators)
 {
     this.commonQueries = commonQueries;
     this.email         = email;
     this.uploadImage   = uploadImage;
     this.weather       = weather;
 }
 public NotificationEventOperations(IMainGenericDb <NotificationEvent> repo, IAgroSearch <T> search, ICommonAgroQueries commonQueries, IEmail email, IUploadImage uploadImage, IWeatherApi weather, ICommonDbOperations <NotificationEvent> commonDb, IValidatorAttributes <NotificationEventInput> validator) : base(repo, search, commonDb, validator)
 {
     this.commonQueries = commonQueries;
     this.email         = email;
     this.uploadImage   = uploadImage;
     this.weather       = weather;
 }
예제 #3
0
 public ProductsApiController(ApplicationDbContext context, IHostingEnvironment hostingEnvironment, IUploadImage uploadImage, IProducts productsRepository)
 {
     _context                 = context;
     _uploadImage             = uploadImage;
     this._hostingEnvironment = hostingEnvironment;
     _productsRepository      = productsRepository;
 }
        public async Task <UploadViewModel> UploadImageAsync(HttpPostedFileBase imageFile, CloudBlobContainer imagesBlobContainer = null, UploadCDNEnum type = UploadCDNEnum.CDNWiksy)
        {
            if (type == UploadCDNEnum.Blob)
            {
                uploadImageBlob = new UploadImageBlob()
                {
                    ImageFile           = imageFile,
                    ImagesBlobContainer = imagesBlobContainer
                };
                var result = await uploadImageBlob.Upload();

                return(result);
            }
            else if (type == UploadCDNEnum.CDNWiksy)
            {
                uploadImageWiskyCDN = new UploadImageWiskyCDN
                {
                    ImageFile = imageFile
                };
                var result = await uploadImageWiskyCDN.Upload();

                return(result);
            }
            return(new UploadViewModel {
                ImageUrl = "nothing"
            });
        }
예제 #5
0
 public ProductsController(IMediator mediator, IUploadImage uploadImage, IAddProduct addProduct, IPutProduct putProduct, IDeleteProduct deleteProduct)
 {
     _addProduct    = addProduct;
     _deleteProduct = deleteProduct;
     _putProduct    = putProduct;
     _uploadImage   = uploadImage;
     _mediator      = mediator;
 }
예제 #6
0
 public FileController(
     IConfiguration Configuration, IHostingEnvironment env
     , IFileUploadService fileUploadService, IUploadImage upload
     ) : base(Configuration, env)
 {
     this._Env              = env;
     this._upload           = upload;
     this.fileUploadService = fileUploadService;
 }
예제 #7
0
 public AgroManager(AgroDbArguments arguments, IEmail email, IUploadImage uploadImage, IWeatherApi weatherApi, IAgroSearch searchServiceInstance, string ObjectIdAAD, bool _isBatch)
 {
     Arguments              = arguments;
     _email                 = email;
     _uploadImage           = uploadImage;
     _weatherApi            = weatherApi;
     _searchServiceInstance = searchServiceInstance;
     UserId                 = CommonQueries.GetUserIdFromAAD(ObjectIdAAD).Result;
     isBatch                = _isBatch;
 }
예제 #8
0
 public ShopsApiController(ApplicationDbContext context, IHostingEnvironment hostingEnvironment,
                           IConfiguration configuration, IHubContext <SignalServer> contextSignal,
                           ITokenBuilder tokenBuilder, IShops shopsRepository, IUploadImage uploadImage)
 {
     _context                 = context;
     _tokenBuilder            = tokenBuilder;
     this._hostingEnvironment = hostingEnvironment;
     _contextSignal           = contextSignal;
     connectionString         = ConfigurationExtensions.GetConnectionString(configuration, "DefaultConnection");
     _shopsRepository         = shopsRepository;
     _uploadImage             = uploadImage;
 }
예제 #9
0
 public AgroManager(IDbAgroConnect dbConnect, IEmail email, IUploadImage uploadImage, IWeatherApi weatherApi, IAgroSearch <T> searchServiceInstance, string ObjectIdAAD)
 {
     this.dbConnect = dbConnect;
     _email         = email;
     _uploadImage   = uploadImage;
     _weatherApi    = weatherApi;
     Search         = searchServiceInstance;
     if (!string.IsNullOrWhiteSpace(ObjectIdAAD))
     {
         UserId = CommonQueries.GetUserIdFromAAD(ObjectIdAAD).Result;
     }
 }
예제 #10
0
 static UploadImageHelper()
 {
     upLoadBase = UploadImageHelperFactory.ExecuteUploadImageHelper();
 }