mirror of
https://github.com/bitwarden/mobile
synced 2026-01-02 08:33:17 +00:00
PM-3349 PM-3350 MAUI Migration Initial
This commit is contained in:
25
src/Core/Utilities/IsNotNullConverter.cs
Normal file
25
src/Core/Utilities/IsNotNullConverter.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using Microsoft.Maui.Controls;
|
||||
using Microsoft.Maui;
|
||||
|
||||
namespace Bit.App.Utilities
|
||||
{
|
||||
public class IsNotNullConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter,
|
||||
System.Globalization.CultureInfo culture)
|
||||
{
|
||||
if (targetType == typeof(bool))
|
||||
{
|
||||
return value != null;
|
||||
}
|
||||
throw new InvalidOperationException("The target must be a boolean.");
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter,
|
||||
System.Globalization.CultureInfo culture)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user