public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result) { if (this.TryInvokeFunction(binder.Name, () => binder.ArgumentsToDictionary(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 = _dataStrategy.GetAdapter() as IAdapterWithFunctions; if (adapterWithFunctions != null && adapterWithFunctions.IsValidFunction(binder.Name)) { var command = new ExecuteFunctionCommand(_dataStrategy.GetDatabase(), adapterWithFunctions, string.Format("{0}.{1}", _name, binder.Name), binder.ArgumentsToDictionary(args)); return(command.Execute(out result)); } return(base.TryInvokeMember(binder, args, out result)); }
public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result) { var adapterWithFunctions = Adapter 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)); }
public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result) { if (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)); }