开发者

How do I group implementations under interfaces in Visual Studio?

I downloaded some example code from github and saw that the BookRepository.cs class was grouped beneath the IBookRepository.cs interface. Maybe thi开发者_运维技巧s is a newbie question, but how do they do that?

How do I group implementations under interfaces in Visual Studio?


They might have used a custom generator tool:

How do I group implementations under interfaces in Visual Studio?

And here's another blog post on this topic.

Or they might have simply grouped it like this in the corresponding .csproj file:

<Compile Include="Code\BookRepository.cs">
  <DependentUpon>IBookRepository.cs</DependentUpon>
</Compile>
<Compile Include="Code\IBookRepository.cs" />
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜