Last active
January 17, 2019 22:16
-
-
Save MarcoNicolodi/d30354eecb48d6a899174d30de84c6f0 to your computer and use it in GitHub Desktop.
Chain of responsibility
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Request | |
{ | |
public Request(string code, bool approve, TrainingEvaluations evaluations, TrainningEffectiveness effectiveness) | |
{ | |
CriteriaHasEvaluation = evaluations.Find(x => x.EmployeeCode == code.Split('_')[0] && x.CriteriaCode == code.Split('_')[1]).Any(); | |
IsNew = code.Split('_')[1] == IEntity.NewCode; | |
Effectiveness = effectiveness.Find(x => x.EmployeeCode == code.Split('_')[0]); | |
HasEffectiveness = effectiveness.Any(); | |
Approve = approve; | |
} | |
public bool CriteriaHasEvaluation { get; } | |
public bool IsNew { get; } | |
public TrainingEffectiveness TrainingEffectiveness { get; } | |
public bool HasEffectiveness { get; } | |
public bool Approve { get; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment