From 0542b56a0c136e57d8899484c4aaaa35e5bbe531 Mon Sep 17 00:00:00 2001 From: yggy Date: Wed, 20 Apr 2016 11:07:19 -0700 Subject: [PATCH] tweak: method rename plus some documentation comments --- ILSpy.AddIn/CodeElementXmlDocKeyProvider.cs | 14 ++++++++++---- ILSpy.AddIn/ILSpyAddInPackage.cs | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ILSpy.AddIn/CodeElementXmlDocKeyProvider.cs b/ILSpy.AddIn/CodeElementXmlDocKeyProvider.cs index 270b52e25..8b3b411bd 100644 --- a/ILSpy.AddIn/CodeElementXmlDocKeyProvider.cs +++ b/ILSpy.AddIn/CodeElementXmlDocKeyProvider.cs @@ -2,12 +2,18 @@ namespace ICSharpCode.ILSpy.AddIn { + /// + /// Provides XML documentation tags for Visual Studio CodeElements. + /// + /// + /// Used to support the "/navigateTo" command line option when opening ILSpy. Must match + /// the logic of ICSharpCode.ILSpy.XmlDoc.XmlDocKeyProvider, which does the same thing for + /// a Mono.Cecil.MemberReference. See "ID string format" in Appendix A of the C# language + /// specification for formatting requirements. + /// public static class CodeElementXmlDocKeyProvider { - // Get ID string for code element, for /navigateTo command line option. - // See "ID string format" in Appendix A of the C# language specification for details. - // See ICSharpCode.ILSpy.XmlDoc.XmlDocKeyProvider.GetKey for a similar implementation, based on Mono.Cecil.MemberReference. - public static string GetCodeElementIDString(EnvDTE.CodeElement codeElement) + public static string GetKey(EnvDTE.CodeElement codeElement) { switch (codeElement.Kind) { case EnvDTE.vsCMElement.vsCMElementEvent: diff --git a/ILSpy.AddIn/ILSpyAddInPackage.cs b/ILSpy.AddIn/ILSpyAddInPackage.cs index b9fc1caf5..28ba28e3c 100644 --- a/ILSpy.AddIn/ILSpyAddInPackage.cs +++ b/ILSpy.AddIn/ILSpyAddInPackage.cs @@ -180,7 +180,7 @@ namespace ICSharpCode.ILSpy.AddIn private void OpenCodeItemInILSpy(EnvDTE.CodeElement codeElement) { - string navigateTo = "/navigateTo:" + CodeElementXmlDocKeyProvider.GetCodeElementIDString(codeElement); + string navigateTo = "/navigateTo:" + CodeElementXmlDocKeyProvider.GetKey(codeElement); OpenProjectInILSpy(codeElement.ProjectItem.ContainingProject, navigateTo); }