c# - Event aggregator and BLL -
i've got winform app 3 layer architecture
- ui
- bll (business logic/layer)
- dal (data access layer)
the dal contains factory instantiate proxies used communicate various apis, require credentials of private methods
when app starts, 1 or more proxies initialised singletons (1 per api). references singleton kept within app @ ui , bll levels (and maybedal later).
the user can choose @ time modify api credentials via ui. in case, want initialise new instances of the singletons, , make sure correct instances used everywhere (ui, bll, dal)
what did far is:
- notify factory of credentials changes, singletons reinitialised
- used event aggregator pattern in ui, components holding references singleton notified of credential changes , call proxy factory fresh instance
however, wanted use event aggregator pattern in ui. question is: how notify objects in bll/dal of change?
a solution never hold instances , call factory, there way of doing want properly?
edit: have classes in bll keep instances of different kind of proxy (not initialised through factory). how notify these bll classes must refresh instance?
thanks
Comments
Post a Comment