public void Server_Method_Invocation(int valueInt, string valueString, Unit unit)
        {
            EventHandler <Part> onDetect = (sender, e) => {
                Debug.WriteLine($"{e.GetType().ToString()} detected: {e}");
                Assert.NotNull(e);
            };

            RemotingServer server = this._Provider.GetRequiredService <RemotingServer>();

            server.Start();

            IRemotingClient client = this._Provider.GetRequiredService <IRemotingClient>();

            client.CheckBindings();

            IMyService service = this._Provider.GetRequiredService <IMyService>();

            service.OnSomeBDetect += onDetect;

            Assert.NotNull(service.Do(valueInt, valueString, unit));

            client.Dispose();
            server.Stop();
        }
Exemple #2
0
        public IHttpActionResult Post()
        {
            _service.Do();

            return(Ok());
        }