В настоящее время я пытаюсь добавить пользовательские подсказки в качестве расширения моей Visual Studio.Заменить значение словаря NewLine
Однако, при наведении над ключевым словом (потому что у меня очень длинные описания, я пытался использовать \ r \ n, но он явно не работает и будет отображаться как \ r \ n в подсказке инструмента, так что я использовал)
//var reader = new StreamReader(File.OpenRead(@"C:\xx\QuickInfo.csv"));
/*while (!reader.EndOfStream)
{
var line = reader.ReadLine();
var values = line.Split(',');
//add in values in position 0 and 1
m_dictionary.Add(values[0], values[1].Replace("<br>", Environment.NewLine));
}*/
пространство
internal class VCLToolTipSource: IQuickInfoSource
{
private VCLToolTipSourceProvider m_provider;
private ITextBuffer m_subjectBuffer;
private Dictionary<string, string> m_dictionary;
public VCLToolTipSource(VCLToolTipSourceProvider provider, ITextBuffer subjectBuffer)
{
m_provider = provider;
m_subjectBuffer = subjectBuffer;
m_dictionary = new Dictionary<string, string>();
//CSV for Quick Info
//var reader = new StreamReader(File.OpenRead(@"C:\xx\QuickInfo.csv"));
//For going through CSV positions 0,1//
/*while (!reader.EndOfStream)
{
var line = reader.ReadLine();
var values = line.Split(',');
//add in values in position 0 and 1
m_dictionary.Add(values[0], values[1].Replace("<br>", Environment.NewLine));
}*/
//List of all tool tips//
m_dictionary.Add("keyword", "value");
m_dictionary.Add("adapt", " - Process given file <br>Syntax: #adapt[(-samelevel|-continue|-samelevel-continue|-copy)][:] path [output-folder] [output-file](vcl-command)*[#endadapt]<br>Variations:<br><br> -samelevel : The scope of the adapted file will be raised to the current level which makes it possible to override variables<br> -continue : If the adaptable file is not found continue processing. (warning message instead of stop processing with error)<br>Note: #adapt-continue will open the file and process it. Unlike #adapt-copy.<br> -copy : Instead of processing the file");
который должен заменить все "< бр>" с Environment.Newline, чтобы сократить его.
Однако теперь, когда я не хочу использовать файл CSV для импорта данных, как я читать данные из словаря и заменить < бр> с Newline ??
Спасибо
Вы хотите, чтобы все значение было заменено на новую строку? или только
тег? –
Когда отмечен
, я хочу новую строку. –