diff options
author | John (J5) Palmieri <johnp@redhat.com> | 2006-07-14 16:20:12 +0000 |
---|---|---|
committer | John (J5) Palmieri <johnp@redhat.com> | 2006-07-14 16:20:12 +0000 |
commit | a929c9a3b465db8b7e17b9b39936c612c2621a7c (patch) | |
tree | d1764257d1bd56f8e6a044516ccfc9bc44f7f9f5 /mono/Test.cs | |
parent | 5efe8e7f1d97931710558495a951e0b35afbfb72 (diff) |
* Remove all bindings
Diffstat (limited to 'mono/Test.cs')
-rw-r--r-- | mono/Test.cs | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/mono/Test.cs b/mono/Test.cs deleted file mode 100644 index cb482cb0..00000000 --- a/mono/Test.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using System.Threading; -using DBus; -using Gtk; - -namespace DBus.Test -{ - public class Test - { - public static Service service = null; - public static Connection connection = null; - - public static int Main(string [] args) - { - TestServer testServer = new TestServer(); - Thread serverThread = new Thread(new ThreadStart(testServer.StartServer)); - serverThread.Start(); - - connection = Bus.GetSessionBus(); - service = Service.Get(connection, "org.freedesktop.Test"); - Thread.Sleep (1000); - - TestObject testObject = (TestObject) service.GetObject(typeof(TestObject), "/org/freedesktop/Test/TestObject"); - - Console.WriteLine ("Got object [{0}]", testObject); - - System.Console.WriteLine(testObject.Test1("Hello")); - - Console.WriteLine ("Got object [{0}]", testObject); - - //RunTests(testObject); - - return 0; - } - - public static void RunTests(TestObject testObject) - { - System.Console.WriteLine(testObject.Test1("Hello")); - } - } - - public class TestServer - { - public Connection connection; - public Service service; - - public TestServer() - { - Application.Init(); - - System.Console.WriteLine("Starting server..."); - - connection = Bus.GetSessionBus(); - service = new Service(connection, "org.freedesktop.Test"); - TestObject testObject = new TestObject(); - service.RegisterObject(testObject, "/org/freedesktop/Test/TestObject"); - - System.Console.WriteLine("Foo!"); - } - - public void StartServer() - { - Application.Run(); - } - } - - [Interface("org.freedesktop.Test.TestObject")] - public class TestObject - { - [Method] - public virtual int Test1(string x) - { - System.Console.WriteLine("Called: " + x); - return 5; - } - } -} |