SAIF.Framework.Bindable operations and processes¶
This page is the operation catalog and cross-operation hub for this library. Each operation's detailed, step-by-step logic lives in its own page under operations/.
SAIF.Framework.Bindable does not implement business workflows of its own. Instead, it supplies seven reusable notification and IBindingList operations that subclasses elsewhere in the SAIF BOF stack invoke (or inherit unchanged) to participate in WinForms/WebForms data binding and rule-violation notification. The seven operations fall into three families: single-object change notification (clsBindableBase), collection-level data binding (clsBindableCollectionBase), and rule-status notification (clsRulesManagerBase). None of them read from or write to a database, call an external service, or delegate into another library's operations — every step executes in-memory within the calling process.
Operation catalog¶
| Operation | Intent | Trigger | Inputs | Outputs | Rules | Tables | SQL |
|---|---|---|---|---|---|---|---|
| Notify modified-state change | Raise IsModifiedChanged for the current bindable object instance. |
Subclass calls OnIsModifiedChanged(). |
None. | IsModifiedChanged(this, EventArgs.Empty) if a subscriber is attached; otherwise no side effect. |
— | — | — |
| Publish collection-mutation notification | Translate a completed insert, clear, remove, or set into a ListChanged notification. |
CollectionBase invokes the matching completion hook on a clsBindableCollectionBase subclass. |
Mutation type plus the affected index/value supplied by the hook. | ListChangedEventArgs dispatched to subscribers; otherwise no side effect. |
— | — | — |
Add a new item through IBindingList |
Gate AddNew() behind the AllowNew flag and delegate creation to the OnAddNew() extension point. |
Caller invokes IBindingList.AddNew(). |
None. | Object returned by OnAddNew(), or InvalidOperationException when new items are disallowed. |
— | — | — |
Find an item through IBindingList |
Forward a search request to the subclass's search hook. | Caller invokes IBindingList.Find(...). |
PropertyDescriptor property, object key. |
Integer index from IBindingList_Find(...); the unoverridden base hook always returns -1. |
— | — | — |
Apply collection sorting through IBindingList |
Forward a sort request to the subclass's sort hook. | Caller invokes IBindingList.ApplySort(...). |
PropertyDescriptor property, ListSortDirection direction. |
Subclass-defined sort side effects; the unoverridden base hook performs no work. | — | — | — |
Remove collection sorting through IBindingList |
Forward a sort-removal request to the subclass's reset hook. | Caller invokes IBindingList.RemoveSort(). |
None. | Subclass-defined sort-reset side effects; the unoverridden base hook performs no work. | — | — | — |
| Publish rule-status notification | Raise the matching rule-status event for a broken or resolved rule. | Subclass calls OnRuleBroken(rule) or OnRuleNotBroken(rule). |
object rule. |
RuleBroken(rule) or RuleNotBroken(rule) when a subscriber is attached; otherwise a NullReferenceException. |
BR-001 | — | — |
Process flow diagram¶
The following diagram visualizes the primary operational flow across the library's notification and IBindingList entry points.
flowchart TD
Start([Caller or subclass trigger]) --> Trigger{Trigger type}
Trigger -->|Object state changed| Modified[Notify modified-state change]
Trigger -->|Collection mutation completed| Mutation[Publish collection-mutation notification]
Trigger -->|Binding list AddNew| AddNew[Add a new item through IBindingList]
Trigger -->|Binding list Find| Find[Find an item through IBindingList]
Trigger -->|Binding list ApplySort| Sort[Apply collection sorting through IBindingList]
Trigger -->|Binding list RemoveSort| RemoveSort[Remove collection sorting through IBindingList]
Trigger -->|Rule status changed| Rule[Publish rule-status notification]
Modified --> End([Return to caller])
Mutation --> End
AddNew --> End
Find --> End
Sort --> End
RemoveSort --> End
Rule --> End
Failure and edge-case behavior¶
IBindingList.AddNew()throwsInvalidOperationException("Allow New Not Supported for this object")wheneverAllowNewisfalseat the time of the call.IBindingList.Find(...)always returns-1unless a subclass overridesIBindingList_Find(...)with real search logic — the base class reports "not found" for every lookup.IBindingList.ApplySort(...)andRemoveSort()return successfully without changing collection order or sort state unless a subclass overrides the corresponding protected hook; callers cannot detect from the return value alone whether sorting actually occurred.OnRuleBroken(rule)andOnRuleNotBroken(rule)throwNullReferenceExceptionwhenever their corresponding event has no subscriber, because both methods invoke the delegate directly without a null check; see BR-001.
Related documentation¶
Sources¶
SAIF.Framework.Bindable\clsBindableBase.csSAIF.Framework.Bindable\clsBindableCollectionBase.csSAIF.Framework.Bindable\clsrulesmanagerbase.cs