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?
They might have used a custom generator tool:
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" />
精彩评论