Skip to content

Commit 3d46eba

Browse files
committed
placeholder sub property
1 parent 365d228 commit 3d46eba

File tree

13 files changed

+187
-46
lines changed

13 files changed

+187
-46
lines changed

src/SimpleStateMachine.StructuralSearch.Sandbox/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ internal static class Program
1111
{
1212
static void Main(string[] args)
1313
{
14-
var rule = StructuralSearch.ParseFindRule("$var$ equals $var$.Lenght and ");
14+
var rule = StructuralSearch.ParseFindRule("$var$ equals $var$.Lenght and Not StartsWith \"123\"");
15+
var rule2 = StructuralSearch.ParseFindRule("$var$ equals $var$.Offset.Start and Not StartsWith \"123\"");
1516
var result1 = rule.Execute("test");
1617
var result2 = rule.Execute("10");
1718
var result3 = rule.Execute("5.3");
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace SimpleStateMachine.StructuralSearch.Rules
2+
{
3+
public enum ColumnProperty
4+
{
5+
Start = 0,
6+
End
7+
}
8+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
namespace SimpleStateMachine.StructuralSearch.Rules
2+
{
3+
public enum FileProperty
4+
{
5+
Path = 0,
6+
Data,
7+
Name,
8+
Directory,
9+
Lenght
10+
}
11+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace SimpleStateMachine.StructuralSearch.Rules
2+
{
3+
public enum LineProperty
4+
{
5+
Start = 0,
6+
End
7+
}
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace SimpleStateMachine.StructuralSearch.Rules
2+
{
3+
public enum OffsetProperty
4+
{
5+
Start = 0,
6+
End
7+
}
8+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
namespace SimpleStateMachine.StructuralSearch.Rules
2+
{
3+
public class PlaceholderColumnParameter : IRuleParameter
4+
{
5+
public PlaceholderParameter PlaceholderParameter { get; }
6+
public ColumnProperty Property { get; }
7+
8+
public PlaceholderColumnParameter(PlaceholderParameter parameter, ColumnProperty property)
9+
{
10+
PlaceholderParameter = parameter;
11+
Property = property;
12+
}
13+
14+
public string GetValue()
15+
{
16+
throw new System.NotImplementedException();
17+
}
18+
}
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
namespace SimpleStateMachine.StructuralSearch.Rules
2+
{
3+
public class PlaceholderFileParameter : IRuleParameter
4+
{
5+
public PlaceholderParameter PlaceholderParameter { get; }
6+
public FileProperty Property { get; }
7+
8+
public PlaceholderFileParameter(PlaceholderParameter parameter, FileProperty property)
9+
{
10+
PlaceholderParameter = parameter;
11+
Property = property;
12+
}
13+
14+
public string GetValue()
15+
{
16+
throw new System.NotImplementedException();
17+
}
18+
}
19+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System;
2+
3+
namespace SimpleStateMachine.StructuralSearch.Rules
4+
{
5+
public class PlaceholderLenghtParameter: IRuleParameter
6+
{
7+
public PlaceholderParameter PlaceholderParameter { get; }
8+
public PlaceholderProperty Property { get; }
9+
10+
public PlaceholderLenghtParameter(PlaceholderParameter parameter, PlaceholderProperty property)
11+
{
12+
PlaceholderParameter = parameter;
13+
Property = property;
14+
}
15+
16+
public string GetValue()
17+
{
18+
throw new System.NotImplementedException();
19+
}
20+
}
21+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
namespace SimpleStateMachine.StructuralSearch.Rules
2+
{
3+
public class PlaceholderLineParameter : IRuleParameter
4+
{
5+
public PlaceholderParameter PlaceholderParameter { get; }
6+
public LineProperty Property { get; }
7+
8+
public PlaceholderLineParameter(PlaceholderParameter parameter, LineProperty property)
9+
{
10+
PlaceholderParameter = parameter;
11+
Property = property;
12+
}
13+
14+
public string GetValue()
15+
{
16+
throw new System.NotImplementedException();
17+
}
18+
}
19+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
namespace SimpleStateMachine.StructuralSearch.Rules
2+
{
3+
public class PlaceholderOffsetParameter : IRuleParameter
4+
{
5+
public PlaceholderParameter PlaceholderParameter { get; }
6+
public OffsetProperty Property { get; }
7+
8+
public PlaceholderOffsetParameter(PlaceholderParameter parameter, OffsetProperty property)
9+
{
10+
PlaceholderParameter = parameter;
11+
Property = property;
12+
}
13+
public string GetValue()
14+
{
15+
throw new System.NotImplementedException();
16+
}
17+
}
18+
}

0 commit comments

Comments
 (0)