public StudioShellConfiguration(UISettings uiSettings) { var profileScripts = new StudioShellProfileInfo(); var newProfile = profileScripts.GetProfilePSObject(); var runspaceConfiguration = RunspaceConfiguration.Create(); var cce = new List <CmdletConfigurationEntry>(); var initialVariables = new List <PSVariable>(); runspaceConfiguration.InitializationScripts.Append( new ScriptConfigurationEntry("start-studioshell", Scripts.StartStudioShell) ); initialVariables.Add(new PSVariable("profile", newProfile)); ShellName = StudioShellInfo.ShellName; ShellVersion = StudioShellInfo.ShellVersion; Cmdlets = cce; InitialVariables = initialVariables; RunspaceConfiguration = runspaceConfiguration; UISettings = uiSettings; var blacklist = new List <string> { "cmd", "cmd.exe", "diskpart", "diskpart.exe", "edit.com", "netsh", "netsh.exe", "nslookup", "nslookup.exe", "powershell", "powershell.exe", "vim", "vim.exe", "wmic", "wmic.exe" }; UnsupportedConsoleApplicationConfiguration = new UnsupportedConsoleApplicationConfiguration( blacklist, UpdateableBlacklistVariable.VariableName, "about_StudioShell_UnsupportedApplications" ); initialVariables.Add(new UpdateableBlacklistVariable(UnsupportedConsoleApplicationConfiguration)); }
public StudioShellConfiguration( UISettings uiSettings ) { var profileScripts = new StudioShellProfileInfo(); var newProfile = profileScripts.GetProfilePSObject(); var runspaceConfiguration = RunspaceConfiguration.Create(); var cce = new List<CmdletConfigurationEntry>(); var initialVariables = new List<PSVariable>(); runspaceConfiguration.InitializationScripts.Append( new ScriptConfigurationEntry("start-studioshell", Scripts.StartStudioShell) ); initialVariables.Add(new PSVariable("profile", newProfile)); ShellName = StudioShellInfo.ShellName; ShellVersion = StudioShellInfo.ShellVersion; Cmdlets = cce; InitialVariables = initialVariables; RunspaceConfiguration = runspaceConfiguration; UISettings = uiSettings; var blacklist = new List<string> { "cmd", "cmd.exe", "diskpart", "diskpart.exe", "edit.com", "netsh", "netsh.exe", "nslookup", "nslookup.exe", "powershell", "powershell.exe", "vim", "vim.exe", "wmic", "wmic.exe" }; UnsupportedConsoleApplicationConfiguration = new UnsupportedConsoleApplicationConfiguration( blacklist, UpdateableBlacklistVariable.VariableName, "about_StudioShell_UnsupportedApplications" ); initialVariables.Add(new UpdateableBlacklistVariable( UnsupportedConsoleApplicationConfiguration )); }