Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ExpressionToExpressionTextConverter.cs « Presentation « Core « Activities « System « System.Activities.Core.Presentation « referencesource « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 27efb89ebbb457b7258901d678a9a34eb8541e77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation.  All rights reserved.
//------------------------------------------------------------


namespace System.Activities.Core.Presentation
{
    using System.Windows.Media;
    using System.Windows.Data;
    using System.Windows;
    using System.Globalization;
    using System.Activities.Presentation;
    using System.Activities.Presentation.Model;

    class ExpressionToExpressionTextConverter : IValueConverter
    {

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            string convertedValue = null;
            ModelItem valueMI = value as ModelItem;
            if (valueMI != null)
            {
                convertedValue = ExpressionHelper.GetExpressionString(valueMI.GetCurrentValue() as Activity, valueMI.Parent);
            }
            return convertedValue;
        }


        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw FxTrace.Exception.AsError(new NotSupportedException());
        }

    }
}