コード例 #1
0
        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
                        }
                    });
                }
            }
        }
コード例 #2
0
 private static ParameterInformation ConvertParameter(SignatureHelpParameter parameter, CancellationToken cancellationToken)
 {
     return(new ParameterInformation
     {
         Label = parameter.Name,
         Documentation = parameter.DocumentationFactory(cancellationToken).GetFullText()
     });
 }
コード例 #3
0
ファイル: Parameter.cs プロジェクト: wagnerhsu/tools-dnSpy
 void InitializeDocumentation()
 {
     documentationTaggedText = parameter.DocumentationFactory(CancellationToken.None).ToArray();
     documentation           = ToString(documentationTaggedText);
 }