internal ChangeSignatureOptionsResult?GetChangeSignatureOptions(ChangeSignatureAnalyzedSucceedContext context)
        {
            var changeSignatureOptionsService = context.Solution.Workspace.Services.GetService <IChangeSignatureOptionsService>();

            return(changeSignatureOptionsService?.GetChangeSignatureOptions(
                       context.Document, context.InsertPosition, context.Symbol, context.ParameterConfiguration));
        }
        private ChangeSignatureResult ChangeSignatureWithContext(ChangeSignatureAnalyzedSucceedContext context, CancellationToken cancellationToken)
        {
            var options = GetChangeSignatureOptions(context);

            if (options == null)
            {
                return(new ChangeSignatureResult(succeeded: false));
            }

            return(ChangeSignatureWithContext(context, options, cancellationToken));
        }
        internal ChangeSignatureResult ChangeSignatureWithContext(ChangeSignatureAnalyzedSucceedContext context, ChangeSignatureOptionsResult options, CancellationToken cancellationToken)
        {
            var succeeded = TryCreateUpdatedSolution(context, options, cancellationToken, out var updatedSolution);

            return(new ChangeSignatureResult(succeeded, updatedSolution, context.Symbol.ToDisplayString(), context.Symbol.GetGlyph(), options.PreviewChanges));
        }
Exemplo n.º 4
0
 public ChangeSignatureCodeAction(AbstractChangeSignatureService changeSignatureService, ChangeSignatureAnalyzedSucceedContext context)
 {
     _changeSignatureService = changeSignatureService;
     _context = context;
 }