Skip to content

Commit 8540d54

Browse files
committed
fix
1 parent a1b62b6 commit 8540d54

File tree

6 files changed

+12
-30
lines changed

6 files changed

+12
-30
lines changed

src/SimpleStateMachine.StructuralSearch/Configuration.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ public bool Equals(Configuration? other)
1515
{
1616
if (other is null) return false;
1717
if (ReferenceEquals(this, other)) return true;
18-
return FindTemplate == other.FindTemplate
19-
&& NullableSequenceEqual(FindRules, other.FindRules)
20-
&& ReplaceTemplate == other.ReplaceTemplate
18+
return FindTemplate == other.FindTemplate
19+
&& NullableSequenceEqual(FindRules, other.FindRules)
20+
&& ReplaceTemplate == other.ReplaceTemplate
2121
&& NullableSequenceEqual(ReplaceRules, other.ReplaceRules);
2222
}
2323

@@ -30,9 +30,7 @@ public override bool Equals(object? obj)
3030
}
3131

3232
public override int GetHashCode()
33-
{
34-
return HashCode.Combine(FindTemplate, FindRules, ReplaceTemplate, ReplaceRules);
35-
}
33+
=> HashCode.Combine(FindTemplate, FindRules, ReplaceTemplate, ReplaceRules);
3634

3735
private static bool NullableSequenceEqual<TSource>(IEnumerable<TSource>? first, IEnumerable<TSource>? second)
3836
{

src/SimpleStateMachine.StructuralSearch/Input/StringInput.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ namespace SimpleStateMachine.StructuralSearch.Input;
66
public class StringInput(string str) : IInput
77
{
88
public TextReader ReadData()
9-
{
10-
return new StringReader(str);
11-
}
9+
=> new StringReader(str);
1210

1311
public string GetProperty(string propertyName)
1412
{

src/SimpleStateMachine.StructuralSearch/Operator/Logical/BinaryOperation.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ internal class BinaryOperation(ILogicalOperation left, LogicalBinaryOperator typ
88
: ILogicalOperation
99
{
1010
public bool IsApplicableForPlaceholder(string placeholderName)
11-
{
12-
return left.IsApplicableForPlaceholder(placeholderName) || right.IsApplicableForPlaceholder(placeholderName);
13-
}
11+
=> left.IsApplicableForPlaceholder(placeholderName) || right.IsApplicableForPlaceholder(placeholderName);
1412

1513
public bool Execute(ref IParsingContext context)
1614
{
@@ -30,7 +28,5 @@ public bool Execute(ref IParsingContext context)
3028
}
3129

3230
public override string ToString()
33-
{
34-
return $"{left}{Constant.Space}{type}{Constant.Space}{right}";
35-
}
31+
=> $"{left}{Constant.Space}{type}{Constant.Space}{right}";
3632
}

src/SimpleStateMachine.StructuralSearch/Operator/Logical/InOperation.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,5 @@ public bool Execute(ref IParsingContext context)
2929
}
3030

3131
public override string ToString()
32-
{
33-
return $"{parameter}{Constant.Space}{Constant.In}{Constant.Space}{string.Join(Constant.Comma, arguments)}";
34-
}
32+
=> $"{parameter}{Constant.Space}{Constant.In}{Constant.Space}{string.Join(Constant.Comma, arguments)}";
3533
}

src/SimpleStateMachine.StructuralSearch/Operator/Logical/StringCompareOperation.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ internal class StringCompareOperation(IParameter left, StringCompareOperator @op
1010
: ILogicalOperation
1111
{
1212
public bool IsApplicableForPlaceholder(string placeholderName)
13-
{
14-
return left.IsApplicableForPlaceholder(placeholderName) || right.IsApplicableForPlaceholder(placeholderName);
15-
}
13+
=> left.IsApplicableForPlaceholder(placeholderName) || right.IsApplicableForPlaceholder(placeholderName);
1614

1715
public bool Execute(ref IParsingContext context)
1816
{
@@ -30,7 +28,5 @@ public bool Execute(ref IParsingContext context)
3028
}
3129

3230
public override string ToString()
33-
{
34-
return $"{left}{Constant.Space}{@operator}{Constant.Space}{right}";
35-
}
31+
=> $"{left}{Constant.Space}{@operator}{Constant.Space}{right}";
3632
}

src/SimpleStateMachine.StructuralSearch/Operator/String/StringUnaryParameter.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ namespace SimpleStateMachine.StructuralSearch.Operator.String;
99
internal class StringUnaryParameter(IParameter parameter, StringUnaryOperator type) : IParameter
1010
{
1111
public bool IsApplicableForPlaceholder(string placeholderName)
12-
{
13-
return parameter.IsApplicableForPlaceholder(placeholderName);
14-
}
12+
=> parameter.IsApplicableForPlaceholder(placeholderName);
1513

1614
public string GetValue(ref IParsingContext context)
1715
{
@@ -29,7 +27,5 @@ public string GetValue(ref IParsingContext context)
2927
}
3028

3129
public override string ToString()
32-
{
33-
return $"{parameter}{Constant.Dote}{type}";
34-
}
30+
=> $"{parameter}{Constant.Dote}{type}";
3531
}

0 commit comments

Comments
 (0)