Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/SimpleStateMachine.StructuralSearch/FindParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace SimpleStateMachine.StructuralSearch
{
public class FindParser : IFindParser
{
public static readonly IFindParser Empty = new EmptyFindParser();
public static readonly EmptyFindParser Empty = new ();

private SeriesParser Parser { get; }
public FindParser(SeriesParser parser)
Expand Down
6 changes: 3 additions & 3 deletions src/SimpleStateMachine.StructuralSearch/Input/Input.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ namespace SimpleStateMachine.StructuralSearch
{
public static class Input
{
public static readonly IInput Empty = new EmptyInput();
public static IInput String(string input) => new StringInput(input);
public static IInput File(FileInfo fileInfo) => new FileInput(fileInfo);
public static readonly EmptyInput Empty = new ();
public static StringInput String(string input) => new (input);
public static FileInput File(FileInfo fileInfo) => new (fileInfo);
}
}
2 changes: 1 addition & 1 deletion src/SimpleStateMachine.StructuralSearch/ParsingContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace SimpleStateMachine.StructuralSearch
{
public class ParsingContext : IParsingContext
{
public static IParsingContext Empty = new EmptyParsingContext(SimpleStateMachine.StructuralSearch.Input.Empty);
public static readonly EmptyParsingContext Empty = new (SimpleStateMachine.StructuralSearch.Input.Empty);

public ParsingContext(IInput input)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ public void SetContext(ref IParsingContext context)

public static class Rule
{
public static readonly IRule Empty = new EmptyRule();
public static readonly EmptyRule Empty = new();
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace SimpleStateMachine.StructuralSearch
{
public class ReplaceRule : IReplaceRule
{
public static readonly IReplaceRule Empty = new EmptyReplaceRule();
public static readonly EmptyReplaceRule Empty = new ();

public IEnumerable<ReplaceSubRule> Rules { get; }
public IRule ConditionRule { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace SimpleStateMachine.StructuralSearch.ReplaceTemplate
{
public class ReplaceBuilder : IReplaceBuilder
{
public static readonly IReplaceBuilder Empty = new EmptyReplaceBuilder();
public static readonly EmptyReplaceBuilder Empty = new ();

public IEnumerable<IRuleParameter> Steps { get; }

Expand Down