Skip to content

Commit 07ad523

Browse files
author
linzhijun
committed
标准化
1 parent 2b5680a commit 07ad523

File tree

11 files changed

+25
-15
lines changed

11 files changed

+25
-15
lines changed

csharp/ToolGood.Algorithm/AlgorithmEngineHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ public static bool IsKeywords(string parameter)
306306
/// <param name="exp"></param>
307307
/// <returns></returns>
308308
/// <exception cref="Exception"></exception>
309-
public static DiyNameInfo GetDiyNames(String exp)
309+
public static DiyNameInfo GetDiyNames(string exp)
310310
{
311311
if (string.IsNullOrWhiteSpace(exp)) {
312312
throw new Exception("Parameter exp invalid !");

csharp/ToolGood.Algorithm/DiyNameInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ public sealed class DiyNameInfo
1616
/// <summary>
1717
/// 自定义方法
1818
/// </summary>
19-
public List<String> Functions { get; private set; }
19+
public List<string> Functions { get; private set; }
2020

2121
/// <summary>
2222
/// 自定义类型
2323
/// </summary>
2424
public DiyNameInfo()
2525
{
2626
Parameters = new List<ParameterInfo>();
27-
Functions = new List<String>();
27+
Functions = new List<string>();
2828
}
2929
}
3030

csharp/ToolGood.Algorithm/Internals/Base64.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static byte[] FromBase64ForUrlString(string base64ForUrlInput)
5858
}
5959
var len = sb.Length;
6060
int padChars = (len % 4) == 0 ? 0 : (4 - (len % 4));
61-
if (padChars > 0) sb.Append(String.Empty.PadRight(padChars, '='));
61+
if (padChars > 0) sb.Append(string.Empty.PadRight(padChars, '='));
6262
return Convert.FromBase64String(sb.ToString());
6363
}
6464
}

csharp/ToolGood.Algorithm/Internals/ConditionTree.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public sealed class ConditionTree
3838
/// <summary>
3939
/// 出错信息
4040
/// </summary>
41-
public String ErrorMessage { get; internal set; }
41+
public string ErrorMessage { get; internal set; }
4242

4343
internal ConditionTree()
4444
{

csharp/ToolGood.Algorithm/Internals/Functions/FunctionBase.string.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public override Operand Evaluate(AlgorithmEngine work, Func<string, Operand> tem
1818
return Operand.Create(F_base_ToDBC(args1.TextValue));
1919
}
2020

21-
private static String F_base_ToDBC(String input)
21+
private static string F_base_ToDBC(string input)
2222
{
2323
var sb = new StringBuilder(input);
2424
for (int i = 0; i < input.Length; i++) {
@@ -50,7 +50,7 @@ public override Operand Evaluate(AlgorithmEngine work, Func<string, Operand> tem
5050
return Operand.Create(F_base_ToSBC(args1.TextValue));
5151
}
5252

53-
private static String F_base_ToSBC(String input)
53+
private static string F_base_ToSBC(string input)
5454
{
5555
var sb = new StringBuilder(input);
5656
for (int i = 0; i < input.Length; i++) {

csharp/ToolGood.Algorithm/LitJson/JsonData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ void IJsonWrapper.SetJsonType(JsonType type)
144144
break;
145145

146146
case JsonType.String:
147-
inst_string = default(String);
147+
inst_string = default(string);
148148
break;
149149

150150
case JsonType.Double:

csharp/ToolGood.Algorithm/LitJson/JsonException.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ namespace ToolGood.Algorithm.LitJson
55
internal sealed class JsonException : ApplicationException
66
{
77
internal JsonException(ParserToken token, Exception inner_exception) :
8-
base(String.Format("Invalid token '{0}' in input string", token), inner_exception)
8+
base(string.Format("Invalid token '{0}' in input string", token), inner_exception)
99
{
1010
}
1111

1212
internal JsonException(int c) :
13-
base(String.Format("Invalid character '{0}' in input string", (char)c))
13+
base(string.Format("Invalid character '{0}' in input string", (char)c))
1414
{
1515
}
1616

csharp/ToolGood.Algorithm/MyDate.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public MyDate(decimal num)
141141
/// </summary>
142142
/// <param name="txt"></param>
143143
/// <returns></returns>
144-
public static MyDate Parse(String txt)
144+
public static MyDate Parse(string txt)
145145
{
146146
var cultureInfo = CultureInfo.InvariantCulture;// CultureInfo.GetCultureInfo("zh-cn");
147147
var t = txt.Trim();

csharp/ToolGood.Algorithm/Operand.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ public abstract class Operand
130130
/// </summary>
131131
public abstract OperandType Type { get; }
132132

133+
#region Value
134+
133135
/// <summary>
134136
/// 数字值
135137
/// </summary>
@@ -172,6 +174,8 @@ public abstract class Operand
172174
/// </summary>
173175
public virtual MyDate DateValue => throw new NotImplementedException();
174176

177+
#endregion
178+
175179
#region Create
176180

177181
/// <summary>
@@ -443,6 +447,9 @@ public static Operand CreateNull()
443447
}
444448

445449
#endregion Create
450+
451+
#region 转化类型
452+
446453
/// <summary>
447454
/// 转数值类型
448455
/// </summary>
@@ -471,13 +478,13 @@ public static Operand CreateNull()
471478
/// <returns></returns>
472479
public virtual Operand ToBoolean(string errorMessage, params object[] args) { return Error(string.Format(errorMessage, args)); }
473480
/// <summary>
474-
/// 转String类型
481+
/// 转string类型
475482
/// </summary>
476483
/// <param name="errorMessage"></param>
477484
/// <returns></returns>
478485
public virtual Operand ToText(string errorMessage = null) { return Error(errorMessage ?? "Convert to string error!"); }
479486
/// <summary>
480-
/// 转String类型
487+
/// 转string类型
481488
/// </summary>
482489
/// <param name="errorMessage"></param>
483490
/// <param name="args"></param>
@@ -513,6 +520,8 @@ public static Operand CreateNull()
513520
/// <returns></returns>
514521
public virtual Operand ToArray(string errorMessage, params object[] args) { return Error(string.Format(errorMessage, args)); }
515522

523+
#endregion
524+
516525
#region Operand
517526

518527
#region number
@@ -673,6 +682,7 @@ public static implicit operator Operand(List<double> obj)
673682
}
674683

675684
#endregion Operand
685+
676686
}
677687

678688

csharp/ToolGood.Algorithm/UnitConversion/UnitFactorSynonyms.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ internal bool Contains(string synonym)
3636

3737
public override string ToString()
3838
{
39-
return String.Join(", ", _synonyms);
39+
return string.Join(", ", _synonyms);
4040
}
4141

4242
// Allow strings to be interpreted as a UnitDictionaryKey

0 commit comments

Comments
 (0)