提交 02c3c21a 编写于 作者: D Dustin Campbell

CR Feedback: 'Class View' should not be localized and simplify a lambda parameter

上级 96e30295
......@@ -19,6 +19,8 @@ namespace Microsoft.VisualStudio.LanguageServices.Implementation.Library.ClassVi
internal abstract class AbstractSyncClassViewCommandHandler : ForegroundThreadAffinitizedObject,
ICommandHandler<SyncClassViewCommandArgs>
{
private const string ClassView = "Class View";
private readonly IServiceProvider _serviceProvider;
private readonly IWaitIndicator _waitIndicator;
......@@ -47,8 +49,8 @@ public void ExecuteCommand(SyncClassViewCommandArgs args, Action nextHandler)
var snapshot = args.SubjectBuffer.CurrentSnapshot;
_waitIndicator.Wait(
title: ServicesVSResources.SynchronizeClassView,
message: ServicesVSResources.SynchronizingClassView,
title: string.Format(ServicesVSResources.SynchronizeClassView, ClassView),
message: string.Format(ServicesVSResources.SynchronizingWithClassView, ClassView),
allowCancel: true,
action: context =>
{
......
......@@ -1084,7 +1084,7 @@ internal class ServicesVSResources {
}
/// <summary>
/// Looks up a localized string similar to Synchronize Class View.
/// Looks up a localized string similar to Synchronize {0}.
/// </summary>
internal static string SynchronizeClassView {
get {
......@@ -1093,11 +1093,11 @@ internal class ServicesVSResources {
}
/// <summary>
/// Looks up a localized string similar to Synchronizing Class View....
/// Looks up a localized string similar to Synchronizing with {0}....
/// </summary>
internal static string SynchronizingClassView {
internal static string SynchronizingWithClassView {
get {
return ResourceManager.GetString("SynchronizingClassView", resourceCulture);
return ResourceManager.GetString("SynchronizingWithClassView", resourceCulture);
}
}
......
......@@ -508,9 +508,9 @@ Use the dropdown to view and switch to other projects this file may belong to.</
<value>This workspace only supports opening documents on the UI thread.</value>
</data>
<data name="SynchronizeClassView" xml:space="preserve">
<value>Synchronize Class View</value>
<value>Synchronize {0}</value>
</data>
<data name="SynchronizingClassView" xml:space="preserve">
<value>Synchronizing Class View...</value>
<data name="SynchronizingWithClassView" xml:space="preserve">
<value>Synchronizing with {0}...</value>
</data>
</root>
\ No newline at end of file
......@@ -36,14 +36,14 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.ClassView
If _canonicalNodes IsNot Nothing Then
Dim enumerator As IVsEnumNavInfoNodes = Nothing
IsOK(Function() _navInfo.EnumCanonicalNodes(enumerator))
IsOK(_navInfo.EnumCanonicalNodes(enumerator))
VerifyNodes(enumerator, _canonicalNodes)
End If
If _presentationNodes IsNot Nothing Then
Dim enumerator As IVsEnumNavInfoNodes = Nothing
IsOK(Function() _navInfo.EnumPresentationNodes(CUInt(_LIB_LISTFLAGS.LLF_NONE), enumerator))
IsOK(_navInfo.EnumPresentationNodes(CUInt(_LIB_LISTFLAGS.LLF_NONE), enumerator))
VerifyNodes(enumerator, _presentationNodes)
End If
......
......@@ -6,8 +6,8 @@ Imports Microsoft.VisualStudio.Shell.Interop
Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Utilities.VsNavInfo
Friend Module VsNavInfoHelpers
Public Sub IsOK(comAction As Func(Of Integer))
Assert.Equal(VSConstants.S_OK, comAction())
Public Sub IsOK(result As Integer)
Assert.Equal(VSConstants.S_OK, result)
End Sub
Public Delegate Sub NodeVerifier(vsNavInfoNode As IVsNavInfoNode)
......@@ -15,11 +15,11 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Utilities.VsNavInfo
Private Function Node(expectedListType As _LIB_LISTTYPE, expectedName As String) As NodeVerifier
Return Sub(vsNavInfoNode)
Dim listType As UInteger
IsOK(Function() vsNavInfoNode.get_Type(listType))
IsOK(vsNavInfoNode.get_Type(listType))
Assert.Equal(CUInt(expectedListType), listType)
Dim actualName As String = Nothing
IsOK(Function() vsNavInfoNode.get_Name(actualName))
IsOK(vsNavInfoNode.get_Name(actualName))
Assert.Equal(expectedName, actualName)
End Sub
End Function
......
......@@ -836,14 +836,14 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.VsNavInfo
If canonicalNodes IsNot Nothing Then
Dim enumerator As IVsEnumNavInfoNodes = Nothing
IsOK(Function() navInfo.EnumCanonicalNodes(enumerator))
IsOK(navInfo.EnumCanonicalNodes(enumerator))
VerifyNodes(enumerator, canonicalNodes)
End If
If presentationNodes IsNot Nothing Then
Dim enumerator As IVsEnumNavInfoNodes = Nothing
IsOK(Function() navInfo.EnumPresentationNodes(CUInt(_LIB_LISTFLAGS.LLF_NONE), enumerator))
IsOK(navInfo.EnumPresentationNodes(CUInt(_LIB_LISTFLAGS.LLF_NONE), enumerator))
VerifyNodes(enumerator, presentationNodes)
End If
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册