Created
June 3, 2020 23:41
-
-
Save arunprabug/a48a3bf422087caf9279cf7bd947c42f to your computer and use it in GitHub Desktop.
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
class PerformanceReview | |
{ | |
private readonly Employee _employee; | |
public PerformanceReview(Employee employee) | |
{ | |
_employee = employee; | |
} | |
private IEnumerable<PeersData> LookupPeers() | |
{ | |
return db.lookup(_employee, 'peers'); | |
} | |
private ManagerData LookupManager() | |
{ | |
return db.lookup(_employee, 'manager'); | |
} | |
private IEnumerable<PeerReviews> GetPeerReviews() | |
{ | |
var peers = LookupPeers(); | |
// ... | |
} | |
public PerfReviewData PerfReview() | |
{ | |
GetPeerReviews(); | |
GetManagerReview(); | |
GetSelfReview(); | |
} | |
public ManagerData GetManagerReview() | |
{ | |
var manager = LookupManager(); | |
} | |
public EmployeeData GetSelfReview() | |
{ | |
// ... | |
} | |
} | |
var review = new PerformanceReview(employee); | |
review.PerfReview(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment