title: C# custom HTMLReporting using Singleton Class
body: <p>I want to write a customized HTML report for my sanity test automation. So, this is what I have in my mind:</p>
  
  <ol>
  <li>Create a Singleton Class (Jon Skeet's version of a thread safe
  Singleton with fully lazy instantiation in C#)</li>
  <li>Create a method to create a HTML file <strong>inside</strong> the constructor (So
  the HTML file is created only once when the single constructor is
  called)</li>
  <li>Through out my code, I can call the HTML write() or append() method
  to write data into my HTML file</li>
  </ol>
  
  <p>Do you see any problem with my logic? If it is so naive and a bad practice, can you please point me to some examples that write HTML reports in C# so I can adapt it in my project?</p>
  
  <p>Thank you!</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>So, when i say custom reporting this is what I am thinking...</p>
  
  <p>A MasterIndex.HTML - that will have a list of all scenarios I have run. Each of the item in this list are clickable.
  Multiple detailed HTML reports - When I click on each of the items/scenarios on my MasterIndex file, it will take me to another html with the steps I have done to execute that test scenario with Pass/Fail.</p>