Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. public class Pipeline
  2. {
  3. private IPipeObject _pipeStart, _pipeEnd;
  4.  
  5. public Pipeline Append(IPipeObject pipe)
  6. {
  7. if (_pipeStart == null)
  8. _pipeStart = pipe;
  9.  
  10. if (_pipeEnd != null)
  11. _pipeEnd.NextPipe = pipe;
  12.  
  13. _pipeEnd = pipe;
  14. return this;
  15. }
  16. public void Start(object state = null)
  17. {
  18. _pipeStart.Invoke(state);
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement