Exemple #1
0
 /// <summary>
 /// Convert
 /// </summary>
 /// <param name="token">Token</param>
 /// <param name="ex">Exception</param>
 /// <param name="type">Type</param>
 /// <param name="errorCode">Error Code</param>
 /// <param name="sessionIdentifier">Session Identifier</param>
 /// <returns>Error</returns>
 private static ErrorItem Convert(Token token, Exception ex, EventTypes type, int errorCode, Guid sessionIdentifier)
 {
     return(new ErrorItem()
     {
         ErrorCode = errorCode,
         EventType = type.Convert(),
         MachineName = Environment.MachineName,
         DeploymentId = Abc.Azure.AzureEnvironment.DeploymentId,
         OccurredOn = DateTime.UtcNow,
         Source = ex.Source,
         StackTrace = ex.StackTrace,
         Token = token,
         Message = ex.Message,
         ClassName = ex.GetType().ToString(),
         SessionIdentifier = sessionIdentifier,
     });
 }