本文整理汇总了C#中ICSharpCode.NRefactory.Ast.PrimitiveExpression.AcceptVisitor方法的典型用法代码示例。如果您正苦于以下问题:C# PrimitiveExpression.AcceptVisitor方法的具体用法?C# PrimitiveExpression.AcceptVisitor怎么用?C# PrimitiveExpression.AcceptVisitor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICSharpCode.NRefactory.Ast.PrimitiveExpression
的用法示例。
在下文中一共展示了PrimitiveExpression.AcceptVisitor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CompleteInternal
protected void CompleteInternal(CompletionContext context, string key)
{
string insertString;
if (this.outputVisitor != null) {
PrimitiveExpression pre = new PrimitiveExpression(key, key);
pre.AcceptVisitor(this.outputVisitor, null);
insertString = this.outputVisitor.Text;
} else {
insertString = key;
}
context.Editor.Document.Replace(context.StartOffset, context.Length, insertString);
context.EndOffset = context.StartOffset + insertString.Length;
}
示例2: InsertAction
/// <summary>
/// Insert the element represented by the completion data into the text
/// editor.
/// </summary>
/// <param name="textArea">TextArea to insert the completion data in.</param>
/// <param name="ch">Character that should be inserted after the completion data.
/// \0 when no character should be inserted.</param>
/// <returns>Returns true when the insert action has processed the character
/// <paramref name="ch"/>; false when the character was not processed.</returns>
public override bool InsertAction(TextArea textArea, char ch)
{
string insertString;
if (this.outputVisitor != null) {
PrimitiveExpression pre = new PrimitiveExpression(this.Text, this.Text);
pre.AcceptVisitor(this.outputVisitor, null);
insertString = this.outputVisitor.Text;
} else {
insertString = this.Text;
}
textArea.InsertString(insertString);
if (ch == insertString[insertString.Length - 1]) {
return true;
}
return false;
}