简体   繁体   English

C#解决方案结构和项目命名

[英]C# Solution structure & project naming

My project consists of multiple servers, those servers use the same network library, and use alot of code in common (enumerations, collections etc...). 我的项目由多个服务器组成,这些服务器使用相同的网络库,并使用许多共同的代码(枚举,集合等)。 The project has dependency on FluentNHibernate (might change to Entity Framework) 该项目依赖FluentNHibernate(可能更改为Entity Framework)

I would know in the first time how to structure my solution directory. 我会在第一时间知道如何构建我的解决方案目录。 Should I put my projects under a subdirectory, or in the same directory as the solution ? 我应该将项目放在解决方案的子目录下还是同一目录下?

And in the second time, I wonder about the naming conventions of project and the namespaces inside the projects. 第二次,我想知道项目的命名约定以及项目内部的命名空间。

Let's take an example, if I call my project Solution.ChatServer, the ChatServer class will be contained in this namespace, isn't the name a bit redundant ? 让我们举个例子,如果我调用我的项目Solution.ChatServer,ChatServer类将包含在此命名空间中,这个名称是否有点多余?

I plan to implement plugins soon, and I would like to make it the most easy possible and have everything well-designed. 我计划很快实现插件,并且我想使其变得尽可能简单,并且一切都经过精心设计。

I like the idea of having a project very modular, and I want to follow the maximum possible the .NET style 我喜欢使项目具有高度模块化的想法,并且我希望遵循最大的.NET风格

关于命名和设计模式,您可以遵循.Net的官方准则: 命名程序集框架设计

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM