private void AddParameterSignatureHelp(int index, SignatureHelpParameter param, Panel headerPanel, Panel contentPanel) { var isSelected = _signatureHelp.ArgumentIndex == index; headerPanel.Children.Add(ToTextBlock(param.DisplayParts, bold: isSelected)); if (index != _item.Parameters.Length - 1) { headerPanel.Children.Add(ToTextBlock(_item.SeparatorDisplayParts)); } if (isSelected) { var textBlock = param.DocumentationFactory(CancellationToken.None).ToTextBlock(); if (textBlock != null && textBlock.Inlines.Count > 0) { contentPanel.Children.Add(new StackPanel { Orientation = Orientation.Horizontal, Children = { new TextBlock { Text = param.Name + ": ", FontWeight = FontWeights.Bold }, textBlock } }); } } }
private static ParameterInformation ConvertParameter(SignatureHelpParameter parameter, CancellationToken cancellationToken) { return(new ParameterInformation { Label = parameter.Name, Documentation = parameter.DocumentationFactory(cancellationToken).GetFullText() }); }
void InitializeDocumentation() { documentationTaggedText = parameter.DocumentationFactory(CancellationToken.None).ToArray(); documentation = ToString(documentationTaggedText); }