private static void Main( string[] args )
 {
     try
     {
         Arguments arguments = Arguments.ProcessArguments( args, new FileSystemService( ) ) ;
         Trace.TraceInformation( "Beginning documentation generation run at {0}".Inject( DateTime.Now.ToShortTimeString( ) ) ) ;
         var parser = new XmlDocParser( arguments.XmlDocs, arguments.TargetType ) {TargetAssembly = arguments.TargetAssembly} ;
         IEnumerable<XDocument> cleanedDocs = parser.Parse( ) ;
         var writer = new BatchWriter( cleanedDocs ) ;
         writer.Write( arguments.OutputDirectory ) ;
         Trace.TraceInformation( "Finished documentation generation run at {0}".Inject( DateTime.Now.ToShortTimeString( ) ) ) ;
     }
     catch ( ArgumentException e )
     {
         Console.WriteLine( e.Message ) ;
     }
     catch ( Exception e )
     {
         Trace.TraceInformation( "Documentation generation run failed at {0}".Inject( DateTime.Now.ToShortTimeString( ) ) ) ;
         Trace.TraceError( e.Message ) ;
         throw ;
     }
     //finally
     //{
     //    Console.ReadLine();
     //}
 }
 public void Should_throw_when_name_attribute_is_missing()
 {
     var docs = new List<XDocument> {new XDocument(new XElement("member"))};
     sut = new BatchWriter(docs) {FileSystemService = FileSystem};
     using (Record)
     {
         Expect
             .Call(FileSystem.DoesDirectoryExist(OutputDirectory))
             .Return(false);
     }
     using (PlayBack)
     {
         sut.Write(OutputDirectory);
     }
 }