コード例 #1
0
 public ClaimProblem(ClaimProblemType problemType, ProblemSeverity severity, DateTime?problemTime = null, string extraInfo = null)
 {
     ProblemType = problemType;
     Severity    = severity;
     ProblemTime = problemTime;
     ExtraInfo   = extraInfo;
 }
コード例 #2
0
 public FieldRelatedProblem(ClaimProblemType problemType, ProblemSeverity severity, [NotNull] ProjectField field)
     : base(problemType, severity, null, field.FieldName)
 {
     if (field == null)
     {
         throw new ArgumentNullException(nameof(field));
     }
     Field = field;
 }
コード例 #3
0
        public void AddProblem(ProblemSeverity severity, string fileName, string message)
        {
            _problems.Add(new Problem(severity, fileName, message));

            if (severity == ProblemSeverity.Fatal)
            {
                _hasErrors = true;
            }
            else if (severity == ProblemSeverity.Warning)
            {
                _hasWarnings = true;
            }
        }
コード例 #4
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 29, Configuration.FieldSeparator),
                       Id,
                       ActionCode,
                       ActionDateTime.HasValue ? ActionDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       ProblemId?.ToDelimitedString(),
                       ProblemInstanceId?.ToDelimitedString(),
                       EpisodeOfCareId?.ToDelimitedString(),
                       ProblemListPriority.HasValue ? ProblemListPriority.Value.ToString(Consts.NumericFormat, culture) : null,
                       ProblemEstablishedDateTime.HasValue ? ProblemEstablishedDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       AnticipatedProblemResolutionDateTime.HasValue ? AnticipatedProblemResolutionDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       ActualProblemResolutionDateTime.HasValue ? ActualProblemResolutionDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       ProblemClassification?.ToDelimitedString(),
                       ProblemManagementDiscipline != null ? string.Join(Configuration.FieldRepeatSeparator, ProblemManagementDiscipline.Select(x => x.ToDelimitedString())) : null,
                       ProblemPersistence?.ToDelimitedString(),
                       ProblemConfirmationStatus?.ToDelimitedString(),
                       ProblemLifeCycleStatus?.ToDelimitedString(),
                       ProblemLifeCycleStatusDateTime.HasValue ? ProblemLifeCycleStatusDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       ProblemDateOfOnset.HasValue ? ProblemDateOfOnset.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       ProblemOnsetText,
                       ProblemRanking?.ToDelimitedString(),
                       CertaintyOfProblem?.ToDelimitedString(),
                       ProbabilityOfProblem01.HasValue ? ProbabilityOfProblem01.Value.ToString(Consts.NumericFormat, culture) : null,
                       IndividualAwarenessOfProblem?.ToDelimitedString(),
                       ProblemPrognosis?.ToDelimitedString(),
                       IndividualAwarenessOfPrognosis?.ToDelimitedString(),
                       FamilySignificantOtherAwarenessOfProblemPrognosis,
                       SecuritySensitivity?.ToDelimitedString(),
                       ProblemSeverity?.ToDelimitedString(),
                       ProblemPerspective?.ToDelimitedString(),
                       MoodCode?.ToDelimitedString()
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }
コード例 #5
0
 /// <summary>
 /// Creates a new <see cref="ProblemType"/> from a given id and description
 /// </summary>
 /// <param name="id">Id in the form of a valid <see cref="Guid"/> string representation</param>
 /// <param name="description">Description of the <see cref="ProblemType">problem type</see></param>
 /// <param name="severity">The <see cref="ProblemSeverity">severity</see> of the problem type</param>
 /// <returns>An <see cref="ProblemType"/> instance</returns>
 public static ProblemType Create(string id, string description, ProblemSeverity severity)
 {
     return(new ProblemType {
         Id = Guid.Parse(id), Description = description, Severity = severity
     });
 }
コード例 #6
0
 public Problem(ProblemSeverity severity)
 {
     this.Severity = severity;
 }
コード例 #7
0
ファイル: ProblemType.cs プロジェクト: LenFon/Bifrost
 /// <summary>
 /// Creates a new <see cref="ProblemType"/> from a given id and description
 /// </summary>
 /// <param name="id">Id in the form of a valid <see cref="Guid"/> string representation</param>
 /// <param name="description">Description of the <see cref="ProblemType">problem type</see></param>
 /// <param name="severity">The <see cref="ProblemSeverity">severity</see> of the problem type</param>
 /// <returns>An <see cref="ProblemType"/> instance</returns>
 public static ProblemType Create(string id, string description, ProblemSeverity severity)
 {
     return new ProblemType { Id = Guid.Parse(id), Description = description, Severity = severity };
 }
コード例 #8
0
 private static ClaimProblem FieldProblem(ClaimProblemType problemType, ProblemSeverity severity, FieldWithValue fieldWithValue)
 {
     return(new FieldRelatedProblem(problemType, severity, fieldWithValue.Field));
 }
コード例 #9
0
 public Problem(ProblemSeverity severity, string fileName, string message)
 {
     Severity = severity;
     FileName = fileName;
     Message  = message;
 }
コード例 #10
0
 public static IEnumerable <ClaimProblem> GetProblems([NotNull] this Character claim, ProblemSeverity minimalSeverity = ProblemSeverity.Hint)
 {
     if (claim == null)
     {
         throw new ArgumentNullException(nameof(claim));
     }
     return(Filters.SelectMany(f => f.GetProblems(claim)).Where(p => p.Severity >= minimalSeverity));
 }
 internal DSGeneratorProblem(string message, ProblemSeverity severity, DataSourceComponent problemSource)
 {
     this.message = message;
     this.severity = severity;
     this.problemSource = problemSource;
 }
コード例 #12
0
 public Problem(ProblemSeverity severity, string message)
 {
     Severity = severity;
     Message  = message;
 }
コード例 #13
0
 private void AddProblem(ProblemSeverity severity, string format, object[] args)
 {
     _problems.Add(new Problem(severity, string.Format(format, args)));
 }
コード例 #14
0
 internal DSGeneratorProblem(string message, ProblemSeverity severity, DataSourceComponent problemSource)
 {
     this.message       = message;
     this.severity      = severity;
     this.problemSource = problemSource;
 }
コード例 #15
0
 public Problem(ProblemSeverity severity)
 {
     Severity = severity;
 }