-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
55 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
src/Workspaces/Core/Portable/FindSymbols/SymbolFinder.EmptyServerCallback.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.Threading.Tasks; | ||
using Microsoft.CodeAnalysis.Remote; | ||
using Microsoft.CodeAnalysis.Text; | ||
using Roslyn.Utilities; | ||
|
||
namespace Microsoft.CodeAnalysis.FindSymbols | ||
{ | ||
public static partial class SymbolFinder | ||
{ | ||
internal sealed class EmptyServerCallback : IRemoteSymbolFinderService.ICallback | ||
{ | ||
public static readonly EmptyServerCallback Instance = new(); | ||
|
||
private EmptyServerCallback() | ||
{ | ||
} | ||
|
||
public ValueTask AddItemsAsync(int count) | ||
=> throw ExceptionUtilities.Unreachable; | ||
|
||
public ValueTask ItemCompletedAsync() | ||
=> throw ExceptionUtilities.Unreachable; | ||
|
||
public ValueTask OnLiteralReferenceFoundAsync(DocumentId documentId, TextSpan span) | ||
=> throw ExceptionUtilities.Unreachable; | ||
|
||
public ValueTask OnCompletedAsync() | ||
=> throw ExceptionUtilities.Unreachable; | ||
|
||
public ValueTask OnDefinitionFoundAsync(SerializableSymbolAndProjectId definition) | ||
=> throw ExceptionUtilities.Unreachable; | ||
|
||
public ValueTask OnFindInDocumentCompletedAsync(DocumentId documentId) | ||
=> throw ExceptionUtilities.Unreachable; | ||
|
||
public ValueTask OnFindInDocumentStartedAsync(DocumentId documentId) | ||
=> throw ExceptionUtilities.Unreachable; | ||
|
||
public ValueTask OnReferenceFoundAsync(SerializableSymbolAndProjectId definition, SerializableReferenceLocation reference) | ||
=> throw ExceptionUtilities.Unreachable; | ||
|
||
public ValueTask OnStartedAsync() | ||
=> throw ExceptionUtilities.Unreachable; | ||
} | ||
} | ||
} |