コード例 #1
0
ファイル: VBCSCompiler.cs プロジェクト: znatz/roslyn
        public static int Main(string[] args)
        {
            NameValueCollection appSettings;

            try
            {
                appSettings = ConfigurationManager.AppSettings;
            }
            catch (Exception ex)
            {
                // It is possible for AppSettings to throw when the application or machine configuration
                // is corrupted.  This should not prevent the server from starting, but instead just revert
                // to the default configuration.
                appSettings = new NameValueCollection();
                CompilerServerLogger.LogException(ex, "Error loading application settings");
            }

            try
            {
                var controller = new DesktopBuildServerController(appSettings);
                return(controller.Run(args));
            }
            catch (FileNotFoundException e)
            {
                // Assume the exception was the result of a missing compiler assembly.
                LogException(e);
            }
            catch (TypeInitializationException e) when(e.InnerException is FileNotFoundException)
            {
                // Assume the exception was the result of a missing compiler assembly.
                LogException((FileNotFoundException)e.InnerException);
            }
            return(CommonCompiler.Failed);
        }
コード例 #2
0
        internal static new int RunServer(
            string pipeName,
            string tempPath,
            IClientConnectionHost clientConnectionHost = null,
            IDiagnosticListener listener        = null,
            TimeSpan?keepAlive                  = null,
            CancellationToken cancellationToken = default(CancellationToken))
        {
            BuildServerController controller = new DesktopBuildServerController(new NameValueCollection());

            return(controller.RunServer(pipeName, tempPath, clientConnectionHost, listener, keepAlive, cancellationToken));
        }
コード例 #3
0
ファイル: VBCSCompiler.cs プロジェクト: XieShuquan/roslyn
        public static int Main(string[] args)
        {
            NameValueCollection appSettings;
            try
            {
                appSettings = ConfigurationManager.AppSettings;
            }
            catch (Exception ex)
            {
                // It is possible for AppSettings to throw when the application or machine configuration 
                // is corrupted.  This should not prevent the server from starting, but instead just revert
                // to the default configuration.
                appSettings = new NameValueCollection();
                CompilerServerLogger.LogException(ex, "Error loading application settings");
            }

            var controller = new DesktopBuildServerController(appSettings);
            return controller.Run(args);
        }
コード例 #4
0
ファイル: VBCSCompiler.cs プロジェクト: fjsnogueira/roslyn-1
        public static int Main(string[] args)
        {
            NameValueCollection appSettings;

            try
            {
                appSettings = ConfigurationManager.AppSettings;
            }
            catch (Exception ex)
            {
                // It is possible for AppSettings to throw when the application or machine configuration
                // is corrupted.  This should not prevent the server from starting, but instead just revert
                // to the default configuration.
                appSettings = new NameValueCollection();
                CompilerServerLogger.LogException(ex, "Error loading application settings");
            }

            var controller = new DesktopBuildServerController(appSettings);

            return(controller.Run(args));
        }
コード例 #5
0
 internal static new int RunServer(string pipeName, IClientConnectionHost clientConnectionHost = null, IDiagnosticListener listener = null, TimeSpan? keepAlive = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     BuildServerController controller = new DesktopBuildServerController();
     return controller.RunServer(pipeName, clientConnectionHost, listener, keepAlive, cancellationToken);
 }