Skip to content

BindingUtility

BindingUtility is a static reflection-based helper class shared by every binding-aware component in this library (AutoBindControlAncestor, BindingManager, InfragisticsGridCustomizer, SAIFAJAXControlAncestor). It provides the sole mechanism for reading and writing arbitrary object properties by name — including dotted, multi-level property paths — without any of those consumers needing to know the concrete type of the object being bound.

Purpose

  • Resolves a nested object graph from a dotted property path (GetObject, e.g. "Submission.Locations.Primary") so callers can bind to deeply-nested model properties by string name alone.
  • Reads (GetObjectValue) and writes (SetObjectValue) a single named property on any object via PropertyDescriptor reflection, silently no-oping on unsupported property types rather than throwing.
  • Copies a value from one named property on a source object to a named property on a destination object (BindValue), the core primitive behind every auto-binding control's read/write cycle.

Context

  • Namespace: SAIF.Presentation.Web.Controls.V2.AJAX
  • Assembly/package: SAIF.Presentation.Web.Controls.AJAX.Infragistics103

Public members

Member Signature Purpose
GetObject Shared Function GetObject(inObj As Object, inBindingValue As String) As Object Traverses a dotted property path (e.g. "A.B.C") starting from inObj, returning the object found at the final path segment
GetObjectValue Shared Function GetObjectValue(inObj As Object, inProp As String) As Object Reads a single named property's value off inObj via PropertyDescriptor, returning Nothing if the property doesn't exist or reflection fails
SetObjectValue Shared Sub SetObjectValue(inObj As Object, inProp As String, inValue As Object) Writes a value to a single named property on inObj via PropertyDescriptor, silently no-oping if the property doesn't exist or reflection fails
BindValue Shared Sub BindValue(inSourceObject As Object, inSourceProperty As String, inDestinationObject As Object, inDestinationProperty As String) Reads inSourceProperty off inSourceObject and writes the value to inDestinationProperty on inDestinationObject, silently no-oping on reflection failures

Behavioral notes

  • All four methods swallow NotSupportedException (and, in BindValue, any destination-side exception) rather than propagating it — a mismatched or unsupported property type results in a silent no-op, not a runtime error*.

Constraints and usage notes

  • Purely reflection-based; there is no caching of PropertyDescriptorCollection lookups, so repeated calls against the same object/property incur repeated reflection cost*.

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.Presentation.Web.Controls.AJAX.Infragistics103\BindingUtility.vb