Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ internal readonly struct RazorCohostRequestContext(RequestContext context)
{
internal string Method => context.Method;

[Obsolete("Use DocumentUri instead")]
internal Uri? Uri => context.TextDocument?.GetURI().GetRequiredParsedUri();
internal DocumentUri? DocumentUri => context.TextDocument?.GetURI();
/// <inheritdoc cref="RequestContext.Workspace"/>
internal Workspace? Workspace => context.Workspace;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,6 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.Razor
/// </summary>
internal static class RazorCSharpFormattingInteractionService
{
[Obsolete("This overload is for binary compat only. Use GetFormattingChangesAsync with all parameters instead.")]
public static Task<ImmutableArray<TextChange>> GetFormattingChangesAsync(
Document document,
char typedChar,
int position,
RazorIndentationOptions indentationOptions,
RazorAutoFormattingOptions autoFormattingOptions,
FormattingOptions.IndentStyle indentStyle,
CancellationToken cancellationToken)
=> GetFormattingChangesAsync(
document,
typedChar,
position,
indentationOptions,
autoFormattingOptions,
indentStyle,
csharpSyntaxFormattingOptionsOverride: null,
cancellationToken);

/// <summary>
/// Returns the text changes necessary to format the document after the user enters a
/// character. The position provided is the position of the caret in the document after
Expand Down Expand Up @@ -76,21 +57,6 @@ public static async Task<ImmutableArray<TextChange>> GetFormattingChangesAsync(
return formattingService.GetFormattingChangesOnTypedCharacter(documentSyntax, position, roslynIndentationOptions, cancellationToken);
}

[Obsolete("This overload is for binary compat only. Use GetFormattingChangesAsync with all parameters instead.")]
public static IList<TextChange> GetFormattedTextChanges(
HostWorkspaceServices services,
SyntaxNode root,
TextSpan span,
RazorIndentationOptions indentationOptions,
CancellationToken cancellationToken)
=> GetFormattedTextChanges(
services,
root,
span,
indentationOptions,
csharpSyntaxFormattingOptionsOverride: null,
cancellationToken);

public static IList<TextChange> GetFormattedTextChanges(
HostWorkspaceServices services,
SyntaxNode root,
Expand All @@ -103,19 +69,6 @@ public static IList<TextChange> GetFormattedTextChanges(
return Formatter.GetFormattedTextChanges(root, span, services.SolutionServices, GetFormattingOptions(services.SolutionServices, indentationOptions, csharpSyntaxFormattingOptionsOverride), cancellationToken);
}

[Obsolete("This overload is for binary compat only. Use GetFormattingChangesAsync with all parameters instead.")]
public static SyntaxNode Format(
HostWorkspaceServices services,
SyntaxNode root,
RazorIndentationOptions indentationOptions,
CancellationToken cancellationToken)
=> Format(
services,
root,
indentationOptions,
csharpSyntaxFormattingOptionsOverride: null,
cancellationToken);

public static SyntaxNode Format(
HostWorkspaceServices services,
SyntaxNode root,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.Razor.Features;

internal static class WorkspaceExtensions
{
[Obsolete("Use GetTextDocumentAsync with DocumentUri instead.")]
public static ValueTask<TextDocument?> GetTextDocumentAsync(this Workspace workspace, Uri uri, CancellationToken cancellationToken)
{
return GetTextDocumentAsync(workspace, new DocumentUri(uri), cancellationToken);
}

public static ValueTask<TextDocument?> GetTextDocumentAsync(this Workspace workspace, DocumentUri uri, CancellationToken cancellationToken)
{
var identifier = new TextDocumentIdentifier() { DocumentUri = uri };
Expand Down
Loading