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); }
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); }