public TypedValue Invoke(TypedValue instance, MemberName memberName, Tree <Cell> parameters)
        {
            var member = MemberQuery.FindDirectInstance(instance.Value, new MemberSpecification(memberName));

            return(member.ForValue(
                       v => v.Invoke(new object[] {}),
                       () => TypedValue.MakeInvalid(new MemberMissingException(instance.Type, memberName.Name, 0))));
        }
Example #2
0
 static Maybe <RuntimeMember> FindMember(TypedValue flowKeywords, MemberName memberName, Type type)
 {
     return(MemberQuery.FindDirectInstance(flowKeywords.Value,
                                           new MemberSpecification(memberName).WithParameterTypes(new[] { type })));
 }
 static Maybe <RuntimeMember> FindMember(object instance, MemberName memberName, Type type)
 {
     return(MemberQuery.FindDirectInstance(instance,
                                           new MemberSpecification(memberName).WithParameterTypes(new[] { type })));
 }