public async Task MoveFile(File file, string url, string sharedSecret) { var callUrl = $"{url}/{file.FileKey}"; FileSyncDTO fileSyncDTO = new FileSyncDTO { creationTime = file.CreationTime.ToString(), expireTime = file.ExpireTime.ToString(), siteId = file.SiteId.ToString(), }; try { LogHelper.Debug($"{DateTime.UtcNow} Begin call api: {file.FileKey}"); var httpstatusCode = await CallApiHelper.UploadFile(callUrl, sharedSecret, file.Content.Name, file.Content.Content, fileSyncDTO); LogHelper.Debug($"{DateTime.UtcNow} End call api: {file.FileKey}"); if (httpstatusCode == HttpStatusCode.OK) { using (_container.BeginScope()) { LogHelper.Debug($"{DateTime.UtcNow} Begin delete: {file.FileKey}"); IFileDomainService fileDomainService = _container.Resolve <IFileDomainService>(); await fileDomainService.Delete(file); LogHelper.Debug($"{DateTime.UtcNow} End delete: {file.FileKey}"); } } } catch (Exception ex) { LogHelper.Error(ex, ex.Message); } }
public DbToS3DomainService( IFileDomainService fileDomainService, IWindsorContainer container) { this._fileDomainService = fileDomainService; this._container = container; }
public FileAppService(IFileDomainService fileDomainService, IFileAuthService authService, IConfigService configService) { this._fileDomainService = fileDomainService; this._configService = configService; this._fileAuthService = authService; }
public StandbyToMainDomainService( IFileDomainService fileDomainService, IConfigService configService, IWindsorContainer container) { this._fileDomainService = fileDomainService; this._configService = configService; this._container = container; }
public StandbyToMainDomainService( IFileDomainService fileDomainService, ISitePlatformDomainService sitePlatformDomainService, IConfigService configService) { this._fileDomainService = fileDomainService; this._sitePlatformDomainService = sitePlatformDomainService; this._configService = configService; }
public DbToS3DomainService( IConfigService configService, IFileDomainService fileDomainService, IS3Repository s3Repository, IRepository <byte[], FileContent> linkRepository) { this._configService = configService; this._fileDomainService = fileDomainService; this._s3Repository = s3Repository; this._linkRepository = linkRepository; }
/// <summary> /// Initializes a new instance of the <see cref="FileAppService"/> class. /// </summary> /// <param name="fileManager">The file manager.</param> /// <param name="baseFileManager">The base file manager.</param> /// <param name="objectMapper">The object mapper.</param> /// <param name="cacheService">The cache service.</param> /// <param name="exceptionManager">The exception manager.</param> /// <param name="loggingService">The logging service.</param> public FileAppService( IFileDomainService fileManager, IBaseFileDomainService baseFileManager, IObjectMapperAdapter objectMapper, ICacheAdapter cacheService, IExceptionManagerAdapter exceptionManager, ILoggingServiceAdapter loggingService) : base(objectMapper, cacheService, exceptionManager, loggingService) { this.FileManager = fileManager; this.BaseFileManager = baseFileManager; }
/// <summary> /// Initializes a new instance of the <see cref="UnitModuleAppService"/> class. /// </summary> /// <param name="unitManager">The unit manager.</param> /// <param name="objectMapper">The object mapper.</param> /// <param name="cacheService">The cache service.</param> /// <param name="exceptionManager">The exception manager.</param> /// <param name="loggingService">The logging service.</param> public UnitModuleAppService( IUnitDomainService unitManager, IModuleDomainService moduleManager, ICourseDomainService courseManager, IVideoDomainService videoManager, IFileDomainService fileManager, IObjectMapperAdapter objectMapper, ICacheAdapter cacheService, IExceptionManagerAdapter exceptionManager, ILoggingServiceAdapter loggingService, IQuizAppService quizAppService, ICourseModuleAppService courseModuleAppService) : base(objectMapper, cacheService, exceptionManager, loggingService) { this.UnitManager = unitManager; this.ModuleManager = moduleManager; this.CourseManager = courseManager; this.VideoManager = videoManager; this.FileManager = fileManager; this._quizAppService = quizAppService; this.CourseModuleAppService = courseModuleAppService; }
/// <summary> /// Initializes a new instance of the <see cref="AssignmentTaskSubmissionAppService"/> class. /// </summary> /// <param name="assignmentManager">The assignment manager.</param> /// <param name="taskManager">The task manager.</param> /// <param name="submissionManager">The submission manager.</param> /// <param name="objectMapper">The object mapper.</param> /// <param name="cacheService">The cache service.</param> /// <param name="exceptionManager">The exception manager.</param> /// <param name="loggingService">The logging service.</param> public AssignmentTaskSubmissionAppService( IAssignmentDomainService assignmentManager, ICourseDomainService courseManager, IModuleDomainService moduleManager, IUnitDomainService unitManager, ITaskDomainService taskManager, IMessageDomainService messageManager, ISubmissionDomainService submissionManager, IFileDomainService fileManager, IObjectMapperAdapter objectMapper, ICacheAdapter cacheService, IExceptionManagerAdapter exceptionManager, ILoggingServiceAdapter loggingService) : base(objectMapper, cacheService, exceptionManager, loggingService) { this.AssignmentManager = assignmentManager; this.TaskManager = taskManager; this.SubmissionManager = submissionManager; this.FileManager = fileManager; this.CourseManager = courseManager; this.ModuleManager = moduleManager; this.UnitManager = unitManager; this.MessageManager = messageManager; }
public DeleteExpiredFilesDomainService(IFileDomainService fileDomainService) { this._fileDomainService = fileDomainService; }
public FileAppService(IFileDomainService fileDomainService, IFileAuthService authService, IFileLimitDomainService fileLimitDomainService) { this._fileDomainService = fileDomainService; this._fileAuthService = authService; this._fileLimitDomainService = fileLimitDomainService; }
public BlogAppService(IRepository <Blog> blogRepo , IFileDomainService fileDomainService) { _fileDomainService = fileDomainService; _blogRepo = blogRepo; }
public FileAppService(IFileDomainService fileDomainService) { this._fileDomainService = fileDomainService; }
public CertificateAppService(IRepository <Certificate> CertificateRepo , IFileDomainService fileDomainService) { _fileDomainService = fileDomainService; _CertificateRepo = CertificateRepo; }
public ProductAppService(IRepository <Product> productRepo, IFileDomainService fileDomainService) { _fileDomainService = fileDomainService; _productRepo = productRepo; }