VS2013高级更新3.当我右键单击.cs并执行View Class Diagram时,VS似乎将所有实体放在1 .cd文件中。即使它们位于不同的命名空间中。
这是标准行为,还是这个解决方案中的东西?
.csproj的相关部分
来源https://github.com/djhmateer/AltNetDI
<ItemGroup>
<Compile Include="Example8.cs" />
<Compile Include="Example7.cs" />
<Compile Include="Example6.cs" />
<Compile Include="Example5.cs" />
<Compile Include="Example2.cs" />
<Compile Include="Example6Mike.cs" />
<Compile Include="Example1.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="ClassDiagram1.cd" />
<None Include="packages.config" />
</ItemGroup>
Example1.cs
namespace AltNetDI1 {
class CompositionRoot {
public static void EMain() {
// Instantiating the objects we will need
IReader reader = new TextFileReader();
IWriter writer = new ConsoleWriter();
// Pass objects to our Appliction via Dependency Injection
IApplication application = new Application(reader, writer);
application.Run();
}
}
Example2.cs
namespace AltNetDI2 {
class CompositionRoot {
public static void EMain() {
IReader reader = new TextFileReader();
//IWriter writer = new ConsoleWriter();
// Decorating ConsoleWriter with a WriterLogger
IWriter writer = new WriterLogger(new ConsoleWriter());
// Pass objects to our Appliction via Dependency Injection
IApplication application = new Application(reader, writer);
application.Run();
}
}