...
Code Block | ||||
---|---|---|---|---|
| ||||
IInputItem consumerThatIsAsking; consumerThatIsAsking.TimeSet.Times[0] = requiredTime; while (!providingOutputItem.IsAvailable(consumerThatIsAsking)) { providingOutputItem.Component.Update(); } values = providingOutputItem.Values; |
Related issue : The code above is actually representing the original 1.4 GetValues() call. So it might be wise, to put emphasis again on the still working 'pull approach', introduce this getValues() call:
Code Block | ||||
---|---|---|---|---|
| ||||
values = providingOutputItem.GetValues(consumerThatIsAsking); |
This is considered to be a useful extension. It is a convenient method, and it explitly shows the pull approach, so we will add it .
(It might even be considered to move the method to the LinkableComponent (see (See also Gena's suggestion on loop vs. pull later on this page).
...