Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class SimpleServiceWithoutOCP
- {
- public void DoSomeWork()
- {
- var stuff = CallTheRepositoryForSomeStuff();
- foreach(var thing in stuff)
- DoSomething(thing);
- }
- private IList<Stuff> CallTheRepositoryForSomeStuff()
- {
- return Repository.GetStuff();
- }
- private void DoSomething(Stuff stuff)
- {
- //doesn't matter what's here
- }
- }
Add Comment
Please, Sign In to add comment