Esempio n. 1
0
        static PrimitiveExpression CreateFormatString(RefactoringContext context, PrimitiveExpression pExpr, int argumentNumber)
        {
            var start = context.GetOffset(pExpr.StartLocation);
            var end   = context.GetOffset(pExpr.EndLocation);

            return(new PrimitiveExpression("", context.GetText(start, context.SelectionStart - start) + "{" + argumentNumber + "}" + context.GetText(context.SelectionEnd, end - context.SelectionEnd)));
        }