Esempio n. 1
0
 /// <summary>
 /// Registers the diagnostics batch.
 /// </summary>
 /// <remarks></remarks>
 private void RegisterDiagnosticsBatch()
 {
     try
     {
         var runId = Guid.NewGuid().ToString();
         var it    = DiagnosticsDomainGenerator.CreateNewBatch(runId);
         DiagnosticsProviderFactory
         .CreateProvider()
         .SaveRun(it);
         foreach (var rdit in
                  ActiveTests.Select(
                      diagnosticsInfo =>
                      DiagnosticsDomainGenerator.CreateRunDetail(runId, diagnosticsInfo.Value.Id,
                                                                 diagnosticsInfo.Value.DiagnosticsAssembly.
                                                                 FullName,
                                                                 diagnosticsInfo.Value.DiagnosticsMethodInfo.
                                                                 Name)))
         {
             DiagnosticsProviderFactory
             .CreateProvider()
             .SaveRunDetail(rdit);
         }
     }
     catch (Exception ex)
     {
         var msg = "Error Registering Diagnostics Batch: {0}";
         msg = String.Format(msg, ex.InnerException != null ? ex.InnerException.Message : ex.Message);
         _logger.ErrorFormat(msg);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Gets the diagnostics detail item.
 /// </summary>
 /// <param name="id">The id.</param>
 /// <returns></returns>
 /// <remarks></remarks>
 private DiagnosticsRunDetailItem GetDiagnosticsDetailItem(string id)
 {
     lock (sync)
     {
         return(DiagnosticsProviderFactory
                .CreateProvider()
                .FindRunDetail(id));
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Saves the detail item.
 /// </summary>
 /// <param name="current">The current.</param>
 /// <remarks></remarks>
 private void SaveDetailItem(DiagnosticsRunDetailItem current)
 {
     lock (sync)
     {
         DiagnosticsProviderFactory
         .CreateProvider()
         .SaveRunDetail(current);
     }
 }