Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master to master-vs-deps #49251

Merged
4 commits merged into from
Nov 9, 2020
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 @@ -11,7 +11,6 @@
using System.Globalization;
using System.Reflection;
using System.Reflection.Metadata;
using System.Runtime.CompilerServices;
using System.Threading;
using Microsoft.CodeAnalysis.CSharp.DocumentationComments;
using Microsoft.CodeAnalysis.CSharp.Emit;
Expand Down Expand Up @@ -1194,9 +1193,6 @@ private MethodKind ComputeMethodKind()

public override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations
{
// Disabling optimization to work around a JIT bug in .NET 5.
// See https://github.com/dotnet/roslyn/issues/46575
[MethodImpl(MethodImplOptions.NoOptimization)]
get
{
var explicitInterfaceImplementations = _lazyExplicitMethodImplementations;
Expand Down
3 changes: 3 additions & 0 deletions src/EditorFeatures/CSharp/CSharpEditorResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,7 @@
<data name="_0_items_in_cache" xml:space="preserve">
<value>'{0}' items in cache</value>
</data>
<data name="Generate_Event_Subscription" xml:space="preserve">
<value>Generate Event Subscription</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
#nullable disable

using Microsoft.VisualStudio.Commanding;
using Microsoft.VisualStudio.LanguageServices.CSharp;
using Microsoft.VisualStudio.Text.Editor.Commanding.Commands;

namespace Microsoft.CodeAnalysis.Editor.CSharp.EventHookup
{
internal partial class EventHookupCommandHandler :
ICommandHandler<EscapeKeyCommandArgs>
{
public string DisplayName => CSharpVSResources.Generate_Event_Subscription;
public string DisplayName => CSharpEditorResources.Generate_Event_Subscription;

public bool ExecuteCommand(EscapeKeyCommandArgs args, CommandExecutionContext context)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ private Solution CreateSolutionWithEventHandler(
formattedDocument.Id, formattedDocument.GetTextSynchronously(cancellationToken));
}

private Document AddMethodNameAndAnnotationsToSolution(
private static Document AddMethodNameAndAnnotationsToSolution(
Document document,
string eventHandlerMethodName,
int position,
Expand Down Expand Up @@ -213,7 +213,7 @@ private Document AddMethodNameAndAnnotationsToSolution(
return documentWithNameAdded.WithSyntaxRoot(rootWithUpdatedEventHookupExpression);
}

private SyntaxNode AddGeneratedHandlerMethodToSolution(
private static SyntaxNode AddGeneratedHandlerMethodToSolution(
SemanticDocument document,
string eventHandlerMethodName,
SyntaxAnnotation plusEqualsTokenAnnotation,
Expand All @@ -236,7 +236,7 @@ private SyntaxNode AddGeneratedHandlerMethodToSolution(
return root.ReplaceNode(typeDecl, typeDeclWithMethodAdded);
}

private IMethodSymbol GetMethodSymbol(
private static IMethodSymbol GetMethodSymbol(
SemanticDocument semanticDocument,
string eventHandlerMethodName,
AssignmentExpressionSyntax eventHookupExpression,
Expand Down
5 changes: 5 additions & 0 deletions src/EditorFeatures/CSharp/xlf/CSharpEditorResources.cs.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
<target state="translated">Našlo se jedno sestavení: {0}</target>
<note />
</trans-unit>
<trans-unit id="Generate_Event_Subscription">
<source>Generate Event Subscription</source>
<target state="translated">Generovat odběr událostí</target>
<note />
</trans-unit>
<trans-unit id="Load_from_0">
<source>Load from: '{0}'</source>
<target state="translated">Načíst z {0}</target>
Expand Down
5 changes: 5 additions & 0 deletions src/EditorFeatures/CSharp/xlf/CSharpEditorResources.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
<target state="translated">Einzelne Assembly gefunden: {0}</target>
<note />
</trans-unit>
<trans-unit id="Generate_Event_Subscription">
<source>Generate Event Subscription</source>
<target state="translated">Ereignisabonnement generieren</target>
<note />
</trans-unit>
<trans-unit id="Load_from_0">
<source>Load from: '{0}'</source>
<target state="translated">Laden von: {0}</target>
Expand Down
5 changes: 5 additions & 0 deletions src/EditorFeatures/CSharp/xlf/CSharpEditorResources.es.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
<target state="translated">Se encontró un solo ensamblado: "{0}"</target>
<note />
</trans-unit>
<trans-unit id="Generate_Event_Subscription">
<source>Generate Event Subscription</source>
<target state="translated">Generar suscripción de eventos</target>
<note />
</trans-unit>
<trans-unit id="Load_from_0">
<source>Load from: '{0}'</source>
<target state="translated">Cargar desde: "{0}"</target>
Expand Down
5 changes: 5 additions & 0 deletions src/EditorFeatures/CSharp/xlf/CSharpEditorResources.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
<target state="translated">Un seul assembly trouvé : '{0}'</target>
<note />
</trans-unit>
<trans-unit id="Generate_Event_Subscription">
<source>Generate Event Subscription</source>
<target state="translated">Générer un abonnement à des événements</target>
<note />
</trans-unit>
<trans-unit id="Load_from_0">
<source>Load from: '{0}'</source>
<target state="translated">Charger à partir de : '{0}'</target>
Expand Down
5 changes: 5 additions & 0 deletions src/EditorFeatures/CSharp/xlf/CSharpEditorResources.it.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
<target state="translated">È stato trovato un solo assembly: '{0}'</target>
<note />
</trans-unit>
<trans-unit id="Generate_Event_Subscription">
<source>Generate Event Subscription</source>
<target state="translated">Genera sottoscrizione di eventi</target>
<note />
</trans-unit>
<trans-unit id="Load_from_0">
<source>Load from: '{0}'</source>
<target state="translated">Carica da: '{0}'</target>
Expand Down
5 changes: 5 additions & 0 deletions src/EditorFeatures/CSharp/xlf/CSharpEditorResources.ja.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
<target state="translated">読み込み元: '{0}'</target>
<note />
</trans-unit>
<trans-unit id="Generate_Event_Subscription">
<source>Generate Event Subscription</source>
<target state="translated">イベント サブスクリプションの生成</target>
<note />
</trans-unit>
<trans-unit id="Module_not_found">
<source>Module not found!</source>
<target state="translated">モジュールが見つかりません。</target>
Expand Down
5 changes: 5 additions & 0 deletions src/EditorFeatures/CSharp/xlf/CSharpEditorResources.ko.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
<target state="translated">단일 어셈블리를 찾았습니다. '{0}'</target>
<note />
</trans-unit>
<trans-unit id="Generate_Event_Subscription">
<source>Generate Event Subscription</source>
<target state="translated">이벤트 구독 생성</target>
<note />
</trans-unit>
<trans-unit id="Load_from_0">
<source>Load from: '{0}'</source>
<target state="translated">로드 위치: '{0}'</target>
Expand Down
5 changes: 5 additions & 0 deletions src/EditorFeatures/CSharp/xlf/CSharpEditorResources.pl.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
<target state="translated">Znaleziono pojedynczy zestaw: „{0}”</target>
<note />
</trans-unit>
<trans-unit id="Generate_Event_Subscription">
<source>Generate Event Subscription</source>
<target state="translated">Generuj subskrypcję zdarzenia</target>
<note />
</trans-unit>
<trans-unit id="Load_from_0">
<source>Load from: '{0}'</source>
<target state="translated">Załaduj z: „{0}”</target>
Expand Down
5 changes: 5 additions & 0 deletions src/EditorFeatures/CSharp/xlf/CSharpEditorResources.pt-BR.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
<target state="translated">Foi encontrado um assembly: '{0}'</target>
<note />
</trans-unit>
<trans-unit id="Generate_Event_Subscription">
<source>Generate Event Subscription</source>
<target state="translated">Gerar Assinatura de Evento</target>
<note />
</trans-unit>
<trans-unit id="Load_from_0">
<source>Load from: '{0}'</source>
<target state="translated">Carregar de: '{0}'</target>
Expand Down
5 changes: 5 additions & 0 deletions src/EditorFeatures/CSharp/xlf/CSharpEditorResources.ru.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
<target state="translated">Найдена одна сборка: "{0}"</target>
<note />
</trans-unit>
<trans-unit id="Generate_Event_Subscription">
<source>Generate Event Subscription</source>
<target state="translated">Создать подписку на события</target>
<note />
</trans-unit>
<trans-unit id="Load_from_0">
<source>Load from: '{0}'</source>
<target state="translated">Загрузить из: "{0}"</target>
Expand Down
5 changes: 5 additions & 0 deletions src/EditorFeatures/CSharp/xlf/CSharpEditorResources.tr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
<target state="translated">Tek bütünleştirilmiş kod bulundu: '{0}'</target>
<note />
</trans-unit>
<trans-unit id="Generate_Event_Subscription">
<source>Generate Event Subscription</source>
<target state="translated">Olay Aboneliği Oluştur</target>
<note />
</trans-unit>
<trans-unit id="Load_from_0">
<source>Load from: '{0}'</source>
<target state="translated">Şuradan yükle: '{0}'</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
<target state="translated">找到单个程序集: "{0}"</target>
<note />
</trans-unit>
<trans-unit id="Generate_Event_Subscription">
<source>Generate Event Subscription</source>
<target state="translated">生成事件订阅</target>
<note />
</trans-unit>
<trans-unit id="Load_from_0">
<source>Load from: '{0}'</source>
<target state="translated">从以下位置加载: "{0}"</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
<target state="translated">找到單一組件: '{0}'</target>
<note />
</trans-unit>
<trans-unit id="Generate_Event_Subscription">
<source>Generate Event Subscription</source>
<target state="translated">產生事件訂閱</target>
<note />
</trans-unit>
<trans-unit id="Load_from_0">
<source>Load from: '{0}'</source>
<target state="translated">載入來源: '{0}'</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ private void C_MyEvent()
testState.AssertCodeIs(expectedCode);
}

private OptionsCollection QualifyMethodAccessWithNotification(NotificationOption2 notification)
private static OptionsCollection QualifyMethodAccessWithNotification(NotificationOption2 notification)
=> new OptionsCollection(LanguageNames.CSharp) { { CodeStyleOptions2.QualifyMethodAccess, true, notification } };
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.EventHookup
{
internal sealed class EventHookupTestState : AbstractCommandHandlerTestState
{
// TODO: It seems that we can move EventHookupSessionManager to EditorFeatures (https://github.com/dotnet/roslyn/issues/46280)
private static readonly TestComposition s_composition = EditorTestCompositions.EditorFeaturesWpf.AddParts(
typeof(EventHookupCommandHandler),
typeof(EventHookupSessionManager));
Expand Down

This file was deleted.

This file was deleted.

Loading