问题描述
我有一个 DatabaseConnection dll,它执行以下操作... (1)connect(2)disconnect(3)ping/重建连接(4)做查询(5)等.它只是对 MySql.dll 的一种包装,专门用于满足我的需要.
现在, DatabaseConnection 将在另一个系统上被引用.
DatabaseConnection 少了Window.现在,我计划使用 DatabaseConnection 在同一命名空间中提供一个窗口工具,即使 DatabaseConnection 已经实例化,也可以随时调用/运行它.目的是为DatabaseConnection提供调试/记录工具(某种查询分析器).
我担心的是,如果 DatabaseConnection 已经作为另一个系统上的进程实例化/运行,那么如果 DatabaseConnection 已经存在,我将如何随时同步我的Window(QueryAnalyzer/Logging)工具?实例化/过程?
顺便说一下,我可以在不放置 DatabaseConnection 对象的情况下放置窗口.再次实例化窗口,而不会影响 DatabaseConnection 对象中的数据,反之亦然.窗户就像一个配件.
注意:我不打算将DatabaseConnection与窗口合并并隐藏它.
I have a DatabaseConnection dll which does the following...(1)connect (2)disconnect (3) ping/reestablish connection (4) do query (5) etc. It''s some sort of wrapper of the MySql.dll just customized to meet what I just need.
Now, the DatabaseConnection will be referenced on another system.
DatabaseConnection is Window less. Now, I have this plan to provide a window tool within the same namespace with the DatabaseConnection that can be called/run anytime even if DatabaseConnection is already instantiated. It''s purpose is to provide a debugging/logging tool (some sort of a query analyzer) for DatabaseConnection.
My concern is, if DatabaseConnection is already instantiated/run as a process on another system, how would I synchronize my Window (QueryAnalyzer/Logging) Tool anytime if the DatabaseConnection is already instantiated/a process?
By the way through this, I can dispose the window without disposing the DatabaseConnection object; Instantiate the window again without affecting the data in the DatabaseConnection object, and vice versa. The window is just like an accessory.
NOTE: I am excluding the idea to merge the DatabaseConnection with the window and just hide it.
推荐答案
这篇关于如何像访问类的实例一样访问进程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!