Ejemplo n.º 1
0
 /// <summary>
 ///     构造函数
 /// </summary>
 /// <param name="type">进行比较的类类型</param>
 /// <param name="name">进行比较对象的属性名称</param>
 /// <param name="orderBy">比较方向(升序/降序)</param>
 public Reverser(Type type, string name, ReverserInfo.eumOrderBy orderBy = ReverserInfo.eumOrderBy.Desc)
 {
     this.type = type;
     info.Name = name;
     if (orderBy != ReverserInfo.eumOrderBy.Asc)
     {
         info.OrderBy = orderBy;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 ///     构造函数
 /// </summary>
 /// <param name="className">进行比较的类名称</param>
 /// <param name="name">进行比较对象的属性名称</param>
 /// <param name="orderBy">比较方向(升序/降序)</param>
 public Reverser(string className, string name, ReverserInfo.eumOrderBy orderBy = ReverserInfo.eumOrderBy.Desc)
 {
     if (className.IsNullOrEmpty() || name.IsNullOrEmpty())
     {
         return;
     }
     type         = Type.GetType(className, true);
     info.Name    = name;
     info.OrderBy = orderBy;
 }
Ejemplo n.º 3
0
 /// <summary>
 ///     构造函数
 /// </summary>
 /// <param name="className">进行比较的类名称</param>
 /// <param name="name">进行比较对象的属性名称</param>
 /// <param name="orderBy">比较方向(升序/降序)</param>
 public Reverser(string className, string name, ReverserInfo.eumOrderBy orderBy = ReverserInfo.eumOrderBy.Desc)
 {
     if (string.IsNullOrWhiteSpace(className) || string.IsNullOrWhiteSpace(name))
     {
         return;
     }
     type         = Type.GetType(className, true);
     info.Name    = name;
     info.OrderBy = orderBy;
 }
Ejemplo n.º 4
0
 /// <summary>
 ///     构造函数
 /// </summary>
 /// <param name="t">进行比较的类型的实例</param>
 /// <param name="name">进行比较对象的属性名称</param>
 /// <param name="orderBy">比较方向(升序/降序)</param>
 public Reverser(T t, string name, ReverserInfo.eumOrderBy orderBy = ReverserInfo.eumOrderBy.Desc)
 {
     type         = t.GetType();
     info.Name    = name;
     info.OrderBy = orderBy;
 }