private JsonRpc GetRpcServer(Stream stream, IResolveAssemblyReferenceTaskHandler handler) { IJsonRpcMessageHandler serverHandler = RpcUtils.GetRarMessageHandler(stream); JsonRpc rpc = new JsonRpc(serverHandler, handler); return(rpc); }
private IResolveAssemblyReferenceTaskHandler GetRpcClient() { ErrorUtilities.VerifyThrowInternalErrorUnreachable(_clientStream != null); IJsonRpcMessageHandler handler = RpcUtils.GetRarMessageHandler(_clientStream); return(JsonRpc.Attach <IResolveAssemblyReferenceTaskHandler>(handler)); }
public FullServer(IJsonRpcMessageHandler messageHandler) { Workspace = new RpcServerWorkspace(); RegisterWithWorkspace(Workspace); var serverRpc = new JsonRpc(messageHandler); var server = new ServerAgent(Workspace, serverRpc); serverRpc.AddLocalRpcTarget(server); ((HtmlDialogService)Workspace.DialogService).Agent = server; serverRpc.TraceSource.Listeners.Add(new Listener()); Agent = server; }
public JsonRpcWithFatalExceptionsTests(ITestOutputHelper logger) : base(logger) { this.server = new Server(); var streams = Nerdbank.FullDuplexStream.CreateStreams(); this.messageHandler = new HeaderDelimitedMessageHandler(streams.Item1, streams.Item1); this.clientRpc = new JsonRpcWithFatalExceptions(this.messageHandler); this.serverRpc = new JsonRpcWithFatalExceptions(new HeaderDelimitedMessageHandler(streams.Item2, streams.Item2), this.server); this.serverRpc.TraceSource = new TraceSource("Server", SourceLevels.Error); this.clientRpc.TraceSource = new TraceSource("Client", SourceLevels.Error); this.serverRpc.TraceSource.Listeners.Add(new XunitTraceListener(this.Logger)); this.clientRpc.TraceSource.Listeners.Add(new XunitTraceListener(this.Logger)); this.clientRpc.StartListening(); this.serverRpc.StartListening(); }
public JsonRpcWithMessageFactoryTests(ITestOutputHelper logger) : base(logger) { this.server = new Server(); var streams = Nerdbank.FullDuplexStream.CreateStreams(); this.clientMessageFormatter = new MessageFormatterWithMessageFactory(); this.clientMessageHandler = new HeaderDelimitedMessageHandler(streams.Item1, streams.Item1, this.clientMessageFormatter); this.serverMessageFormatter = new MessageFormatterWithMessageFactory(); this.serverMessageHandler = new HeaderDelimitedMessageHandler(streams.Item2, streams.Item2, this.serverMessageFormatter); this.clientRpc = new JsonRpc(this.clientMessageHandler); this.serverRpc = new JsonRpc(this.serverMessageHandler, this.server); this.serverRpc.TraceSource = new TraceSource("Server", SourceLevels.Information); this.clientRpc.TraceSource = new TraceSource("Client", SourceLevels.Information); this.serverRpc.TraceSource.Listeners.Add(new XunitTraceListener(this.Logger)); this.clientRpc.TraceSource.Listeners.Add(new XunitTraceListener(this.Logger)); this.clientRpc.StartListening(); this.serverRpc.StartListening(); }
public RemoteTargetJsonRpc(IJsonRpcMessageHandler messageHandler) : base(messageHandler) { }
public RemoteTargetJsonRpc(IJsonRpcMessageHandler messageHandler, object?target) : base(messageHandler, target) { }
public DelegatedJsonRpc(IJsonRpcMessageHandler handler) : base(handler) { }
public DelegatedJsonRpc(IJsonRpcMessageHandler handler, object target) : base(handler, target) { }
public JsonRpcWithStringIds(IJsonRpcMessageHandler handler) : base(handler) { }
public JsonRpcWithFatalExceptions(IJsonRpcMessageHandler messageHandler, object target = null) : base(messageHandler, target) { this.IsFatalExceptionCount = 0; }
protected override JsonRpc CreateJsonRpc(IJsonRpcMessageHandler handler) { return(new NuGetJsonRpc(handler)); }
internal NuGetJsonRpc(IJsonRpcMessageHandler messageHandler) : base(messageHandler) { }