object GetToolTip(DotNetEmbeddedResource resource, HexPosition position) { var mdHeaders = resource.ResourceProvider.File.GetHeaders <DotNetMetadataHeaders>(); Debug.Assert(mdHeaders != null); if (mdHeaders == null) { return(null); } var rec = mdHeaders.TablesStream?.GetRecord(resource.Token); Debug.Assert(rec != null); if (rec == null) { return(null); } const int NameColumn = 2; var filteredName = NameUtils.FilterName(mdHeaders.StringsStream?.Read(rec.ReadColumn(NameColumn)) ?? string.Empty); var toolTipCreator = toolTipCreatorFactory.Create(); var contentCreator = toolTipCreator.ToolTipContentCreator; contentCreator.Image = GetResourceImage(resource, filteredName); contentCreator.Writer.WriteFilename(filteredName); contentCreator.Writer.WriteSpace(); contentCreator.Writer.Write("(", PredefinedClassifiedTextTags.Punctuation); contentCreator.Writer.WriteToken(resource.Token.Raw); contentCreator.Writer.Write(")", PredefinedClassifiedTextTags.Punctuation); contentCreator.CreateNewWriter(); contentCreator.Writer.WriteFieldAndValue(resource, position); return(toolTipCreator.Create()); }