Beispiel #1
0
 private void StartIpcServerSide()
 {
     // Start IPC server side, which can receive requests from a tmp GitMind process started by
     // git, when git requires credentials via the GIT_ASKPASS environment vartiable
     serverSideIpcService = new IpcRemotingService();
     serverSideIpcService.TryCreateServer(SessionId);
     serverSideIpcService.PublishService(new CredentialIpcService(this));
 }
Beispiel #2
0
        public void Test()
        {
            string id = Guid.NewGuid().ToString();

            using (IpcRemotingService ipcServerService = new IpcRemotingService())
            {
                Assert.IsTrue(ipcServerService.TryCreateServer(id));

                ipcServerService.PublishService(new ServerSide());

                using (IpcRemotingService ipcClientService = new IpcRemotingService())
                {
                    string request  = "Some request text";
                    string response = ipcClientService.CallService <ServerSide, string>(
                        id, service => service.DoubleText(request));

                    Assert.AreEqual(request + request, response);
                }
            }
        }