Beispiel #1
0
 public void Set(MethodParameterTypeNames value)
 {
     Parameters                 = value.Parameters;
     MethodReturnType           = value.MethodReturnType;
     IsSerializeReferenceMember = value.IsSerializeReferenceMember;
     IsSerializeBox             = value.IsSerializeBox;
     Index = value.Index;
 }
Beispiel #2
0
 /// <summary>
 /// 获取函数参数匹配信息
 /// </summary>
 /// <param name="methodParameters"></param>
 /// <param name="types"></param>
 /// <returns></returns>
 public static          MethodParameterPair[] Get(MethodParameter[] methodParameters, MethodParameterTypeNames types)
 {
     MethodParameterPair[] parameters = get(methodParameters, types.Parameters);
     for (int index = 0, endIndex = methodParameters.Length - 1; index < endIndex; ++index)
     {
         MethodParameter methodParameter = methodParameters[index];
         for (int copyIndex = index; true; ++copyIndex)
         {
             MethodParameter copyParameter = parameters[copyIndex].Parameter;
             if (methodParameter.ParameterType == copyParameter.ParameterType && methodParameter.ParameterName == copyParameter.ParameterName)
             {
                 if (index != copyIndex)
                 {
                     parameters[copyIndex].Parameter = parameters[index].Parameter;
                     parameters[index].Parameter     = copyParameter;
                 }
                 break;
             }
         }
     }
     return(parameters);
 }