Skip to content

Instantly share code, notes, and snippets.

@MarcoNicolodi
Last active January 22, 2019 11:10
Show Gist options
  • Save MarcoNicolodi/93aa6c556717575b5db64e37401a46e0 to your computer and use it in GitHub Desktop.
Save MarcoNicolodi/93aa6c556717575b5db64e37401a46e0 to your computer and use it in GitHub Desktop.
Chain of responsibility
protected string GetClass(string code, bool aprove)
{
var request = new Request(code, approve, TrainingEvaluations, TrainningEffectiveness);
var chain = new CriteriaHasEvaluation();
chain
.SetNext(new EffectivenessAssessmentPending())
.SetNext(new NewItem())
.SetNext(new CriteriaEvaluated());
var label = chain.Run(request);
return label.Value;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment