/// <summary>
 /// 添加参数
 /// </summary>
 /// <param name="type">参数类型</param>
 /// <param name="key">参数名字</param>
 /// <returns></returns>
 public T Param(Type type, string key)
 {
     ParametersTypes.Add(type);
     if (type != null && type.IsGenericType)
     {
         UsingRecoder.Add(GenericTypeOperator.GetTypes(type));
     }
     UsingRecoder.Add(type);
     ParametersMappings.Add(new KeyValuePair <Type, string>(type, key));
     return(Link);
 }
Esempio n. 2
0
 public T Return(Type type = null)
 {
     if (type == null)
     {
         type = typeof(void);
     }
     ReturnType = type;
     if (type.IsGenericType)
     {
         UsingRecoder.Add(GenericTypeOperator.GetTypes(type));
     }
     UsingRecoder.Add(type);
     ReturnScript = NameReverser.GetName(type) + " ";
     return(Link);
 }