Ejemplo n.º 1
0
 public ProductCore(IMapper mapper, IUnitOfWork db, ICloudStorage cloudStorage)
 {
     _mapper       = mapper;
     _db           = db;
     _cloudStorage = cloudStorage;
     Seo           = new SeoCoreProduct(_mapper, _db);
 }
Ejemplo n.º 2
0
 public CampaignController(ApplicationDbContext context, UserManager <IdentityUser> userManager, ICloudStorage cloudStorage, ILogger <CampaignController> logger)
 {
     _context      = context;
     _userManager  = userManager;
     _cloudStorage = cloudStorage;
     _logger       = logger;
 }
Ejemplo n.º 3
0
 public BasicSettingController(IRegionCore region, IAreaCore area, ISliderCore slider, ICloudStorage cloudStorage)
 {
     _region       = region;
     _area         = area;
     _slider       = slider;
     _cloudStorage = cloudStorage;
 }
Ejemplo n.º 4
0
        public async Task <DbResponse> EditAsync(CatalogDisplayModel model, ICloudStorage cloudStorage, IFormFile image)
        {
            try
            {
                if (string.IsNullOrEmpty(model.CatalogName) && string.IsNullOrEmpty(model.SlugUrl))
                {
                    return(new DbResponse(false, "Invalid Data"));
                }

                if (_db.Catalog.IsExistName(model.CatalogName, model.CatalogId))
                {
                    return(new DbResponse(false, $"{model.CatalogName} already Exist"));
                }

                if (_db.Catalog.IsExistSlugUrl(model.SlugUrl, model.CatalogId))
                {
                    return(new DbResponse(false, $"{model.SlugUrl} SlugUrl already Exist"));
                }


                model.ImageFileName = await cloudStorage.UpdateFileAsync(image, model.ImageFileName, "catalog");

                _db.Catalog.Edit(model);
                _db.SaveChanges();



                return(new DbResponse(true, "Success"));
            }
            catch (Exception e)
            {
                return(new DbResponse(false, e.Message));
            }
        }
Ejemplo n.º 5
0
        public GoogleCloud()
        {
            CloudRail.AppKey = Constant.LicenceCloudRail;
            GoogleDrive googledrive = new GoogleDrive(new LocalReceiver(8082), Constant.GoogleKey, Constant.GooGleSecret, "http://localhost:8082/auth", "someState");

            serviceCloudStorage = googledrive;
        }
Ejemplo n.º 6
0
 public LiveStreamService(IRepository <Models.LiveStream> repository,
                          IValidationProvider validationProvider, ICloudStorage cloudStorage, IDirble dirble)
     : base(repository, validationProvider, cloudStorage)
 {
     _repository = repository;
     _dirble     = dirble;
 }
 public DownloadFileFromServer(DropBoxEvent @event, ICloudStorage cloudStorage, LocalFolderRoot root)
 {
     this.serverPath   = @event.ServerPath;
     this.Title        = "Download : " + this.serverPath.Value;
     this.cloudStorage = cloudStorage;
     this.root         = root;
 }
Ejemplo n.º 8
0
        public TaskMapper()
        {
            _cloudStorage = new DropboxFacade();

            _logger = new ProcessLogger(_cloudStorage);
            _rtm = new RTMFacade();
        }
Ejemplo n.º 9
0
 public GetNpsHttpTrigger(ILogger <GetNpsHttpTrigger> log, ProdutoService produtoService, ICloudStorage cloudStorage, IServiceProvider serviceProvider)
     : base(log, serviceProvider)
 {
     _log            = log;
     _produtoService = produtoService;
     _cloudStorage   = cloudStorage;
 }
 public BaseMediaContentUploadingService(
     IMediaContentService contents,
     ICloudStorage storage)
 {
     this.contents = contents;
     this.storage = storage;
 }
Ejemplo n.º 11
0
 public QRCodeGeneration(ICloudStorage cloudStorage, IConfiguration configuration, ICipherService cipher, IEnvironmentService env)
 {
     _cipher        = cipher;
     _configuration = configuration;
     _cloudStorage  = cloudStorage;
     _env           = env;
 }
 public CollectionsController(UserManager <User> userManager, SignInManager <User> signInManager, ApplicationContext context, ICloudStorage cloudStorage)
 {
     _userManager   = userManager;
     _signInManager = signInManager;
     _context       = context;
     _cloudStorage  = cloudStorage;
 }
Ejemplo n.º 13
0
 public SmsController(ILogger <SmsController> logger, ICloudStorage storageClient, IConfiguration configuration, TenantFileContext context, [Service] ITopicEventSender eventSender)
 {
     this.eventSender   = eventSender;
     this.logger        = logger;
     this.storageClient = storageClient;
     this.context       = context;
 }
        public CloudStorageSeekableStream(ICloudStorage storage, ICloudStorageResourceName resourceName)
        {
            _CloudStorage = storage;
            _ResourceName = resourceName;

            Length = Task.Run(() => { return(_CloudStorage.GetObjectLengthAsync(_ResourceName)); }).Result;
        }
Ejemplo n.º 15
0
 public AccountController(UserManager <User> userManager, SignInManager <User> signInManager, ICloudStorage cloudStorage, ApplicationContext context)
 {
     _userManager   = userManager;
     _signInManager = signInManager;
     _cloudStorage  = cloudStorage;
     _context       = context;
 }
Ejemplo n.º 16
0
        public AudioInterface(ICloudStorage cloudStorage, ICommentService commentService)
        {
            _cloudStorage = cloudStorage;

            Name = nameof(Models.Audio);

            Field <IdGraphType>("id");
            Field(x => x.Id).Name("audioId");
            Field(x => x.Name);
            Field(x => x.Likes);
            Field(x => x.Dislikes);
            Field <StringGraphType>("coverImageUrl", "The cover image url", resolve: GetCoverImageUrl);
            Field <DateGraphType>("dateAdded", "The date the user added the audio");
            Field <ListGraphType <GenrePayload> >("genres", "The genres the audio belongs to", resolve: c => c.Source.AudioGenres.Select(x => x.Genre));
            Field <ListGraphType <RatingPayload> >("ratings", "The ratings that have been applied by users to this audio");
            Connection <CommentPayload>()
            .Name("comments")
            .Description("The comments for the audio")
            .Resolve(c =>
            {
                var comments = c.Source.Comments;

                return(ConnectionUtils.ToConnection(comments, c));
            });
        }
Ejemplo n.º 17
0
        public LiveStreamPayload(ILiveStreamService liveStreamService, ICloudStorage cloudStorage)
        {
            _liveStreamService = liveStreamService;
            _cloudStorage      = cloudStorage;

            Name = nameof(Models.LiveStream);

            Id("audioId", x => x.Id);
            Field(x => x.Name);
            Field(x => x.WebsiteUrl, nullable: true);
            Field(x => x.Likes);
            Field(x => x.Dislikes);
            Field(x => x.Country);
            Field <StringGraphType>("coverImageUrl", "The cover image url", resolve: GetCoverImageUrl);
            Field <DateGraphType>("dateAdded", "The date the user added the live stream");
            Field <ListGraphType <GenrePayload> >("genres", "The genre the live stream belongs to", resolve: c => c.Source.AudioGenres.Select(x => x.Genre));
            Field <ListGraphType <RatingPayload> >("ratings", "The ratings that have been applied by users to this live stream");
            Field <ListGraphType <StreamDataPayload> >("streamDatas");
            Connection <CommentPayload>()
            .Name("comments")
            .Description("The top level comments for the live stream")
            .Resolve(c =>
            {
                var comments = c.Source.Comments.Where(x => x.IsTopLevelComment);

                return(ConnectionUtils.ToConnection(comments, c));
            });

            Interface <AudioInterface>();
        }
Ejemplo n.º 18
0
        public async Task <DbResponse> DeleteAsync(int id, ICloudStorage cloudStorage)
        {
            try
            {
                if (_db.Catalog.IsNull(id))
                {
                    return(new DbResponse(false, "Data not found"));
                }
                if (_db.Catalog.IsRelatedDataExist(id))
                {
                    return(new DbResponse(false, "Related data Exist"));
                }
                var catalog = _db.Catalog.Get(id);

                _db.Catalog.Delete(id);
                _db.SaveChanges();

                await cloudStorage.DeleteFileAsync(catalog.ImageFileName);

                return(new DbResponse(true, "Success"));
            }
            catch (Exception e)
            {
                return(new DbResponse(false, e.Message));
            }
        }
Ejemplo n.º 19
0
 public FileController(IFileService fileService, IProductService productService, ICollectionService collectionService, ICategoryService categoryService, ICloudStorage cloudStorage)
 {
     _fileService       = fileService;
     _productService    = productService;
     _collectionService = collectionService;
     _categoryService   = categoryService;
     _cloudStorage      = cloudStorage;
 }
Ejemplo n.º 20
0
        public BudgetSynchronizer(ICloudStorage cloudStorage)
        {
            _cloudStorage = cloudStorage;
            _cloudStorage.OnDownloadFinished += OnDataDownloaded;
            _cloudStorage.OnDownloadError    += OnDownloadError;

            _cancellationTokenSource = new CancellationTokenSource();
        }
Ejemplo n.º 21
0
 public UserRepository(Func <QueryFactory> queryFactory, IPasswordHash passwordHash, ICloudStorage cloudStorage, IOptions <CloudStorageOptions> options, ITransactionRepository transactions) : base(queryFactory)
 {
     _queryFactory = queryFactory;
     _passwordHash = passwordHash;
     _cloudStorage = cloudStorage;
     _transactions = transactions;
     _options      = options.Value;
 }
Ejemplo n.º 22
0
 public ApplicationRepository(Func <QueryFactory> queryFactory, ICloudStorage storage, IOptions <CloudStorageOptions> options, IDownloadRepository downloads, IUserRepository users) : base(queryFactory)
 {
     _queryFactory = queryFactory;
     _storage      = storage;
     _downloads    = downloads;
     _users        = users;
     _options      = options.Value;
 }
Ejemplo n.º 23
0
 public IndexModel(ILogger <IndexModel> logger, IHostingEnvironment environment, IConfiguration configuration,
                   ICloudStorage cloudStorage)
 {
     _logger        = logger;
     _environment   = environment;
     _configuration = configuration;
     _cloudStorage  = cloudStorage;
 }
Ejemplo n.º 24
0
 public AdminManager(ICloudStorage cloudStorage, IAdminRepository adminRepository,
                     ICompanyManager companyManager, IGenericEmailManager genericEmailManager)
 {
     _cloudStorage        = cloudStorage;
     _adminRepository     = adminRepository;
     _companyManager      = companyManager;
     _genericEmailManager = genericEmailManager;
 }
Ejemplo n.º 25
0
 public UploadController(ICloudStorage icloud, IQuestionImportRepository repoQ, IExamForApproveRepository repoExamForApprove, IFile iFile)
 {
     //this.storageAccount = storageAccount;
     this.iCloudStorage      = icloud;
     this.repoQ              = repoQ;
     this.repoExamForApprove = repoExamForApprove;
     this.iFile              = iFile;
 }
Ejemplo n.º 26
0
 public RentalsController(YourthomeContext context, IIdsaferService idsaferservice,
                          ICloudStorage cloudStorage, IWebHostEnvironment appEnvironment)
 {
     _context        = context;
     _idsaferservice = idsaferservice;
     _appEnvironment = appEnvironment;
     _cloudStorage   = cloudStorage;
 }
 public ImageService(IUnitOfWork uow, ICloudStorage cloudStorage, IPictureRepository pictureRepository,IUserService userService, ILoggerService logger)
 {
     _uow = uow;
     _cloudStorage = cloudStorage;
     _pictureRepository = pictureRepository;
     _userService = userService;
     _loggerService = logger;
 }
Ejemplo n.º 28
0
        public SmsController(ILogger <SmsController> logger, ICloudStorage storageClient, IConfiguration configuration, TenantContext context)
        {
            _logger        = logger;
            _storageClient = storageClient;

            _db      = FirestoreDb.Create(configuration.GetValue <string>("GoogleProjectId"));
            _context = context;
        }
Ejemplo n.º 29
0
 public PersonaController(ILogger <PersonaController> logger,
                          IMediator mediator,
                          ICloudStorage cloudStorage)
 {
     _mediator     = mediator;
     _logger       = logger;
     _cloudStorage = cloudStorage;
 }
        internal CloudZipArchiveEntry(ICloudStorage storage, ICloudStorageResourceName resourceName, ZipArchiveEntry entry)
            : base(entry)
        {
            _CloudStorage = storage;
            _ResourceName = resourceName;

            CompressionMethod      = (ushort)methodProperty.GetValue(entry);
            OffsetOfCompressedData = (long)offsetProperty.GetValue(entry);
        }
 public TestController(ICloudStorage cloudStorage, IConfiguration configuration, IAuthRepository authRepository, IQRCodeGeneration qRCodeGeneration, ICipherService cipher, DataContext context)
 {
     _context          = context;
     _cipher           = cipher;
     _qRCodeGeneration = qRCodeGeneration;
     _authRepository   = authRepository;
     _cloudStorage     = cloudStorage;
     _configuration    = configuration;
 }
Ejemplo n.º 32
0
 public IndexModel(
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     ICloudStorage cloudStorage)
 {
     _userManager   = userManager;
     _signInManager = signInManager;
     _cloudStorage  = cloudStorage;
 }
Ejemplo n.º 33
0
 public AutoBookInputHandler(OptimiserInputFiles optimiserInputFiles, IAuditEventRepository auditEventRepository,
                             AWSSettings awsSettings, ICloudStorage cloudStorage, IPipelineAuditEventRepository pipelineAuditEventRepository)
 {
     _optimiserInputFiles          = optimiserInputFiles;
     _auditEventRepository         = auditEventRepository;
     _awsSettings                  = awsSettings;
     _cloudStorage                 = cloudStorage;
     _pipelineAuditEventRepository = pipelineAuditEventRepository;
 }
Ejemplo n.º 34
0
 public DataAccess(ICloudStorage pStorage)
 {
     _storage = pStorage;
     _encryptor = new AESEncryptor();
 }
		public TodoItemManager (ICloudStorage storage) 
		{
			this.storage = storage;
		}
 public ImageService(IUnitOfWork uow, ICloudStorage cloudStorage, IImageRepository imageRepository)
 {
     this.uow = uow;
     this.cloudStorage = cloudStorage;
     this.imageRepository = imageRepository;
 }
 public MusicUploadingService(
     IMediaContentService contents,
     ICloudStorage storage)
     : base(contents, storage)
 {
 }