Skip to content

clsProviderSearch.clsProviders

clsProviders is the read-only result container returned by clsProviderSearch.Providers, inheriting ReadOnlyCollection(Of clsSearchResults). It holds the up-to-300 rows produced by a single searchForProvider invocation and is rebuilt (not appended to) on each new search.

Purpose

  • Presents the search-result set to callers as an immutable, indexable collection, preventing accidental mutation of search output outside clsProviderSearch.
  • Enforces, by construction (ReadOnlyCollection), that only clsProviderSearch itself can populate results, keeping the row cap (BR-SRCH-007) authoritative.

Context

  • Namespace: SAIF.Business.View.Provider
  • Assembly/package: SAIF.Business.View.Provider (embedded/project-compiled); also distributed as the NuGet package SAIF.BOF.Business.View.Provider.

Public members

Member Signature Purpose
Item Default ReadOnly Property Item(index As Integer) As clsSearchResults (from ReadOnlyCollection(Of clsSearchResults)) Returns the search result row at the given position.
Count ReadOnly Property Count As Integer (from ReadOnlyCollection(Of clsSearchResults)) Number of rows returned by the most recent search, capped at 300 (BR-SRCH-007).
GetEnumerator Function GetEnumerator() As IEnumerator(Of clsSearchResults) (from ReadOnlyCollection(Of clsSearchResults)) Enumerates the search result rows in the order returned by the query (ORDER BY fullNAME ASC).
Contains Function Contains(item As clsSearchResults) As Boolean (from ReadOnlyCollection(Of clsSearchResults)) Tests whether a specific result row instance is present in the collection.

Behavioral notes

  • OP-09: this collection is rebuilt from scratch at the start of every searchForProvider call — prior results are discarded rather than merged, so callers must re-read Providers after each search.*
  • Being a plain List(Of T)-backed ReadOnlyCollection, it carries no BOF business-object behavior (no IsValid/IsDirty/Save); it exists purely to surface immutable search output.

Constraints and usage notes

  • Not a BOF business collection — callers should not expect IsValid, IsDirty, or persistence semantics from this type; it is a plain read-only wrapper over the result rows.*
  • Because it is rebuilt on each search, holding a reference to a previous Providers value across a subsequent searchForProvider call will retain stale, no-longer-current results.*

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • SAIF.Business.View.Provider/clsProviderSearch.vb