public QueueWorkerReassign(IHttpContextAccessor httpContextAccessor, MessageService messageService, StudioNotifyService studioNotifyService, QueueWorkerRemove queueWorkerRemove) : base(httpContextAccessor, messageService, studioNotifyService) { QueueWorkerRemove = queueWorkerRemove; }
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 QueueWorkerReassign( IHttpContextAccessor httpContextAccessor, IServiceProvider serviceProvider, QueueWorkerRemove queueWorkerRemove, ProgressQueueOptionsManager <ReassignProgressItem> optionsQueue) : base(httpContextAccessor, serviceProvider, optionsQueue) { QueueWorkerRemove = queueWorkerRemove; }
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 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; }
private void DeleteUserProfile(Tenant tenant) { var user = CoreContext.UserManager.GetUsers(_tenantId, FromUser); var userName = user.DisplayUserName(false); UserPhotoManager.RemovePhoto(tenant, user.ID); CoreContext.UserManager.DeleteUser(tenant, user.ID); QueueWorkerRemove.Start(_tenantId, user, _currentUserId, false); if (_httpHeaders != null) { MessageService.Send(_httpHeaders, MessageAction.UserDeleted, MessageTarget.Create(FromUser), new[] { userName }); } else { MessageService.Send(MessageAction.UserDeleted, MessageTarget.Create(FromUser), userName); } }
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; }
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; }