Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Pipeline
- {
- private IPipeObject _pipeStart, _pipeEnd;
- public Pipeline Append(IPipeObject pipe)
- {
- if (_pipeStart == null)
- _pipeStart = pipe;
- if (_pipeEnd != null)
- _pipeEnd.NextPipe = pipe;
- _pipeEnd = pipe;
- return this;
- }
- public void Start(object state = null)
- {
- _pipeStart.Invoke(state);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement