public ReassignProgressItem(
            IServiceProvider serviceProvider,
            HttpContext context,
            QueueWorkerReassign queueWorkerReassign,
            QueueWorkerRemove queueWorkerRemove,
            int tenantId, Guid fromUserId, Guid toUserId, Guid currentUserId, bool deleteProfile)
        {
            ServiceProvider   = serviceProvider;
            QueueWorkerRemove = queueWorkerRemove;
            _httpHeaders      = QueueWorker.GetHttpHeaders(context.Request);

            _tenantId      = tenantId;
            FromUser       = fromUserId;
            ToUser         = toUserId;
            _currentUserId = currentUserId;
            _deleteProfile = deleteProfile;

            //_docService = Web.Files.Classes.Global.FileStorageService;
            //_projectsReassign = new ProjectsReassign();

            Id          = queueWorkerReassign.GetProgressItemId(tenantId, fromUserId);
            Status      = ProgressStatus.Queued;
            Error       = null;
            Percentage  = 0;
            IsCompleted = false;
        }
        public RemoveProgressItem(
            IServiceProvider serviceProvider,
            IHttpContextAccessor httpContextAccessor)
        {
            _httpHeaders    = QueueWorker.GetHttpHeaders(httpContextAccessor.HttpContext.Request);
            ServiceProvider = serviceProvider;


            //_docService = Web.Files.Classes.Global.FileStorageService;
            //_mailEraser = new MailGarbageEngine();
        }
        public ReassignProgressItem(
            IServiceProvider serviceProvider,
            IHttpContextAccessor httpContextAccessor,
            QueueWorkerRemove queueWorkerRemove)
        {
            ServiceProvider   = serviceProvider;
            QueueWorkerRemove = queueWorkerRemove;
            _httpHeaders      = QueueWorker.GetHttpHeaders(httpContextAccessor.HttpContext.Request);

            //_docService = Web.Files.Classes.Global.FileStorageService;
            //_projectsReassign = new ProjectsReassign();
        }
        public RemoveProgressItem(HttpContext context, int tenantId, UserInfo user, Guid currentUserId)
        {
            _context     = context;
            _httpHeaders = QueueWorker.GetHttpHeaders(context.Request);

            _tenantId      = tenantId;
            _userId        = user.ID;
            _userName      = UserFormatter.GetUserName(user, DisplayUserNameFormat.Default);
            _currentUserId = currentUserId;

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

            Id          = QueueWorker.GetProgressItemId(tenantId, _userId, typeof(RemoveProgressItem));
            Status      = ProgressStatus.Queued;
            Error       = null;
            Percentage  = 0;
            IsCompleted = false;
        }
        public ReassignProgressItem(HttpContext context, int tenantId, Guid fromUserId, Guid toUserId, Guid currentUserId)
        {
            _context     = context;
            _httpHeaders = QueueWorker.GetHttpHeaders(context.Request);

            _tenantId      = tenantId;
            _fromUserId    = fromUserId;
            _toUserId      = toUserId;
            _currentUserId = currentUserId;

            _docService       = Web.Files.Classes.Global.FileStorageService;
            _projectsReassign = new ProjectsReassign();

            Id          = QueueWorker.GetProgressItemId(tenantId, fromUserId, typeof(ReassignProgressItem));
            Status      = ProgressStatus.Queued;
            Error       = 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;
        }
Exemple #7
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;
        }