项目之间的沟通 [英] Communication between projects

查看:50
本文介绍了项目之间的沟通的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi。



我有一个项目,在执行后将查询结果作为数据集返回,我想用dasboard图表作为Html文件呈现该数据。由于我正在运行一个Windows窗体,我想在同一个解决方案中添加一个MVC项目,但我不知道如何让它们进行交互,将数据集发送到MVC项目,以便它可以分析它并构建图表。


$ b $b1º如何将项目添加到解决方案中,以便他们可以互相沟通


$ b $b2º如何发送数据集,以便MVC可以发挥他的魔力。



thk

解决方案

理想情况下,另一个项目应该是类库类型(默认情况下,它会生成一个带有主可执行模块* .DLL的程序集),最好是在同一个解决方案中。然后,您需要将其添加为应用程序项目(或使用该库的任何程序集)的引用。这是通过解决方案资源管理器,在参考节点上的上下文菜单添加 R eference ...完成的。使用添加引用窗口的.NET选项卡,即使您重新定位任何项目,也将确保构建添加程序集引用。它将自动解决依赖关系并在解决方案中设置项目依赖关系。



完成后,您可以浏览引用的项目。实际上,如果它们被 public 访问修饰符标记,您将能够使用所引用解决方案的任何类型及其成员。这些声明的使用与它们在同一个程序集中的使用完全相同。



尽量避免在应用程序产品中有多个进程,除非绝对是必要的(例如,在不同计算机上工作的进程,通过网络进行通信) - 进程是完全隔离的。如果你真的需要他们之间的流程和沟通,请提出单独的问题,但看起来你似乎没有准备好到那里或者有任何迫切的需求。



您真的需要学习技术基础:组件和模块,应用程序和流程,项目和解决方案的结构及其角色,产品生命周期。



- SA

hi.

i have a project that after executing returns query results as a dataset and i want to present that data with dasboard charts as a Html file. Since i'm running a windows form i want to add in the same solution a MVC project, but i don't know how to make them interact, sending the dataset to the MVC project so it can analyze it and construct the charts.

1º how can i add a project to the solution so they can communicate with each other

2º how to send the dataset so MVC can do his magic.

thk

解决方案

Ideally, that "another project" should be of the class library type (by default, it produces an assembly with main executable module *.DLL), better be in the same solution. Then, you need to add it as a reference to your application project (or whatever assemblies using the library). This is done through the Solution Explorer, context menu "Add Reference…" on theh "References" node. Use the ".NET" tab of the "Add Reference" window, it will ensure that the assembly reference is added by the build even if you relocate any of the projects. It will automatically resolve dependencies and set up project dependencies in the solution.

When it's done, you can browse the referenced item. Practically, you will be able to use any types and their members of the referenced solution, if they are marked by public access modifier. The use of these declaration is exactly the same as they were in the same assembly.

Try to avoid having more than one process in the application product, unless it is absolutely necessary (for example, processes working on different computers, communicating via a network) — processes are well isolated. If you really need processes and communications between them, ask separate questions, but it does not look like you are ready to get there or have any immediate needs for that.

You really need to learn technology basics: assemblies and modules, applications and processes, structure of the projects and solutions and their roles, product life cycle.

—SA


这篇关于项目之间的沟通的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆