public void Init(int tenantId, UserInfo user, Guid currentUserId, bool notify)
        {
            _tenantId      = tenantId;
            User           = user;
            FromUser       = user.ID;
            _currentUserId = currentUserId;
            _notify        = notify;

            Id          = QueueWorkerRemove.GetProgressItemId(tenantId, FromUser);
            Status      = DistributedTaskStatus.Created;
            Exception   = null;
            Percentage  = 0;
            IsCompleted = false;
        }
        public RemoveProgressItem(
            IServiceProvider serviceProvider,
            HttpContext context,
            QueueWorkerRemove queueWorkerRemove,
            int tenantId, UserInfo user, Guid currentUserId, bool notify)
        {
            _httpHeaders    = QueueWorker.GetHttpHeaders(context.Request);
            ServiceProvider = serviceProvider;
            _tenantId       = tenantId;
            User            = user;
            FromUser        = user.ID;
            _currentUserId  = currentUserId;
            _notify         = notify;

            //_docService = Web.Files.Classes.Global.FileStorageService;
            //_mailEraser = new MailGarbageEngine();

            Id          = queueWorkerRemove.GetProgressItemId(tenantId, FromUser);
            Status      = ProgressStatus.Queued;
            Error       = null;
            Percentage  = 0;
            IsCompleted = false;
        }
Beispiel #3
0
        public RemoveProgressItem(HttpContext context, MessageService messageService, QueueWorkerRemove queueWorkerRemove, StudioNotifyService studioNotifyService, int tenantId, UserInfo user, Guid currentUserId, bool notify)
        {
            _context            = context;
            MessageService      = messageService;
            StudioNotifyService = studioNotifyService;
            _httpHeaders        = QueueWorker.GetHttpHeaders(context.Request);

            _tenantId      = tenantId;
            User           = user;
            FromUser       = user.ID;
            _userName      = UserFormatter.GetUserName(user, DisplayUserNameFormat.Default);
            _currentUserId = currentUserId;
            _notify        = notify;

            //_docService = Web.Files.Classes.Global.FileStorageService;
            //_mailEraser = new MailGarbageEngine();

            Id          = queueWorkerRemove.GetProgressItemId(tenantId, FromUser);
            Status      = ProgressStatus.Queued;
            Error       = null;
            Percentage  = 0;
            IsCompleted = false;
        }