的ResX文件和额外的应用层 [英] ResX files and extra application layer

查看:120
本文介绍了的ResX文件和额外的应用层的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用一些大的asp.net Web工具包的Web应用程序。在开始的时候,我们创造了很多基类,如命令和控制服务器,使我们的工作更容易。

we are making an web application using some big asp.net web toolkit. At the beginning we created a lot of base classes such as commands and server controls to make our work easier.

现在,当我们使用此,我们决定biuld另一个构建我们的应用程序。要照搬我们的一切工作,而不是从头使得我们决定把我们的服务器控件,命令和所有基础clases从asp.net项目分离,并在另一个封装它,可重复使用的项目...

Now when we built our application using this we decided to biuld another one. To not copy all our work, and not making it from scratch we decided to separate our server controls, commands and all base clases from asp.net project and encapsulate it in another, reusable project...

现在我们有很大的问题,因为很多这些类的使用附加到AUR asp.net应用程序的App_GlobalResources文件RESX文件......我们应该在哪里放他们,或者我们如何能够利用他们在这两个avaible项目,仍然有一个很好的应用程序体系结构?

Now we have the big problem, because many of those classes are using RESX files that are attached to aur asp.net application as App_GlobalResources... Where should we put them, or how can we use them to be avaible in both projects and still have a nice application architecture?

推荐答案

这是您的服务器控件/命令/基类使用需要的所有资源在同一组件,这些组件。这些组件必须基本上自成体系,如果你要分发和重用他们,这意味着它们的资源,与他们一起去。

Any resources that your server controls/commands/base classes are using need to be in the same assembly as those components. These components have to be essentially self-contained if you want to distribute and reuse them, which means that their resources have to go along with them.

您App_GlobalResources文件RESX文件需要分割和资源投入新的资源文件中的可重复使用装配。

Your App_GlobalResources resx files need to be split up and the resources put into new resource files in the "reusable" assembly.

这篇关于的ResX文件和额外的应用层的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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