示例#1
0
 /// <summary>
 /// Creates a folder for related tasks. Not available to Task Scheduler 1.0.
 /// </summary>
 /// <param name="subFolderName">The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current <see cref="TaskFolder"/> instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.</param>
 /// <param name="folderSecurity">The task security associated with the folder.</param>
 /// <returns>A <see cref="TaskFolder"/> instance that represents the new subfolder.</returns>
 public TaskFolder CreateFolder([NotNull] string subFolderName, [NotNull] TaskSecurity folderSecurity)
 {
     if (folderSecurity == null)
     {
         throw new ArgumentNullException(nameof(folderSecurity));
     }
     return(CreateFolder(subFolderName, folderSecurity.GetSecurityDescriptorSddlForm(Task.defaultAccessControlSections)));
 }
示例#2
0
 /// <summary>
 /// Applies access control list (ACL) entries described by a <see cref="TaskSecurity"/> object to the file described by the current <see cref="TaskFolder"/> object.
 /// </summary>
 /// <param name="taskSecurity">A <see cref="TaskSecurity"/> object that describes an access control list (ACL) entry to apply to the current folder.</param>
 public void SetAccessControl([NotNull] TaskSecurity taskSecurity)
 {
     taskSecurity.Persist(this);
 }