markus / KCOM / Common / Converter / MarkupDataToConverter.cs @ ac4f1e13
이력 | 보기 | 이력해설 | 다운로드 (997 Bytes)
1 | 5529d2a2 | humkyung | using MarkupToPDF.Controls.Parsing; |
---|---|---|---|
2 | using System; |
||
3 | 787a4489 | KangIngu | using System.Collections.Generic; |
4 | using System.Globalization; |
||
5 | using System.Linq; |
||
6 | using System.Text; |
||
7 | ac4f1e13 | taeseongkim | using System.Threading.Tasks; |
8 | 787a4489 | KangIngu | using System.Windows.Data; |
9 | |||
10 | namespace KCOM.Common.Converter |
||
11 | { |
||
12 | public class MarkupDataToConverter : IValueConverter |
||
13 | { |
||
14 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) |
||
15 | { |
||
16 | if (value != null) |
||
17 | { |
||
18 | if (value is string) |
||
19 | { |
||
20 | ac4f1e13 | taeseongkim | var task = MarkupParser.GetMemoAsync(value.ToString()).ConfigureAwait(true); |
21 | |||
22 | return task.GetAwaiter().GetResult(); |
||
23 | 787a4489 | KangIngu | } |
24 | } |
||
25 | else |
||
26 | { |
||
27 | return ""; |
||
28 | } |
||
29 | return null; |
||
30 | } |
||
31 | |||
32 | |||
33 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) |
||
34 | { |
||
35 | throw new NotImplementedException(); |
||
36 | } |
||
37 | } |
||
38 | } |