@@ -14,9 +14,7 @@ public class LineAttribute : Attribute
1414 /// <summary>
1515 /// 将该内容转换成Line
1616 /// </summary>
17- public LineAttribute ( )
18- {
19- }
17+ public LineAttribute ( ) { }
2018 /// <summary>
2119 /// 将改内容转换成Line
2220 /// </summary>
@@ -25,13 +23,14 @@ public LineAttribute()
2523 /// <param name="name">指定名称</param>
2624 /// <param name="iLineType">如果为类,指定转换ILine的类型,默认为T</param>
2725 /// <param name="fourceToString">强制转换内容为String (多用于当前类为Sub)</param>
28- public LineAttribute ( ConvertType type = ConvertType . Default , Type ? converter = null , string ? name = null , Type ? iLineType = null , bool fourceToString = false )
26+ public LineAttribute ( ConvertType type = ConvertType . Default , Type ? converter = null , string ? name = null , Type ? iLineType = null , bool fourceToString = false , bool ignoreCase = false )
2927 {
3028 Type = type ;
3129 Converter = converter ;
3230 Name = name ;
3331 ILineType = iLineType ;
3432 FourceToString = fourceToString ;
33+ IgnoreCase = ignoreCase ;
3534 }
3635 /// <summary>
3736 /// 自定义转换方法
@@ -71,8 +70,7 @@ public LineAttribute(ConvertType type = ConvertType.Default, Type? converter = n
7170 /// <returns>转换结果</returns>
7271 public T ConvertToLine < T > ( string name , object ? value , bool fourceToString = false ) where T : ILine , new ( )
7372 {
74-
75- string ln = Name == null ? name : Name ;
73+ string ln = Name ?? name ;
7674 //如果为null储存空
7775 if ( value == null )
7876 {
@@ -94,5 +92,9 @@ public LineAttribute(ConvertType type = ConvertType.Default, Type? converter = n
9492 return LPSConvert . GetObjectLine < T > ( value , ln , Type , this ) ;
9593 }
9694 }
95+ /// <summary>
96+ /// 忽略大小写
97+ /// </summary>
98+ public bool IgnoreCase { get ; set ; } = false ;
9799 }
98100}
0 commit comments