using SewerStammGen.Shared.Enum;
using System;
using System.CodeDom;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace StammGenerator.Converters
{
    public class EqualValueToParameterConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return value.ToString() == parameter.ToString();
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (targetType == typeof(EEntwaeserung)) return (EEntwaeserung)parameter;
            if (targetType == typeof(EExportType)) return (EExportType)parameter;
            if (targetType == typeof(EKodierungssystem)) return (EKodierungssystem)parameter;
            if (targetType == typeof(ESchachtType)) return (ESchachtType)parameter;
            throw new NotImplementedException();
        }
    }
}
