[PowerLauncher] Enable analyzer and fix warnings (#16900)

This commit is contained in:
CleanCodeDeveloper
2022-03-09 13:08:12 +01:00
committed by GitHub
parent eb961ee052
commit 46684966a1
4 changed files with 12 additions and 7 deletions

View File

@@ -17,13 +17,13 @@ namespace PowerLauncher.Converters
{
public class HighlightTextConverter : IMultiValueConverter
{
public object Convert(object[] value, Type targetType, object parameter, CultureInfo cultureInfo)
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
#pragma warning disable CA1062 // Validate arguments of public methods
var text = value[0] as string;
var text = values[0] as string;
#pragma warning restore CA1062 // Validate arguments of public methods
var highlightData = value[1] as List<int>;
var selected = value[2] as bool? == true;
var highlightData = values[1] as List<int>;
var selected = values[2] as bool? == true;
if (highlightData == null || !highlightData.Any())
{
@@ -51,7 +51,7 @@ namespace PowerLauncher.Converters
return textBlock;
}
public object[] ConvertBack(object value, Type[] targetType, object parameter, CultureInfo culture)
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
{
return new[] { DependencyProperty.UnsetValue, DependencyProperty.UnsetValue };
}