当前位置: 首页>>代码示例>>C#>>正文


C# PrimitiveExpression.AcceptVisitor方法代码示例

本文整理汇总了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;
        }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:15,代码来源:ResourceCodeCompletionItem.cs

示例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;
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:27,代码来源:ResourceCodeCompletionData.cs


注:本文中的ICSharpCode.NRefactory.Ast.PrimitiveExpression.AcceptVisitor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。