Пример #1
0
 public void SimpleUsage()
 {
     var instance = new TestService.TestClass ("foo");
     var object_id = ObjectStore.Instance.AddInstance (instance);
     var handler = new ClassMethodHandler (typeof(TestService.TestClass).GetMethod ("FloatToString"));
     Assert.AreEqual ("foo3.14159", handler.Invoke (new object[] { object_id, 3.14159f }));
 }
Пример #2
0
 public void DefaultArguments()
 {
     var instance = new TestService.TestClass ("foo");
     var object_id = ObjectStore.Instance.AddInstance (instance);
     var handler = new ClassMethodHandler (typeof(TestService.TestClass).GetMethod ("IntToString"));
     Assert.AreEqual ("foo42", handler.Invoke (new object[] { object_id, Type.Missing }));
 }