Roslyn VisualStudioSDK中[ContentType(“HTML”)的重要性
我正在用反射器观察,我注意到以下几点:Roslyn VisualStudioSDK中[ContentType(“HTML”)的重要性,roslyn,visual-studio-sdk,Roslyn,Visual Studio Sdk,我正在用反射器观察,我注意到以下几点: [ContentType("HTML")] [Export(typeof(IVsTextViewCreationListener))] [Export(typeof(IWpfTextViewCreationListener))] [Export(typeof(VenusTextViewManager))] [TextViewRole("PRIMARYDOCUMENT")] internal sealed class VenusTextViewManager
[ContentType("HTML")]
[Export(typeof(IVsTextViewCreationListener))]
[Export(typeof(IWpfTextViewCreationListener))]
[Export(typeof(VenusTextViewManager))]
[TextViewRole("PRIMARYDOCUMENT")]
internal sealed class VenusTextViewManager : IVsTextViewCreationListener, IWpfTextViewCreationListener
{
// ...
}
既然Roslyn用于C#和VB.NET,为什么
“HTML”
会被传递到ContentTypeAttribute的构造函数中?HTML是否意味着某种形式的富文本格式?或者这是为了支持ASP.NET Razor引擎的标记?正如您所猜测的,这是为了支持aspx和cshtml/vbhtml文件。我们希望在将来的版本中找到更好的方法来处理这个类当前处理的问题