开发者

C# Passing data from client to DLL

开发者 https://www.devze.com 2023-02-06 04:49 出处:网络
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.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消