Esempio n. 1
0
 /// <summary>
 /// Enables to set the StatusCode
 /// </summary>
 /// <param name="severity"></param>
 public DsoHttpResult(SeverityEnum severity)
 {
     StatusCode    = EnumSeverity.GetCode(severity);
     Notifications = new List <DsoHttpResultNotification>();
     MutationCode  = EnumDsoHttpResultMutation
                     .GetCode(DsoHttpResultMutationEnum.None);
 }
Esempio n. 2
0
 protected DsoHttpResult(
     SeverityEnum severity,
     bool hasMoreResults,
     DsoHttpResultMutationEnum mutation = DsoHttpResultMutationEnum.None) :
     this()
 {
     StatusCode     = EnumSeverity.GetCode(severity);
     MutationCode   = EnumDsoHttpResultMutation.GetCode(mutation);
     HasMoreResults = hasMoreResults;
 }
Esempio n. 3
0
 private async Task WriteLogAsync(
     string message,
     string topic,
     SeverityEnum severity = SeverityEnum.Debug,
     string memberName     = "",
     string filePath       = "",
     int lineNumber        = -1)
 {
     await _logWriter.WriteLogAsync(
         _userId, _companyId, topic,
         EnumSeverity.GetCode(severity),
         Environment.MachineName,
         memberName, filePath, lineNumber,
         message, DateTime.UtcNow);
 }