public WardenCheckResultDto(WardenCheckResult result)
 {
     IsValid = result.IsValid;
     WatcherCheckResult = new WatcherCheckResultDto(result.WatcherCheckResult);
     StartedAt = result.StartedAt;
     CompletedAt = result.CompletedAt;
     ExecutionTime = result.ExecutionTime;
     Exception = result.Exception == null ? null : new ExceptionDto(result.Exception);
 }
Beispiel #2
0
 private static void SetWatcherTypeFromFullNamespace(WatcherCheckResultDto watcherCheck)
 {
     watcherCheck.WatcherType = (string.IsNullOrWhiteSpace(watcherCheck.WatcherType)
         ? string.Empty
         : watcherCheck.WatcherType.Contains(",")
             ? watcherCheck.WatcherType.Split(',').FirstOrDefault()?.Split('.').LastOrDefault() ??
                                 string.Empty
             : watcherCheck.WatcherType).Trim().ToLowerInvariant().Replace(WatcherNameSuffix, string.Empty);
 }
Beispiel #3
0
 private static void SetWatcherTypeFromFullNamespace(WatcherCheckResultDto watcherCheck)
 {
     watcherCheck.WatcherType = (string.IsNullOrWhiteSpace(watcherCheck.WatcherType)
         ? string.Empty
         : watcherCheck.WatcherType.Contains(",")
             ? watcherCheck.WatcherType.Split(',').FirstOrDefault()?.Split('.').LastOrDefault() ??
               string.Empty
             : watcherCheck.WatcherType).Trim().ToLowerInvariant().Replace(WatcherNameSuffix, string.Empty);
 }