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); }
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; }