Skip to content

Instantly share code, notes, and snippets.

@codereflection
Created October 7, 2010 20:05
Show Gist options
  • Select an option

  • Save codereflection/615794 to your computer and use it in GitHub Desktop.

Select an option

Save codereflection/615794 to your computer and use it in GitHub Desktop.
public int Import(string filePathAndName)
{
if(!fileSystem.FileExists(filePathAndName))
throw new FileNotFoundException();
return fileSystem.ReadAllLines(filePathAndName)
.For()
.EachLineWeCareAbout<Message>(parser)
.Save(repo)
.Count();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment