简体   繁体   English

用于 Xml 文档中 cref 的 Visual Studio Intellisense

[英]Visual Studio Intellisense for cref's in Xml Documentation

When you create XML Documentation for C# methods in Visual Studio (I'm using 2010), you receive Intellisense support for creating the various XML tags, such as see, paramref, etc. On the other hand, when you add in aa cref attribute you have to use a, what I think is convoluted format to describe types. When you create XML Documentation for C# methods in Visual Studio (I'm using 2010), you receive Intellisense support for creating the various XML tags, such as see, paramref, etc. On the other hand, when you add in aa cref attribute你必须使用一种我认为是复杂的格式来描述类型。 This is worst when you have a number of generics.当您有多个 generics 时,这是最糟糕的。

What I'm looking for is as follows.我正在寻找的内容如下。 If you're setting the cref attribute in a see element, you have an Intellisense list of classes that match what you're typed in so far and then output the proper type description necessary.如果您在 see 元素中设置 cref 属性,您将拥有一个 Intellisense 类列表,这些列表与您目前输入的内容相匹配,然后是 output 所需的正确类型描述。 Or when you're setting the cref attribute on a paramref element, you receive the list of parameters of that method.或者,当您在 paramref 元素上设置 cref 属性时,您会收到该方法的参数列表。

Does anyone know of some sort of addon to Visual Studio to provides Intellisense for these cref attributes?有谁知道 Visual Studio 的某种插件可以为这些 cref 属性提供智能感知?

I've been writing a lot of XML documentation recently, and I think ReSharper provides the functionality you're looking for with its Extended IntelliSense Code Completion feature - I use it all the time.我最近写了很多 XML 文档,我认为 ReSharper 通过其扩展的 IntelliSense 代码完成功能提供了您正在寻找的功能 - 我一直在使用它。 The Quick Documentation feature is not to be overlooked when writing documentation either - with it, you can see what the XML documentation will actually look like when compiled to html/chm, and it's updated in real time , so if I change something in the docs with the Quick Documentation window up, I see it change automatically - really helpful for formatting and such. 快速文档功能在编写文档时也不容忽视 - 有了它,您可以看到 XML 文档在编译为 html/chm 时的实际外观,并且它是实时更新的,所以如果我在文档中更改某些内容使用快速文档 window ,我看到它会自动更改 - 对格式化等非常有帮助。

If you add Agent Smith to the mix (which only works as an add-on to ReSharper, apparently), it can add some handy Spell Checking , XML Comment Validation , Naming Convention checks, and some simple comment-reflowing (if you're particular about staying within a certain number of characters/line) (with the first two probably being the most useful as ReSharper provides the ability to enforce Naming Conventions).如果您将Agent Smith添加到组合中(显然,它只能作为 ReSharper 的附加组件),它可以添加一些方便的拼写检查XML 评论验证、命名约定检查和一些简单的评论回流(如果你特别是保持在一定数量的字符/行内)(前两个可能是最有用的,因为 ReSharper 提供了强制执行命名约定的能力)。

Hope that helps!希望有帮助!

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

相关问题 Visual Studio XML文档:属性 - Visual Studio XML Documentation : Attributes 运用 <see cref=“”/> 在XML文档中使用可选和可为空的参数 - Using <see cref=“”/> with an optional and nullable parameter in XML documentation Visual Studio 2015 缺少 XML 注释/文档 - Visual Studio 2015 missing XML comments / documentation 没有XML标签的C#Visual Studio Intellisense - C# Visual Studio Intellisense without XML tags 将xml-stylesheet声明添加到Visual Studio生成的XML文档中 - Adding xml-stylesheet declaration to Visual Studio generated XML documentation 如何在Intellisense和DocFx的XML注释中显示内部引用内容? - How to show content inside see cref in XML comment from Intellisense and DocFx? 有没有办法只在Visual Studio的Intellisense中查看对象的实例方法? - Is there a way to view only the instance methods of an object in Visual Studio's Intellisense? 并非所有属性都在 Visual Studio IntelliSense for UIAutomation 的 AutomationElement 类中可见 - Not all properties visible in Visual Studio IntelliSense for UIAutomation's AutomationElement class 为什么Visual Studio的intellisense不能用于派生类? - Why doesn't Visual Studio's intellisense work for derived classes? 实现Visual Studio Intellisense - Implementing Visual Studio Intellisense
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM