Browse Source

Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
pull/3591/head
Jan Kučera 3 weeks ago committed by GitHub
parent
commit
c80c7deda4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      ILSpy/Commands/BrowseBackCommand.cs
  2. 2
      ILSpy/Commands/BrowseForwardCommand.cs
  3. 2
      ILSpy/Commands/SimpleCommand.cs
  4. 4
      ILSpy/Controls/MainToolBar.xaml.cs

2
ILSpy/Commands/BrowseBackCommand.cs

@ -57,7 +57,7 @@ namespace ICSharpCode.ILSpy @@ -57,7 +57,7 @@ namespace ICSharpCode.ILSpy
public IEnumerable ParameterList => assemblyTreeModel.GetNavigateHistory(false).Reverse();
public object GetParamaterText(object parameter)
public object GetParameterText(object parameter)
{
return (parameter as NavigationState)?.NavigationText;
}

2
ILSpy/Commands/BrowseForwardCommand.cs

@ -57,7 +57,7 @@ namespace ICSharpCode.ILSpy @@ -57,7 +57,7 @@ namespace ICSharpCode.ILSpy
public IEnumerable ParameterList => assemblyTreeModel.GetNavigateHistory(true).Reverse();
public object GetParamaterText(object parameter)
public object GetParameterText(object parameter)
{
return (parameter as NavigationState)?.NavigationText;
}

2
ILSpy/Commands/SimpleCommand.cs

@ -46,6 +46,6 @@ namespace ICSharpCode.ILSpy @@ -46,6 +46,6 @@ namespace ICSharpCode.ILSpy
public interface IProvideParameterList
{
IEnumerable ParameterList { get; }
object GetParamaterText(object parameter);
object GetParameterText(object parameter);
}
}

4
ILSpy/Controls/MainToolBar.xaml.cs

@ -148,7 +148,7 @@ namespace ICSharpCode.ILSpy.Controls @@ -148,7 +148,7 @@ namespace ICSharpCode.ILSpy.Controls
BindingOperations.SetBinding(dropDownToggle, IsEnabledProperty,
new Binding(nameof(IsEnabled)) { Source = toolbarItem });
// When the toggle button is checked, clicking it to uncheck will dimiss the menu first
// When the toggle button is checked, clicking it to uncheck will dismiss the menu first
// which unchecks the toggle button via binding above and the click is used to open it again.
// This is a workaround to ignore the click to uncheck the already unchecked toggle button.
// We have to ensure the dismissing click is on the toggle button, otherwise the flag
@ -189,7 +189,7 @@ namespace ICSharpCode.ILSpy.Controls @@ -189,7 +189,7 @@ namespace ICSharpCode.ILSpy.Controls
var headerPresenter = new ContentPresenter { RecognizesAccessKey = false };
parameterItem.Header = headerPresenter;
var header = parameterList.GetParamaterText(parameter);
var header = parameterList.GetParameterText(parameter);
switch (header)
{
case SharpTreeNode node:

Loading…
Cancel
Save