Created
February 16, 2015 18:19
-
-
Save jrusbatch/a12798fa0dbc90538ce5 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
public IEnumerable<T> ConquerFile<T>(Stream stream) | |
{ | |
using (var reader = new PeekableTextReader(stream)) | |
{ | |
// find how big of an army we need | |
var conscriptInfo = _contextSurvey.AllOfTheLands<T>(reader); | |
// marshal the troops | |
var formation = _fileHelpersTypeDrafter.BuildPhalanx<T>(conscriptInfo); | |
// ATTACK! | |
var results = _fileSiegeMachine.Assault<T>(reader, formation); | |
foreach (var result in results) | |
{ | |
yield return result; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment