Exemplo n.º 1
0
        public IScriptSession CreateSession(IScriptHost host, IDictionary <string, string> arguments)
        {
            if (arguments == null)
            {
                throw new ArgumentNullException("arguments");
            }

            // Create the script session.
            _log.Debug("Creating script session...");

            // Are we using the experimental bits?
            if (arguments.ContainsKey("experimental"))
            {
                // Use the nightly build.
                _log.Debug("Using prerelease build of Roslyn.");
                return(_nightlyFactory.CreateSession(host));
            }

            // Use the stable build.
            return(_stableFactory.CreateSession(host));
        }