protected override IClientConnectionHost CreateClientConnectionHost(string pipeName) { var port = int.Parse(pipeName); var ipAddress = IPAddress.Parse(DefaultAddress); var endPoint = new IPEndPoint(ipAddress, port: port); var clientDirectory = AppContext.BaseDirectory; var compilerHost = new CoreClrCompilerServerHost(clientDirectory); var connectionHost = new TcpClientConnectionHost(compilerHost, endPoint); return connectionHost; }
public static void Main(string[] args) { var ipAddress = IPAddress.Parse("127.0.0.1"); var endPoint = new IPEndPoint(ipAddress, port: 12000); var clientDirectory = AppContext.BaseDirectory; var compilerHost = new CoreClrCompilerServerHost(clientDirectory); var connectionHost = new TcpClientConnectionHost(compilerHost, endPoint); var serverDispatcher = new ServerDispatcher(connectionHost); serverDispatcher.ListenAndDispatchConnections(keepAlive: null, cancellationToken: CancellationToken.None); }
protected override IClientConnectionHost CreateClientConnectionHost(string pipeName) { var port = int.Parse(pipeName); var ipAddress = IPAddress.Parse(DefaultAddress); var endPoint = new IPEndPoint(ipAddress, port: port); var clientDirectory = AppContext.BaseDirectory; var compilerHost = new CoreClrCompilerServerHost(clientDirectory); var connectionHost = new TcpClientConnectionHost(compilerHost, endPoint); return(connectionHost); }
protected override IClientConnectionHost CreateClientConnectionHost(string pipeName) { // VBCSCompiler is installed in the same directory as csc.exe and vbc.exe which is also the // location of the response files. var clientDirectory = AppDomain.CurrentDomain.BaseDirectory; #if NET46 var sdkDirectory = RuntimeEnvironment.GetRuntimeDirectory(); var compilerServerHost = new DesktopCompilerServerHost(clientDirectory, sdkDirectory); #else var sdkDirectory = (string)null; var compilerServerHost = new CoreClrCompilerServerHost(clientDirectory, sdkDirectory); #endif return(new NamedPipeClientConnectionHost(compilerServerHost, pipeName)); }