File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -21,17 +21,15 @@ public class Employee : IModel<Employee>
21
21
22
22
Create rules based on your models and use the fluent API to create composite rules from atomic constituents.
23
23
``` csharp
24
- public class MaxSalaryRule :
25
- StateRule <Employee >
24
+ public class MaxSalaryRule : StateRule <Employee >
26
25
{
27
26
public override bool IsSatisfied (Employee candidate )
28
27
{
29
28
return candidate .Salary < 40000 ;
30
29
}
31
30
}
32
31
33
- public class InHrDepartmentRule :
34
- StateRule <Employee >
32
+ public class InHrDepartmentRule : StateRule <Employee >
35
33
{
36
34
public override bool IsSatisfied (Employee candidate )
37
35
{
@@ -54,8 +52,7 @@ public class ApplySalaryRaise : Workflow<Employee>
54
52
{
55
53
private readonly IRepository <Employee > _repository ;
56
54
57
- public ApplySalaryRaise (I
58
- StateRule <Employee > rule , IRepository <Employee > repository )
55
+ public ApplySalaryRaise (IStateRule <Employee > rule , IRepository <Employee > repository )
59
56
: base (rule )
60
57
{
61
58
_repository = repository ;
You can’t perform that action at this time.
0 commit comments