提交 3c62f4a0 编写于 作者: D David Poeschl

ChangeSig - Don't crash on cancel when invoked from the lightbulb

上级 571f437b
......@@ -25,9 +25,8 @@ public ChangeSignatureCodeAction(AbstractChangeSignatureService changeSignatureS
public override string Title => FeaturesResources.Change_signature;
public override object GetOptions(CancellationToken cancellationToken)
=> AbstractChangeSignatureService.GetChangeSignatureOptions(_context)
?? new ChangeSignatureOptionsResult(null!, false);
public override object? GetOptions(CancellationToken cancellationToken)
=> AbstractChangeSignatureService.GetChangeSignatureOptions(_context);
protected override Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync(object options, CancellationToken cancellationToken)
{
......
......@@ -24,14 +24,14 @@ public abstract class CodeActionWithOptions : CodeAction
/// </summary>
/// <param name="cancellationToken">A cancellation token.</param>
/// <returns>An implementation specific object instance that holds options for applying the code action.</returns>
public abstract object GetOptions(CancellationToken cancellationToken);
public abstract object? GetOptions(CancellationToken cancellationToken);
/// <summary>
/// Gets the <see cref="CodeActionOperation"/>'s for this <see cref="CodeAction"/> given the specified options.
/// </summary>
/// <param name="options">An object instance returned from a prior call to <see cref="GetOptions(CancellationToken)"/>.</param>
/// <param name="cancellationToken">A cancellation token.</param>
public async Task<IEnumerable<CodeActionOperation>?> GetOperationsAsync(object options, CancellationToken cancellationToken)
public async Task<IEnumerable<CodeActionOperation>?> GetOperationsAsync(object? options, CancellationToken cancellationToken)
{
if (options == null)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册