Example #1
0
File: Pvm.cs Project: EricPL/UMvp
 /// <summary>
 /// <para>自动绑定K/v结构,个数必须为2的次幂</para>
 /// <para>并创建一个ParamsValue,绑定到当前Pvm</para>
 /// </summary>
 /// <param name="args">动态参数,K,V,K,V....</param>
 /// <returns>ParamsValue</returns>
 public static ParamsValue News(params object[] args)
 {
     int pl = args.Length % 2;
     if (pl != 0)
     {
         throw new Exception("PVM 参数匹配不正确");
     }
     ParamsValue pv = new ParamsValue();
     for (int i = 0; i < args.Length; i += 2)
     {
         pv[args[i].ToString()] = args[i + 1];
     }
     Bind(pv);
     return pv;
 }
Example #2
0
        /// <summary>
        /// <para>自动绑定K/v结构,个数必须为2的次幂</para>
        /// <para>并创建一个ParamsValue,绑定到当前Pvm</para>
        /// </summary>
        /// <param name="args">动态参数,K,V,K,V....</param>
        /// <returns>ParamsValue</returns>
        public static ParamsValue News(params object[] args)
        {
            int pl = args.Length % 2;

            if (pl != 0)
            {
                throw new Exception("PVM 参数匹配不正确");
            }
            ParamsValue pv = new ParamsValue();

            for (int i = 0; i < args.Length; i += 2)
            {
                pv[args[i].ToString()] = args[i + 1];
            }
            Bind(pv);
            return(pv);
        }
Example #3
0
File: Pvm.cs Project: EricPL/UMvp
 public static ParamsValue Bind(ParamsValue paramvalue)
 {
     _current = paramvalue;
     return Current;
 }
Example #4
0
 public static ParamsValue Bind(ParamsValue paramvalue)
 {
     _current = paramvalue;
     return(Current);
 }