Browse Source

StringFormatConverter -> StringFormatValueConverter

Steven Kirk 7 years ago
parent
commit
6a14747eb6

+ 2 - 2
src/Avalonia.Base/Data/Converters/StringFormatConverter.cs → src/Avalonia.Base/Data/Converters/StringFormatValueConverter.cs

@@ -3,9 +3,9 @@ using System.Globalization;
 
 namespace Avalonia.Data.Converters
 {
-    public class StringFormatConverter : IValueConverter
+    public class StringFormatValueConverter : IValueConverter
     {
-        public StringFormatConverter(string format, IValueConverter inner)
+        public StringFormatValueConverter(string format, IValueConverter inner)
         {
             Contract.Requires<ArgumentNullException>(format != null);
 

+ 1 - 1
src/Markup/Avalonia.Markup/Data/Binding.cs

@@ -172,7 +172,7 @@ namespace Avalonia.Data
             if (!string.IsNullOrWhiteSpace(StringFormat) && 
                 (targetType == typeof(string) || targetType == typeof(object)))
             {
-                converter = new StringFormatConverter(StringFormat, converter);
+                converter = new StringFormatValueConverter(StringFormat, converter);
             }
 
             var subject = new BindingExpression(

+ 2 - 2
tests/Avalonia.Markup.UnitTests/Data/BindingTests_Converters.cs

@@ -51,7 +51,7 @@ namespace Avalonia.Markup.UnitTests.Data
                     textBlock,
                     TextBlock.TextProperty).Observable;
 
-                Assert.IsType<StringFormatConverter>(expressionObserver.Converter);
+                Assert.IsType<StringFormatValueConverter>(expressionObserver.Converter);
             }
         }
 
@@ -74,7 +74,7 @@ namespace Avalonia.Markup.UnitTests.Data
                     textBlock,
                     TextBlock.TagProperty).Observable;
 
-                Assert.IsType<StringFormatConverter>(expressionObserver.Converter);
+                Assert.IsType<StringFormatValueConverter>(expressionObserver.Converter);
             }
         }