C# Passing data from client to DLL
I have a client that has a number of plugin dll's that communicate via a single interface. Within the client, their is often a change of database.
This state is maintained internally by a simple string.
How would be the best way to update the dll's when this changes. Should I simply create a stringbuilder(reference type) and pass that thro开发者_JAVA百科ugh the interface to the each dll?
Or is there a way that the dll can monitor an event on the client for this?
Thanks.
You can use observer pattern. Here is a definition and example of observer pattern:
http://www.dofactory.com/Patterns/PatternObserver.aspx
精彩评论