Skip to content

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 Result property.
  • Carries an optional status or explanatory message in the Message property.
  • 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 DefaultResult only seeds Result; it does not change Message.
  • The parameterless constructor leaves Result at the default value for T until the caller sets it.

Constraints and usage notes

  • The class does not perform validation or normalization for either Result or Message.
  • Callers are responsible for deciding whether an empty Message means success, failure, or no additional information.

Sources

  • Business\SAIF.Business\clsResultInfo.vb