public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result) { if (this.TryInvokeFunction(binder.Name, () => binder.ArgumentsToDictionary(args), out result)) return true; if (new AdapterMethodDynamicInvoker(GetAdapter()).TryInvokeMember(binder, args, out result)) return true; return base.TryInvokeMember(binder, args, out result); }
public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result) { var adapterWithFunctions = GetAdapter() as IAdapterWithFunctions; if (adapterWithFunctions != null && adapterWithFunctions.IsValidFunction(binder.Name)) { var command = new ExecuteFunctionCommand(GetDatabase(), adapterWithFunctions, binder.Name, binder.ArgumentsToDictionary(args)); return command.Execute(out result); } return base.TryInvokeMember(binder, args, out result); }