Skip to content

Commit 05c0c28

Browse files
committed
type for empty elements
1 parent 3bd23f0 commit 05c0c28

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

src/SimpleStateMachine.StructuralSearch/FindParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace SimpleStateMachine.StructuralSearch
88
{
99
public class FindParser : IFindParser
1010
{
11-
public static readonly IFindParser Empty = new EmptyFindParser();
11+
public static readonly EmptyFindParser Empty = new ();
1212

1313
private SeriesParser Parser { get; }
1414
public FindParser(SeriesParser parser)

src/SimpleStateMachine.StructuralSearch/Input/Input.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ namespace SimpleStateMachine.StructuralSearch
44
{
55
public static class Input
66
{
7-
public static readonly IInput Empty = new EmptyInput();
8-
public static IInput String(string input) => new StringInput(input);
9-
public static IInput File(FileInfo fileInfo) => new FileInput(fileInfo);
7+
public static readonly EmptyInput Empty = new ();
8+
public static StringInput String(string input) => new (input);
9+
public static FileInput File(FileInfo fileInfo) => new (fileInfo);
1010
}
1111
}

src/SimpleStateMachine.StructuralSearch/ParsingContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace SimpleStateMachine.StructuralSearch
55
{
66
public class ParsingContext : IParsingContext
77
{
8-
public static IParsingContext Empty = new EmptyParsingContext(SimpleStateMachine.StructuralSearch.Input.Empty);
8+
public static readonly EmptyParsingContext Empty = new (SimpleStateMachine.StructuralSearch.Input.Empty);
99

1010
public ParsingContext(IInput input)
1111
{

src/SimpleStateMachine.StructuralSearch/Rules/FindRule/EmptyRule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ public void SetContext(ref IParsingContext context)
1414

1515
public static class Rule
1616
{
17-
public static readonly IRule Empty = new EmptyRule();
17+
public static readonly EmptyRule Empty = new();
1818
}

src/SimpleStateMachine.StructuralSearch/Rules/ReplaceRule/ReplaceRule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace SimpleStateMachine.StructuralSearch
55
{
66
public class ReplaceRule : IReplaceRule
77
{
8-
public static readonly IReplaceRule Empty = new EmptyReplaceRule();
8+
public static readonly EmptyReplaceRule Empty = new ();
99

1010
public IEnumerable<ReplaceSubRule> Rules { get; }
1111
public IRule ConditionRule { get; }

src/SimpleStateMachine.StructuralSearch/Templates/ReplaceTemplate/ReplaceBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace SimpleStateMachine.StructuralSearch.ReplaceTemplate
66
{
77
public class ReplaceBuilder : IReplaceBuilder
88
{
9-
public static readonly IReplaceBuilder Empty = new EmptyReplaceBuilder();
9+
public static readonly EmptyReplaceBuilder Empty = new ();
1010

1111
public IEnumerable<IRuleParameter> Steps { get; }
1212

0 commit comments

Comments
 (0)