From 928b01441a6a71c610a6216bff6633a8f3bab82b Mon Sep 17 00:00:00 2001 From: Sinan Date: Mon, 24 Sep 2018 12:13:33 +0200 Subject: [PATCH 1/4] Update the projects Change to newer .Net Framework target version Remove missing packages.conf file as it is not neccessary Add the .vs directory to the .gitignore Add the connection configuration as static variables to make the test easier to adapt. Change the sleep statement to a user interaction. --- .gitignore | 1 + rsb-cil-test/Program.cs | 13 ++++++++----- rsb-cil-test/rsb-cil-test.csproj | 11 +++++------ rsb-cil/rsb-cil.csproj | 17 +++++------------ 4 files changed, 19 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index e0ef19f..4538713 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /rsb-cil-test/obj /rsb-cil-test/bin /packages +/.vs diff --git a/rsb-cil-test/Program.cs b/rsb-cil-test/Program.cs index 01f217e..313e9cd 100644 --- a/rsb-cil-test/Program.cs +++ b/rsb-cil-test/Program.cs @@ -19,8 +19,10 @@ namespace rsbciltest { class MainClass { + static readonly string host = "localhost"; + static readonly int port = 30010; - public static void PrintEvent(Event theEvent) + public static void PrintEvent(Event theEvent) { Console.WriteLine("Received new event: " + theEvent); Console.WriteLine(" Data: " + theEvent.Data); @@ -38,7 +40,8 @@ namespace rsbciltest static void Main(String[] args) { - BasicConfigurator.Configure(); + + BasicConfigurator.Configure(); var inConverters = buildConverterSelection(new List> { new Tuple("bool", new BoolConverter() ), @@ -50,11 +53,11 @@ namespace rsbciltest new Tuple(typeof(JointAngles), new ProtocolBufferConverter(JointAngles.Descriptor)) }); - var listener = new Listener(new InPushConnector(new BusClientConnection("localhost", 55555), new Scope("/"), inConverters)); + var listener = new Listener(new InPushConnector(new BusClientConnection(host, port), new Scope("/"), inConverters)); listener.EventReceived += new NewEventHandler(PrintEvent); listener.Activate(); - var informer = new Informer("/test/narf", new OutConnector(new BusClientConnection("localhost", 55555), + var informer = new Informer("/test/narf", new OutConnector(new BusClientConnection(host, port), outConverters)); Console.WriteLine(informer.Scope); informer.Activate(); @@ -72,7 +75,7 @@ namespace rsbciltest informer.Deactivate(); - Thread.Sleep(20000000); + Console.ReadKey(); listener.Deactivate(); diff --git a/rsb-cil-test/rsb-cil-test.csproj b/rsb-cil-test/rsb-cil-test.csproj index cbeb284..1c0c4c1 100644 --- a/rsb-cil-test/rsb-cil-test.csproj +++ b/rsb-cil-test/rsb-cil-test.csproj @@ -1,5 +1,5 @@ - - + + Debug AnyCPU @@ -8,7 +8,8 @@ rsbciltest rsb-cil-test rsbciltest.MainClass - v4.5 + v4.6.2 + true @@ -55,7 +56,5 @@ - - - + \ No newline at end of file diff --git a/rsb-cil/rsb-cil.csproj b/rsb-cil/rsb-cil.csproj index 977f705..041d042 100644 --- a/rsb-cil/rsb-cil.csproj +++ b/rsb-cil/rsb-cil.csproj @@ -1,5 +1,5 @@ - - + + Debug AnyCPU @@ -7,7 +7,8 @@ Library rsbcil rsb-cil - v4.5 + v4.6.2 + true @@ -65,13 +66,5 @@ - - - - - - - - - + \ No newline at end of file -- 2.14.2.windows.1