using System;
using System.Globalization;
using System.Windows.Data;

namespace Ion.Sdk.DemoApp.Framework.Converters
{
    /// <summary>
    /// Converts null value to boolean. Returns true if value null, false otherwise.
    /// </summary>
    public class NullToBooleanConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 
            => value == null;

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
