Exemplo n.º 1
0
        private CmdletTaskFactory()
        {
            foreach (object obj in Enum.GetValues(typeof(TaskModuleKey)))
            {
                TaskModuleKey key = (TaskModuleKey)obj;
                TaskModuleFactory.DisableModule(key);
            }
            TaskModuleFactory.EnableModule(TaskModuleKey.RunspaceServerSettingsInit);
            TaskModuleFactory.EnableModule(TaskModuleKey.RunspaceServerSettingsFinalize);
            string configStringValue = AppConfigLoader.GetConfigStringValue("PSDirectInvokeEnabledModules", string.Empty);

            string[] array = configStringValue.Split(new char[]
            {
                ','
            }, StringSplitOptions.RemoveEmptyEntries);
            foreach (string value in array)
            {
                TaskModuleKey key2;
                if (Enum.TryParse <TaskModuleKey>(value, true, out key2))
                {
                    TaskModuleFactory.EnableModule(key2);
                }
            }
        }
Exemplo n.º 2
0
 protected void UnregisterModule(TaskModuleKey key)
 {
     this.taskModules[(int)key] = null;
 }
Exemplo n.º 3
0
 public static void EnableModule(TaskModuleKey key)
 {
     TaskModuleFactory.disabledTaskModules[(int)key] = false;
 }
Exemplo n.º 4
0
 protected void RegisterModule(TaskModuleKey key, Type module)
 {
     this.taskModules[(int)key] = module;
 }
Exemplo n.º 5
0
 public static void DisableModule(TaskModuleKey key)
 {
     TaskModuleFactory.disabledTaskModules[(int)key] = true;
 }