diff options
Diffstat (limited to 'Decompiler/Gestor.Application.Converters/ManutencaoPagamentoGroupHeaderConverter.cs')
| -rw-r--r-- | Decompiler/Gestor.Application.Converters/ManutencaoPagamentoGroupHeaderConverter.cs | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Decompiler/Gestor.Application.Converters/ManutencaoPagamentoGroupHeaderConverter.cs b/Decompiler/Gestor.Application.Converters/ManutencaoPagamentoGroupHeaderConverter.cs new file mode 100644 index 0000000..a63b746 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/ManutencaoPagamentoGroupHeaderConverter.cs @@ -0,0 +1,37 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; +using Gestor.Model.Domain.Ferramentas; + +namespace Gestor.Application.Converters; + +public class ManutencaoPagamentoGroupHeaderConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + //IL_001a: Unknown result type (might be due to invalid IL or missing references) + //IL_0020: Expected O, but got Unknown + if (value == null || parameter == null) + { + return null; + } + if (!(parameter is string)) + { + return null; + } + string name = parameter.ToString(); + ManutencaoPagamentos val = (ManutencaoPagamentos)value; + return ((object)val).GetType().GetProperty(name).GetValue(val, null); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} |