public DataReport(DataReport dataReport)
 {
     TotalTests = dataReport.TotalTests;
     if (dataReport.TestReports != null)
     {
         foreach (var testReport in dataReport.TestReports)
         {
             TestReports.Add(new TestCaseReport(testReport));
         }
     }
 }
 public DataEvent(DataEvent dataEvent)
 {
     // clone the entire object
     if (dataEvent.Runtime != null)
     {
         Runtime = new string(dataEvent.Runtime.ToCharArray());
     }
     if (dataEvent.RuntimeVersion != null)
     {
         RuntimeVersion = new string(dataEvent.RuntimeVersion.ToCharArray());
     }
     Event = dataEvent.Event;
     if (dataEvent.Id != null)
     {
         Id = new string(dataEvent.Id.ToCharArray());
     }
     if (dataEvent.ParentId != null)
     {
         ParentId = new string(dataEvent.ParentId.ToCharArray());
     }
     if (dataEvent.TestSuite != null)
     {
         TestSuite = new string(dataEvent.TestSuite.ToCharArray());
     }
     if (dataEvent.TestName != null)
     {
         TestName = new string(dataEvent.TestName.ToCharArray());
     }
     if (dataEvent.FullName != null)
     {
         FullName = new string(dataEvent.FullName.ToCharArray());
     }
     if (dataEvent.TestType != null)
     {
         TestType = new string(dataEvent.TestType.ToCharArray());
     }
     TestResult   = dataEvent.TestResult;
     TestStatus   = dataEvent.TestStatus;
     StartTime    = dataEvent.StartTime;
     EndTime      = dataEvent.EndTime;
     Duration     = dataEvent.Duration;
     Passed       = dataEvent.Passed;
     Failed       = dataEvent.Failed;
     Warnings     = dataEvent.Warnings;
     Skipped      = dataEvent.Skipped;
     Asserts      = dataEvent.Asserts;
     IsSkipped    = dataEvent.IsSkipped;
     Inconclusive = dataEvent.Inconclusive;
     TestCount    = dataEvent.TestCount;
     if (dataEvent.TestOutput != null)
     {
         TestOutput = new string(dataEvent.TestOutput.ToCharArray());
     }
     if (dataEvent.ErrorMessage != null)
     {
         ErrorMessage = new string(dataEvent.ErrorMessage.ToCharArray());
     }
     if (dataEvent.StackTrace != null)
     {
         StackTrace = new string(dataEvent.StackTrace.ToCharArray());
     }
     if (dataEvent.Report != null)
     {
         Report = new DataReport(dataEvent.Report);
     }
     RunNumber = dataEvent.RunNumber;
 }