public object Execute(DataStrategy dataStrategy, DynamicTable table, InvokeMemberBinder binder, object[] args) { var result = dataStrategy.Run.Get(table.GetName(), args); if (result == null || result.Count == 0) return null; return binder.Name.Equals("get", StringComparison.OrdinalIgnoreCase) ? new SimpleRecord(result, table.GetQualifiedName(), dataStrategy) : result.First().Value; }
public object Execute(DataStrategy dataStrategy, DynamicTable table, InvokeMemberBinder binder, object[] args) { var result = dataStrategy.Run.Get(table.GetName(), args); if (result == null || result.Count == 0) { return(null); } return(binder.Name.Equals("get", StringComparison.OrdinalIgnoreCase) ? new SimpleRecord(result, table.GetQualifiedName(), dataStrategy) : result.First().Value); }
public Func<object[], object> CreateDelegate(DataStrategy dataStrategy, DynamicTable table, InvokeMemberBinder binder, object[] args) { var func = dataStrategy.GetAdapter().OptimizingDelegateFactory.CreateGetDelegate(dataStrategy.GetAdapter(), table.GetName(), args); return a => { var data = func(a); return (data != null && data.Count > 0) ? new SimpleRecord(data, table.GetQualifiedName(), dataStrategy) : null; }; }
public Func <object[], object> CreateDelegate(DataStrategy dataStrategy, DynamicTable table, InvokeMemberBinder binder, object[] args) { var func = dataStrategy.GetAdapter().OptimizingDelegateFactory.CreateGetDelegate(dataStrategy.GetAdapter(), table.GetName(), args); return(a => { var data = func(a); return (data != null && data.Count > 0) ? new SimpleRecord(data, table.GetQualifiedName(), dataStrategy) : null; }); }
public object Execute(DataStrategy dataStrategy, DynamicTable table, InvokeMemberBinder binder, object[] args) { return(dataStrategy.GetAdapter().Get(table.GetName(), args)); }
public object Execute(DataStrategy dataStrategy, DynamicTable table, InvokeMemberBinder binder, object[] args) { return dataStrategy.GetAdapter().Get(table.GetName(), args); }