/// <summary> /// Updates the specified worklist folder to reflect the specified worklist. /// </summary> /// <param name="folder"></param> /// <param name="worklist"></param> public void UpdateWorklistFolder(IWorklistFolder folder, WorklistSummary worklist) { if (!this.Folders.Contains(folder)) { return; } InitializeFolderProperties(folder, worklist); // notify that the folder properties have changed NotifyFolderPropertiesChanged(folder); }
/// <summary> /// Initializes the specified folder's properties from the specified worklist. /// </summary> /// <param name="worklist"></param> /// <param name="folder"></param> private static void InitializeFolderProperties(IWorklistFolder folder, WorklistSummary worklist) { var initFolder = (IInitializeWorklistFolder)folder; // augment default base path with worklist name var path = folder.FolderPath; if (!string.IsNullOrEmpty(worklist.DisplayName)) { path = path.Append(new PathSegment(worklist.DisplayName, folder.ResourceResolver)); } // init folder initFolder.Initialize( path, worklist.WorklistRef, worklist.Description, GetWorklistOwnership(worklist), GetWorklistOwnerName(worklist) ); }