コード例 #1
0
        public static void MarkAsNew(FileEntry fileEntry, List<Guid> userIDs)
        {
            if (CoreContext.Configuration.Personal) return;

            if (fileEntry == null) return;
            userIDs = userIDs ?? new List<Guid>();

            var taskData = new AsyncTaskData
                {
                    FileEntry = (FileEntry)fileEntry.Clone(),
                    UserIDs = userIDs
                };

            if (fileEntry.RootFolderType == FolderType.BUNCH && !userIDs.Any())
            {
                var projectTeam = Global.GetProjectTeam(fileEntry);

                if (!projectTeam.Any()) return;

                taskData.UserIDs = projectTeam.ToList();
            }

            lock (SyncObj)
            {
                AsyncTasks.Add(taskData);

                if (!AsyncTasks.IsStarted)
                    AsyncTasks.Start(ExecMarkFileAsNew);
            }
        }