Mono exception to SocketException
[mono.git] / mcs / class / referencesource / System.Activities.Presentation / System.Activities.Core.Presentation / System / Activities / Core / Presentation / ExpressionToExpressionTextConverter.cs
1 //------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation.  All rights reserved.
3 //------------------------------------------------------------
4
5
6 namespace System.Activities.Core.Presentation
7 {
8     using System.Windows.Media;
9     using System.Windows.Data;
10     using System.Windows;
11     using System.Globalization;
12     using System.Activities.Presentation;
13     using System.Activities.Presentation.Model;
14
15     class ExpressionToExpressionTextConverter : IValueConverter
16     {
17
18         public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
19         {
20             string convertedValue = null;
21             ModelItem valueMI = value as ModelItem;
22             if (valueMI != null)
23             {
24                 convertedValue = ExpressionHelper.GetExpressionString(valueMI.GetCurrentValue() as Activity, valueMI.Parent);
25             }
26             return convertedValue;
27         }
28
29
30         public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
31         {
32             throw FxTrace.Exception.AsError(new NotSupportedException());
33         }
34
35     }
36 }