Esempio n. 1
0
        private static List <Charge> GetAsyncReturn(CallInfo info)
        {
            string cpf            = info.Args()[0] as string;
            short? referenceMonth = info.Args()[1] as short?;

            return(Charges.Where(it => it.Cpf == cpf || it.Maturity.Month == referenceMonth).ToList());
        }
Esempio n. 2
0
        /// <summary>
        /// The act set.
        /// </summary>
        /// <param name="info">
        /// The info.
        /// </param>
        private void ActSet(CallInfo info)
        {
            object[] os = info.Args();
            var      s1 = (string)os[0];
            var      s2 = (string)os[1];
            var      s3 = (string)os[2];
            string   s  = s1 + "." + s2;

            dict[s] = s3;
        }
        public void InvokePerArgumentActions(CallInfo callInfo)
        {
            var arguments = callInfo.Args();
            var argSpecs = _argumentSpecifications;

            for (var i = 0; i < arguments.Length; i++)
            {
                argSpecs[i].RunAction(arguments[i]);
            }
        }
Esempio n. 4
0
        /// <summary>
        /// The fun get.
        /// </summary>
        /// <param name="info">
        /// The info.
        /// </param>
        /// <returns>
        /// The <see cref="string"/>.
        /// </returns>
        private string FunGet(CallInfo info)
        {
            object[] os = info.Args();
            var      s1 = (string)os[0];
            var      s2 = (string)os[1];
            string   s  = s1 + "." + s2;

            if (dict.ContainsKey(s))
            {
                return(dict[s]);
            }

            return(string.Empty);
        }
 static void CallActionArgument(CallInfo c, MemoryStream ms)
 {
     ((Func <Stream, long>)c.Args()[1])(ms);
 }
 public static T Arg <T>(this CallInfo callInfo, int index)
 {
     return((T)callInfo.Args()[index]);
 }
 static void CallActionArgument(CallInfo c, MemoryStream ms)
 {
     ((Func<Stream, long>)c.Args()[1])(ms);
 }
Esempio n. 8
0
 public void Should_create_info_with_arguments_from_call()
 {
     Assert.That(_result.Args(), Is.EqualTo(_callArguments));
 }
 private void RepositoryUpdateFields(CallInfo callInfo, out bool save1Called, out Newspaper savedModel)
 {
     save1Called = true;
     savedModel = (Newspaper) (callInfo.Args()[0]);
 }