using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Data; using Tango.PMR.Integration; namespace Tango.SharedUI.Converters { public class GenericMessageProtocolToStringConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { try { if (value != null) { GenericMessageProtocol protocol = (GenericMessageProtocol)value; if (protocol == GenericMessageProtocol.Json) { return "v1"; } else { return "v2"; } } } catch { } return "Unspecified"; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } }