clsResultInfo(Of T)¶
clsResultInfo(Of T) is a public generic class in SAIF.Business that packages a result value together with a companion message string.
Purpose¶
- Carries a typed result object in the
Resultproperty. - Carries an optional status or explanatory message in the
Messageproperty. - Provides simple constructors for creating either an empty result container or one seeded with a default result value.
Context¶
- Namespace:
SAIF.Business - Assembly/package:
SAIF.Business
Public members¶
| Member | Signature | Purpose |
|---|---|---|
Result |
Public Property Result() As T |
Gets or sets the typed result value carried by the wrapper. |
Message |
Public Property Message() As String |
Gets or sets the message associated with the result. |
New |
Public Sub New(ByVal DefaultResult As T) |
Initializes the wrapper with a supplied default result value. |
New |
Public Sub New() |
Initializes the wrapper without assigning an explicit result value. |
Behavioral notes¶
- The backing message field starts as
String.Empty. - The constructor overload that accepts
DefaultResultonly seedsResult; it does not changeMessage. - The parameterless constructor leaves
Resultat the default value forTuntil the caller sets it.
Constraints and usage notes¶
- The class does not perform validation or normalization for either
ResultorMessage. - Callers are responsible for deciding whether an empty
Messagemeans success, failure, or no additional information.
Sources¶
Business\SAIF.Business\clsResultInfo.vb