public static OperationOutcome Error(this OperationOutcome outcome, string message)
        {
            outcome.Init();

            var item = new OperationOutcome.OperationOutcomeIssueComponent();

            item.Severity = OperationOutcome.IssueSeverity.Error;
            item.Details  = message;
            outcome.Issue.Add(item);
            return(outcome);
        }
        private static OperationOutcome AddIssue(this OperationOutcome outcome, OperationOutcome.IssueSeverity severity, string message)
        {
            if (outcome.Issue == null)
            {
                outcome.Init();
            }

            var item = new OperationOutcome.OperationOutcomeIssueComponent();

            item.Severity = severity;
            item.Details  = message;
            outcome.Issue.Add(item);
            return(outcome);
        }
        public static OperationOutcome Message(this OperationOutcome outcome, string message)
        {
            if (outcome.Issue == null)
            {
                outcome.Init();
            }

            var item = new OperationOutcome.OperationOutcomeIssueComponent();

            item.Severity = OperationOutcome.IssueSeverity.Information;
            item.Details  = message;
            outcome.Issue.Add(item);
            return(outcome);
        }
예제 #4
0
        private static OperationOutcome AddIssue(this OperationOutcome outcome, OperationOutcome.IssueSeverity severity, string message, OperationOutcome.IssueType issueType = OperationOutcome.IssueType.Unknown)
        {
            if (outcome.Issue == null)
            {
                outcome.Init();
            }

            var item = new OperationOutcome.IssueComponent();

            item.Severity    = severity;
            item.Diagnostics = message;
            item.Code        = issueType;
            outcome.Issue.Add(item);
            return(outcome);
        }
예제 #5
0
        private static OperationOutcome AddIssue(this OperationOutcome outcome, OperationOutcome.IssueSeverity severity, string message)
        {
            if (outcome.Issue == null)
            {
                outcome.Init();
            }

            var item = new OperationOutcome.IssueComponent
            {
                Severity    = severity,
                Diagnostics = message
            };

            outcome.Issue.Add(item);
            return(outcome);
        }