diff --git a/DnSpyCommon.props b/DnSpyCommon.props index b324bce11b..3e81f9fe42 100644 --- a/DnSpyCommon.props +++ b/DnSpyCommon.props @@ -55,7 +55,7 @@ 15.5.27130 13.0.3 5.0.1 - 4.11.0 + 4.12.0 9.0.0 6.12.1 9.0.553101 diff --git a/dnSpy/Roslyn/Roslyn.ExpressionCompiler b/dnSpy/Roslyn/Roslyn.ExpressionCompiler index 2855a033a7..2ca661a9fd 160000 --- a/dnSpy/Roslyn/Roslyn.ExpressionCompiler +++ b/dnSpy/Roslyn/Roslyn.ExpressionCompiler @@ -1 +1 @@ -Subproject commit 2855a033a749c7a3eb25993b584352e4e9cf6b86 +Subproject commit 2ca661a9fd4310e718731d21ba024dcdde0a689f diff --git a/dnSpy/Roslyn/dnSpy.Roslyn.EditorFeatures/SmartIndent/SmartIndent.cs b/dnSpy/Roslyn/dnSpy.Roslyn.EditorFeatures/SmartIndent/SmartIndent.cs index 9bb9a57d93..007a425613 100644 --- a/dnSpy/Roslyn/dnSpy.Roslyn.EditorFeatures/SmartIndent/SmartIndent.cs +++ b/dnSpy/Roslyn/dnSpy.Roslyn.EditorFeatures/SmartIndent/SmartIndent.cs @@ -50,7 +50,7 @@ public void Dispose() { } NewLine = _textView.Options.GetNewLineCharacter() }; - var indentationOptions = new IndentationOptions(SyntaxFormattingOptions.GetDefault(document.Project.Services) with { LineFormatting = lineFormattingOptions }); + var indentationOptions = new IndentationOptions(SyntaxFormattingOptions.CommonDefaults with { LineFormatting = lineFormattingOptions }); var parsedDocument = ParsedDocument.CreateSynchronously(document, cancellationToken); var result = newService.GetIndentation(parsedDocument, line.LineNumber, indentationOptions, cancellationToken); return result.GetIndentation(_textView, line); diff --git a/dnSpy/Roslyn/dnSpy.Roslyn.Internal/QuickInfo/Providers/AbstractSemanticQuickInfoProvider.cs b/dnSpy/Roslyn/dnSpy.Roslyn.Internal/QuickInfo/Providers/AbstractSemanticQuickInfoProvider.cs index 4cc93c5034..e29d8b1c4b 100644 --- a/dnSpy/Roslyn/dnSpy.Roslyn.Internal/QuickInfo/Providers/AbstractSemanticQuickInfoProvider.cs +++ b/dnSpy/Roslyn/dnSpy.Roslyn.Internal/QuickInfo/Providers/AbstractSemanticQuickInfoProvider.cs @@ -148,7 +148,7 @@ protected async Task CreateContentAsync(HostWorkspaceServices var symbols = tokenInformation.Symbols; // if generating quick info for an attribute, prefer bind to the class instead of the constructor - if (syntaxFactsService.IsAttributeName(token.Parent!)) { + if (syntaxFactsService.IsNameOfAttribute(token.Parent!)) { symbols = symbols.OrderBy((s1, s2) => s1.Kind == s2.Kind ? 0 : s1.Kind == SymbolKind.NamedType ? -1 : @@ -346,7 +346,7 @@ private ImmutableArray GetDocumentationContent(IEnumerable var symbol = symbols.First().OriginalDefinition; // if generating quick info for an attribute, bind to the class instead of the constructor - if (syntaxFactsService.IsAttributeName(token.Parent) && + if (syntaxFactsService.IsNameOfAttribute(token.Parent) && symbol.ContainingType?.IsAttribute() == true) { symbol = symbol.ContainingType; } diff --git a/dnSpy/Roslyn/dnSpy.Roslyn.Internal/SignatureHelp/SignatureHelpItems.cs b/dnSpy/Roslyn/dnSpy.Roslyn.Internal/SignatureHelp/SignatureHelpItems.cs index 8a41c2863f..fa4f7e5982 100644 --- a/dnSpy/Roslyn/dnSpy.Roslyn.Internal/SignatureHelp/SignatureHelpItems.cs +++ b/dnSpy/Roslyn/dnSpy.Roslyn.Internal/SignatureHelp/SignatureHelpItems.cs @@ -35,8 +35,8 @@ public SignatureHelpItems(SIGHLP.SignatureHelpItems signatureHelpItems) { if (signatureHelpItems == null) throw new ArgumentNullException(nameof(signatureHelpItems)); ApplicableSpan = signatureHelpItems.ApplicableSpan; - ArgumentCount = signatureHelpItems.ArgumentCount; - ArgumentIndex = signatureHelpItems.ArgumentIndex; + ArgumentCount = signatureHelpItems.SyntacticArgumentCount; + ArgumentIndex = signatureHelpItems.SemanticParameterIndex; ArgumentName = signatureHelpItems.ArgumentName; SelectedItemIndex = signatureHelpItems.SelectedItemIndex; Items = ToSignatureHelpItem(signatureHelpItems.Items); diff --git a/dnSpy/Roslyn/dnSpy.Roslyn.Internal/SignatureHelp/SignatureHelpService.Roslyn.cs b/dnSpy/Roslyn/dnSpy.Roslyn.Internal/SignatureHelp/SignatureHelpService.Roslyn.cs index c7accd7226..b5210e80fc 100644 --- a/dnSpy/Roslyn/dnSpy.Roslyn.Internal/SignatureHelp/SignatureHelpService.Roslyn.cs +++ b/dnSpy/Roslyn/dnSpy.Roslyn.Internal/SignatureHelp/SignatureHelpService.Roslyn.cs @@ -29,7 +29,7 @@ partial class SignatureHelpService { ISignatureHelpProvider[] providers, int caretPosition, SIGHLP.SignatureHelpTriggerInfo triggerInfo, - SignatureHelpOptions options, + MemberDisplayOptions options, Document document, CancellationToken cancellationToken) { ISignatureHelpProvider bestProvider = null; diff --git a/dnSpy/Roslyn/dnSpy.Roslyn.Internal/SignatureHelp/SignatureHelpService.cs b/dnSpy/Roslyn/dnSpy.Roslyn.Internal/SignatureHelp/SignatureHelpService.cs index 787b678b1f..5520300509 100644 --- a/dnSpy/Roslyn/dnSpy.Roslyn.Internal/SignatureHelp/SignatureHelpService.cs +++ b/dnSpy/Roslyn/dnSpy.Roslyn.Internal/SignatureHelp/SignatureHelpService.cs @@ -99,7 +99,7 @@ public static SignatureHelpService GetService(Document document) { } public async Task GetItemsAsync(Document document, int position, SignatureHelpTriggerInfo triggerInfo, CancellationToken cancellationToken = default(CancellationToken)) { - var res = await ComputeItemsAsync(signatureHelpProviders, position, triggerInfo.ToSignatureHelpTriggerInfo(), SignatureHelpOptions.Default, document, cancellationToken).ConfigureAwait(false); + var res = await ComputeItemsAsync(signatureHelpProviders, position, triggerInfo.ToSignatureHelpTriggerInfo(), MemberDisplayOptions.Default, document, cancellationToken).ConfigureAwait(false); return GetSignatureHelpResult(res, document); } diff --git a/dnSpy/Roslyn/dnSpy.Roslyn.Internal/SmartIndent/IndentationOptions.cs b/dnSpy/Roslyn/dnSpy.Roslyn.Internal/SmartIndent/IndentationOptions.cs index e8e1d60511..6967328d32 100644 --- a/dnSpy/Roslyn/dnSpy.Roslyn.Internal/SmartIndent/IndentationOptions.cs +++ b/dnSpy/Roslyn/dnSpy.Roslyn.Internal/SmartIndent/IndentationOptions.cs @@ -14,7 +14,5 @@ readonly record struct IndentationOptions([property: DataMember(Order = 0)] Synt public const FormattingOptions2.IndentStyle DefaultIndentStyle = FormattingOptions2.IndentStyle.Smart; - public static IndentationOptions GetDefault(LanguageServices languageServices) => - new IndentationOptions(SyntaxFormattingOptions.GetDefault(languageServices)); } } diff --git a/dnSpy/dnSpy/app.config b/dnSpy/dnSpy/app.config index 7cdc084a3f..5ba533b12d 100644 --- a/dnSpy/dnSpy/app.config +++ b/dnSpy/dnSpy/app.config @@ -58,55 +58,55 @@ - + - + - + - + - + - + - + - + - + - + - + - + - +