public void LogEvent(MetricEvent metricEvent)
 {
     HostStarted hostStartedEvent = metricEvent as HostStarted;
     if (hostStartedEvent != null)
     {
         _metricsEventManager.HostStarted(hostStartedEvent.Host);
     }
 }
 public void BeginEvent(MetricEvent metricEvent)
 {
     FunctionStartedEvent startedEvent = metricEvent as FunctionStartedEvent;
     if (startedEvent != null)
     {
         startedEvent.Timestamp = DateTime.UtcNow;
         _metricsEventManager.FunctionStarted(startedEvent);
     }
 }
 public void EndEvent(MetricEvent metricEvent)
 {
     FunctionStartedEvent completedEvent = metricEvent as FunctionStartedEvent;
     if (completedEvent != null)
     {
         completedEvent.EndTime = DateTime.Now;
         MetricsEventManager.FunctionCompleted(completedEvent);
     }
 }
 public void EndEvent(MetricEvent metricEvent)
 {
     FunctionStartedEvent completedEvent = metricEvent as FunctionStartedEvent;
     if (completedEvent != null)
     {
         completedEvent.Duration = DateTime.UtcNow - completedEvent.Timestamp;
         _metricsEventManager.FunctionCompleted(completedEvent);
     }
     else
     {
         _metricsEventManager.EndEvent((object)metricEvent);
     }
 }
 public void LogEvent(MetricEvent metricEvent)
 {
     throw new NotImplementedException();
 }