mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 20:27:36 +02:00
[PowerLauncher] Enable analyzer and fix warnings (#16900)
This commit is contained in:
committed by
GitHub
parent
eb961ee052
commit
46684966a1
@@ -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 };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user