1 // -------------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation. All Rights Reserved.
3 // -------------------------------------------------------------------
4 //From \\authoring\Sparkle\Source\1.0.1083.0\Common\Source\Framework\Data
5 namespace System.Activities.Presentation.Internal.PropertyEditing.FromExpression.Framework.Data
8 using System.ComponentModel;
9 using System.Diagnostics;
10 using System.Globalization;
11 using System.Reflection;
13 using System.Windows.Data;
14 using System.Diagnostics.CodeAnalysis;
18 // (object-to-string) Takes an object and returns a new string that is the object's ToString()
19 // with the value of the suffix property appended to it.
22 [SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")]
23 internal class AppendSuffixConverter : IValueConverter
26 private string suffix;
29 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
42 // IValueConverter Implementation
43 public object ConvertBack(object o, Type targetType, object value, CultureInfo culture)
45 Fx.Assert(false, "AppendSuffixConverter do not support inverse transform.");
49 public object Convert(object o, Type targetType, object parameter, CultureInfo culture)
51 return o.ToString() + this.Suffix;