26 references to CanConvertTo
Microsoft.AspNetCore.Components (1)
BindConverter.cs (1)
1833if (typeConverter == null || !typeConverter.CanConvertTo(typeof(string)))
Microsoft.AspNetCore.Http.Abstractions.Tests (3)
PathStringTests.cs (3)
299Assert.True(converter.CanConvertTo(typeof(string))); 300Assert.False(converter.CanConvertTo(typeof(int))); 301Assert.False(converter.CanConvertTo(typeof(bool)));
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\ModelBindingHelper.cs (1)
698if (!(canConvertFrom || converter.CanConvertTo(destinationType)))
PresentationBuildTasks (2)
MS\Internal\MarkupCompiler\MarkupCompiler.cs (2)
1657if (converter.CanConvertTo(typeof(string))) 1725if (converter.CanConvertTo(typeof(string)))
PresentationFramework (8)
MS\Internal\Data\DefaultValueConverter.cs (2)
154canConvertTo = (typeConverter != null) ? typeConverter.CanConvertTo(targetType) : false; 166canConvertTo = (typeConverter != null) ? typeConverter.CanConvertTo(sourceType) : false;
System\Windows\Controls\ContentPresenter.cs (3)
1014Debug.Assert(tc.CanConvertTo(typeof(UIElement))); 1123Debug.Assert(!(tc != null && tc.CanConvertTo(typeof(UIElement)))); // this is handled by a different template 1185tc.CanConvertTo(typeof(UIElement)))
System\Windows\Documents\TextRangeSerialization.cs (1)
1134Invariant.Assert(typeConverter.CanConvertTo(typeof(string)), "type is expected to be convertable into string type");
System\Windows\Markup\Primitives\ElementMarkupObject.cs (1)
817converter.CanConvertTo(typeof(MarkupExtension)))
System\Windows\PropertyPathConverter.cs (1)
274if (converter.CanConvertTo(typeof(string)) && converter.CanConvertFrom(typeof(string)))
System.Configuration.ConfigurationManager (4)
System\Configuration\ApplicationSettingsBase.cs (1)
519if (tc.CanConvertTo(typeof(string)) && tc.CanConvertFrom(typeof(string)))
System\Configuration\ConfigurationProperty.cs (1)
402!_converter.CanConvertTo(typeof(string)))
System\Configuration\SettingsPropertyValue.cs (2)
232if (converter != null && converter.CanConvertTo(typeof(string)) && converter.CanConvertFrom(typeof(string))) 285if (converter != null && converter.CanConvertTo(typeof(string)) && converter.CanConvertFrom(typeof(string)))
System.Xaml (5)
System\Windows\Markup\ValueSerializer.cs (2)
144else if (converter.CanConvertTo(typeof(string)) && converter.CanConvertFrom(typeof(string)) && 179if (converter != null && converter.CanConvertTo(typeof(string)) && converter.CanConvertFrom(typeof(string)) &&
System\Xaml\Schema\BuiltInValueConverter.cs (3)
177!stdConverter.CanConvertTo(typeof(string)) || !stdConverter.CanConvertTo(typeof(Uri)) || !stdConverter.CanConvertTo(typeof(InstanceDescriptor)))
System.Xaml.Tests (2)
System\Windows\Markup\StaticExtensionTests.cs (1)
209Assert.Equal(expected, converter.CanConvertTo(type));
System\Windows\Markup\TypeExtensionTests.cs (1)
171Assert.Equal(expected, converter.CanConvertTo(type));