Add caching to prevent INetworkEvent reallocation
gmich opened this issue · comments
Giorgos Michaelides commented
HandleWith(this,x=> new Action(x.Do));
cache the object's name as string , and the delegate's (x.Do) name as string
also cache the whole networkConfig (eventHandler etc).
When disposing an eventHandler, the cached entry should be removed as well
For a successful lookup, the networkConfig.INetworkHandler is returned.
It shouldn't be in a hashtable or a dictionary.
Use GenericRepository. The lookup should match both entries.