0

我正在开发一个显示来自 WCF 服务的数据的软件。WCF 服务位于我客户的服务器中,我无权修改它们。

我的客户有 3 个应用程序,称为:App1、App2、App3。我的职责是编写一个应用程序来收集正在运行的应用程序的信息,然后调用特定的 WCF 服务来获取用于显示的数据。

eg: App1 正在运行,并且在 Form1 上显示 user1 的信息,我的应用程序将收集 user1_id, user1_name 调用 Service.GetUserAlerts1(user1_id, user1_name) --> return List

App2 正在运行,并且 user2 的信息在 Form2 上(Form2 与 Form1 不同)--> 我的应用程序将收集 user2_pin、user2_postcode、user2_idnumber 然后调用服务 Service.GetUserAlerts2(user2_pin, user2_postcode, user2_idnumber) -->返回列表

所以我需要设计我的应用程序以适应新的 App4 而无需任何代码修改。我正在考虑使用 IoC 模式,但我真的不知道如何解决这个问题。

有什么想法吗?

非常感谢。

4

0 回答 0