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¶
_messagesis initialized to a new emptyList(Of String)before either constructor runs.- The two-parameter constructor replaces the default empty list only when the supplied
messagesargument is notNothing. - Both constructors set
_statusdirectly from the providedstatusargument.
Constraints and usage notes¶
Messagesexposes the underlying mutableList(Of String)instance rather than a read-only wrapper.- Passing
Nothingfor themessagesconstructor argument does not raise an error; the object keeps its default empty list instead.
Sources¶
Business\SAIF.Business\clsSAIFResult.vb