Skip to content

clsSAIFResult

clsSAIFResult is a public class in SAIF.Business that implements ISAIFResult and encapsulates a Boolean status together with a list of message strings.

Purpose

  • Provides a common result object that exposes a success or failure status.
  • Carries one or more explanatory or validation messages alongside that status.
  • Supports creation with either an explicit message list or an empty message list.

Context

  • Namespace: SAIF.Business
  • Assembly/package: SAIF.Business

Public members

Member Signature Purpose
Status Public ReadOnly Property Status As Boolean Implements ISAIFResult.Status Returns the status value supplied when the result object was constructed.
Messages Public ReadOnly Property Messages As List(Of String) Implements ISAIFResult.Messages Returns the list of messages associated with the result.
New Public Sub New(ByVal status As Boolean, ByVal messages As List(Of String)) Initializes the result with an explicit status and an optional message list.
New Public Sub New(ByVal status As Boolean) Initializes the result with an explicit status and an empty message list.

Behavioral notes

  • _messages is initialized to a new empty List(Of String) before either constructor runs.
  • The two-parameter constructor replaces the default empty list only when the supplied messages argument is not Nothing.
  • Both constructors set _status directly from the provided status argument.

Constraints and usage notes

  • Messages exposes the underlying mutable List(Of String) instance rather than a read-only wrapper.
  • Passing Nothing for the messages constructor argument does not raise an error; the object keeps its default empty list instead.

Sources

  • Business\SAIF.Business\clsSAIFResult.vb