Exemplo n.º 1
0
        public static async Task <bool> TryNavigateToPositionAsync(
            this IDocumentNavigationService service, IThreadingContext threadingContext, Workspace workspace, DocumentId documentId, int position, int virtualSpace, NavigationOptions options, CancellationToken cancellationToken)
        {
            var location = await service.GetLocationForPositionAsync(workspace, documentId, position, virtualSpace, cancellationToken).ConfigureAwait(false);

            return(await location.TryNavigateToAsync(threadingContext, options, cancellationToken).ConfigureAwait(false));
        }
 public static Task <INavigableLocation?> GetLocationForPositionAsync(this IDocumentNavigationService service, Workspace workspace, DocumentId documentId, int position, CancellationToken cancellationToken)
 => service.GetLocationForPositionAsync(workspace, documentId, position, virtualSpace: 0, cancellationToken);