public DirectoryTreeToggleNode()
     : base("DirectoryTreeToggleExpand")
 {
     ExplorerKey              = "{DirectoryTree}";
     DirectoryEntryKey        = "{Directory}";
     ToggleMode               = DirectoryTreeToggleMode.Expand;
     ContinueOnCaptureContext = true;
 }
 /// <summary>
 /// Serializable, toggle a node specified in an variable in [DirectoryTree] to expand or collapse, recrusively.
 /// </summary>
 /// <example>
 ///   cmd = CoreScriptCommands.ParsePath("{Profiles}", tbDirectory.Text, "{Directory}",
 ///      UIScriptCommands.DirectoryTreeToggleNode("{DirectoryTree}", "{Directory}", DirectoryTreeToggleMode.Collapse)));
 ///</example>
 /// <param name="explorerVariable"></param>
 /// <param name="directoryEntryVariable"></param>
 /// <param name="toggleMode"></param>
 /// <param name="nextCommand"></param>
 /// <returns></returns>
 public static IScriptCommand DirectoryTreeToggleNode(string explorerVariable            = "{DirectoryTree}",
                                                      string directoryEntryVariable      = "{Directory}",
                                                      DirectoryTreeToggleMode toggleMode = DirectoryTreeToggleMode.Expand, IScriptCommand nextCommand = null)
 {
     return(new DirectoryTreeToggleNode()
     {
         ExplorerKey = explorerVariable,
         DirectoryEntryKey = directoryEntryVariable,
         ToggleMode = toggleMode,
         NextCommand = (ScriptCommandBase)nextCommand
     });
 }