public NormalizedLogViewModel(int id, int componentId, DateTime dateTime, string message,
                                      SeverityLevelViewModel severityLevel, IEnumerable <CustomAttributeValueViewModel> customValues, int rawLogId)
        {
            Id            = id;
            ComponentId   = componentId;
            DateTime      = dateTime;
            Message       = message;
            SeverityLevel = severityLevel;
            CustomValues  = customValues;
            RawLogId      = rawLogId;

            if (customValues == null || !CustomValues.Any())
            {
                customValues = new CustomAttributeValueViewModel[0];
            }
        }
        public async Task <ActionResult <SeverityLevelViewModel> > TryParseSeverity(
            [FromBody] ParseRequestSeverityViewModel viewModel)
        {
            try
            {
                var rule = await _severityRulePresenter.Request(viewModel.RuleViewModel);

                var parsed    = _parser.ParseSeverityLevel(viewModel.Line, rule);
                var presented = new SeverityLevelViewModel(parsed, SeverityLevelDisplay(viewModel.RuleViewModel, parsed));

                return(Ok(presented));
            }
            catch (Exception debug)
            {
                Console.WriteLine(debug);
                throw;
            }
        }