/ src / modules / FileLocksmith / FileLocksmithUI / Converters / FileCountConverter.cs
FileCountConverter.cs
 1  // Copyright (c) Microsoft Corporation
 2  // The Microsoft Corporation licenses this file to you under the MIT license.
 3  // See the LICENSE file in the project root for more information.
 4  
 5  using System;
 6  
 7  using Microsoft.UI.Xaml.Data;
 8  
 9  namespace PowerToys.FileLocksmithUI.Converters
10  {
11      public sealed partial class FileCountConverter : IValueConverter
12      {
13          public object Convert(object value, Type targetType, object parameter, string language)
14          {
15  #pragma warning disable CA1305 // Specify IFormatProvider
16              return ((string[])value).Length.ToString();
17  #pragma warning restore CA1305 // Specify IFormatProvider
18          }
19  
20          public object ConvertBack(object value, Type targetType, object parameter, string language)
21          {
22              return value;
23          }
24      }
25  }