ClrPlus.Powershell.Core.Service.RestService.RestService C# (CSharp) Method

RestService() private method

private RestService ( string serviceName, List urls, List commands, IEnumerable modules ) : System
serviceName string
urls List
commands List
modules IEnumerable
return System
        internal RestService(string serviceName, List<string> urls, List<RestCommand> commands, IEnumerable<string> modules)
            : base(serviceName, typeof(DynamicPowershell).Assembly)
        {
            // we have to give it at least one assembly, even if there isn't any services in it.
            // so I'm giving it a really small assembly

            _serviceName = serviceName;
            _activeCommands = commands;
            _listenOnUrls = urls;
            ReverseLookup.Clear();

            var ss = InitialSessionState.CreateDefault();
            ss.ImportPSModule(modules.ToArray());

            RunspacePool = RunspaceFactory.CreateRunspacePool(ss);
            RunspacePool.Open();
        }