Created
July 30, 2010 18:29
-
-
Save hammerdr/501071 to your computer and use it in GitHub Desktop.
This file contains 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
var result = obj.createResult(resultType); | |
result.add(new LineItem("A")); | |
result.add(new LineItem("B")); | |
Utility.populate(dependency, obj, "C", "D", "E"); | |
result.add(new LineItem("F"); | |
return result; |
This file contains 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
var result = obj.createResult(resultType, | |
new LineItem("A"), | |
new LineItem("B")); | |
Utility.populate(dependency, obj, "C", "D", "E"); | |
result.add(new LineItem("F")); | |
return result; | |
// populate returns void | |
// createResult(ResultType, params LineItem[] lineItems) |
This file contains 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
var result = obj.createResult(resultType, new List<LineItem> | |
{ | |
new LineItem("A"), | |
new LineItem("B")) | |
}.Union(CThoughE(dependency, | |
"C", | |
"D", | |
"E") | |
).Union(new List<ListItem> | |
{ | |
new LineItem("F") | |
}; | |
return result; | |
// CThoughE is a new method I created that returns IEnumerable (the utility function returned void) | |
// createResult(ResultType, IEnumerable<LineItem>) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment