本文整理汇总了C#中TextDocument.ParseIfTextChanged方法的典型用法代码示例。如果您正苦于以下问题:C# TextDocument.ParseIfTextChanged方法的具体用法?C# TextDocument.ParseIfTextChanged怎么用?C# TextDocument.ParseIfTextChanged使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextDocument
的用法示例。
在下文中一共展示了TextDocument.ParseIfTextChanged方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExtractRemainingSelection
private static void ExtractRemainingSelection(TextDocument ActiveDoc, SourceRange SelectRange)
{
// Extract Remaining Selection
CodeRush.Selection.SelectRange(SelectRange);
ExecuteRefactoring("Extract Method");
ActiveDoc.ParseIfTextChanged();
}
示例2: InlineTempVariables
private void InlineTempVariables(TextDocument ActiveDoc)
{
// Inline Temp Variables
for (int j = ToInline.Count - 1; j >= 0; j--)
{
var InitializedVar = GetInitializedVars(ToInline[j]).FirstOrDefault();
Select(InitializedVar.NameRange);
// Inline literal
ExecuteRefactoring("Inline Temp");
ActiveDoc.ParseIfTextChanged();
}
}
示例3: MoveLocalInitializationsAboveSelection
private void MoveLocalInitializationsAboveSelection(TextDocument ActiveDoc, SourceRange SelectRange)
{
// Move Local Initializations above Selection
for (int j = ToInline.Count - 1; j >= 0; j--)
{
var InitializedVar = GetInitializedVars(ToInline[j]).FirstOrDefault();
InitializedVar.MoveTo(SelectRange.Top, "MoveAssignment" + j);
ActiveDoc.ParseIfTextChanged();
}
}
示例4: ExtractPrimitivesAsLocals
private void ExtractPrimitivesAsLocals(TextDocument ActiveDoc, SourceRange SelectRange)
{
// Extract Primitives as Locals
var PrimitiveObjects = (from item in GetPrimitives(SelectRange).OfType<PrimitiveExpression>() select item).ToList();
int N = PrimitiveObjects.Count();
for (int i = PrimitiveObjects.Count - 1; i >= 0; i--)
{
N -= 1;
Select(PrimitiveObjects[i].Range);
ExecuteRefactoring("Introduce Local");
SetVarName("Param" + N);
ToInline.Add("Param" + N);
}
ActiveDoc.ParseIfTextChanged();
}