예제 #1
0
 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);
 }
예제 #2
0
        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));
        }
예제 #3
0
        internal bool TryInvokeFunction(String functionName, Func <IDictionary <String, Object> > getFunctionArguments, out object result)
        {
            var adapterWithFunctions = GetAdapter() as IAdapterWithFunctions;

            if (adapterWithFunctions != null && adapterWithFunctions.IsValidFunction(functionName))
            {
                var command = new ExecuteFunctionCommand(GetDatabase(), adapterWithFunctions, functionName, getFunctionArguments());
                return(command.Execute(out result));
            }
            result = null;
            return(false);
        }
예제 #4
0
        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));
        }
예제 #5
0
 protected internal override bool ExecuteFunction(out object result, ExecuteFunctionCommand command)
 {
     return(command.Execute(out result, _adapterTransaction));
 }
예제 #6
0
 protected internal override bool ExecuteFunction(out object result, ExecuteFunctionCommand command)
 {
     return command.Execute(out result, _adapterTransaction);
 }
예제 #7
0
 protected internal override bool ExecuteFunction(out object result, ExecuteFunctionCommand command)
 {
     return(_wrappedStrategy.ExecuteFunction(out result, command));
 }
예제 #8
0
 protected internal abstract bool ExecuteFunction(out object result, ExecuteFunctionCommand command);