Пример #1
0
 public ShellConfiguration()
 {
     UISettings = new UISettings();
     InitialVariables = new List<PSVariable>();
     Cmdlets = new List<CmdletConfigurationEntry>();
     UnsupportedConsoleApplicationConfiguration = new UnsupportedConsoleApplicationConfiguration();
 }
Пример #2
0
 public ShellConfiguration()
 {
     UISettings       = new UISettings();
     InitialVariables = new List <PSVariable>();
     Cmdlets          = new List <CmdletConfigurationEntry>();
     UnsupportedConsoleApplicationConfiguration = new UnsupportedConsoleApplicationConfiguration();
 }
Пример #3
0
        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 ));
        }
Пример #4
0
 public UpdateableBlacklistVariable(UnsupportedConsoleApplicationConfiguration config)
     : base(VariableName)
 {
     _config = config;
 }