Esempio n. 1
0
 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;
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 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;
                    };
 }
Esempio n. 4
0
        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;
            });
        }
Esempio n. 5
0
 public object Execute(DataStrategy dataStrategy, DynamicTable table, InvokeMemberBinder binder, object[] args)
 {
     return(dataStrategy.GetAdapter().Get(table.GetName(), args));
 }
Esempio n. 6
0
 public object Execute(DataStrategy dataStrategy, DynamicTable table, InvokeMemberBinder binder, object[] args)
 {
     return dataStrategy.GetAdapter().Get(table.GetName(), args);
 }