Ejemplo n.º 1
0
 private void CheckInvokeMethod(object instance)
 {
     var result = new TypedValue();
     runtime.TryInvoke(processor, new TypedValue(instance), "methodwithparms", new TreeList<string>().AddBranchValue("stuff"), ref result);
     Assert.AreEqual(typeof (string), result.Type);
     Assert.AreEqual("samplestuff", result.Value);
 }
Ejemplo n.º 2
0
 public static RuntimeMember GetInstance(TypedValue instance, string memberName, int parameterCount)
 {
     RuntimeMember runtimeMember = FindInstance(instance.Value, memberName, parameterCount);
     if (runtimeMember == null) throw new MemberMissingException(instance.Type, memberName, parameterCount);
     return runtimeMember;
 }