27 references to CanConvertFrom
Microsoft.AspNetCore.Components (1)
BindConverter.cs (1)
2036if (typeConverter == null || !typeConverter.CanConvertFrom(typeof(string)))
Microsoft.AspNetCore.Http.Abstractions.Tests (3)
PathStringTests.cs (3)
296Assert.True(converter.CanConvertFrom(typeof(string))); 297Assert.False(converter.CanConvertFrom(typeof(int))); 298Assert.False(converter.CanConvertFrom(typeof(bool)));
Microsoft.AspNetCore.Mvc.Abstractions (1)
ModelBinding\ModelMetadata.cs (1)
654IsConvertibleType = TypeDescriptor.GetConverter(ModelType).CanConvertFrom(typeof(string));
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\ModelBindingHelper.cs (1)
693var canConvertFrom = converter.CanConvertFrom(value.GetType());
Microsoft.Extensions.Configuration.Binder (1)
ConfigurationBinder.cs (1)
887if (converter.CanConvertFrom(typeof(string)))
PresentationFramework (7)
MS\Internal\Data\DefaultValueConverter.cs (2)
155canConvertFrom = (typeConverter != null) ? typeConverter.CanConvertFrom(targetType) : false; 167canConvertFrom = (typeConverter != null) ? typeConverter.CanConvertFrom(sourceType) : false;
MS\Internal\Data\PropertyPathWorker.cs (1)
1409if (tc != null && tc.CanConvertFrom(typeof(string)))
System\Windows\Data\BindingExpressionBase.cs (1)
2198if (converter != null && converter.CanConvertFrom(value.GetType()))
System\Windows\PropertyPath.cs (1)
788if (tc != null && tc.CanConvertFrom(typeof(string)))
System\Windows\PropertyPathConverter.cs (1)
274if (converter.CanConvertTo(typeof(string)) && converter.CanConvertFrom(typeof(string)))
System\Windows\StyleHelper.cs (1)
5915if (typeConverter != null && typeConverter.CanConvertFrom(typeof(String)))
System.Configuration.ConfigurationManager (5)
System\Configuration\ApplicationSettingsBase.cs (1)
519if (tc.CanConvertTo(typeof(string)) && tc.CanConvertFrom(typeof(string)))
System\Configuration\ConfigurationProperty.cs (2)
280if (!Converter.CanConvertFrom(value.GetType())) 401!_converter.CanConvertFrom(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.Data.Common (2)
System\Data\XMLSchema.cs (2)
50if (converter.CanConvertFrom(typeof(string))) 297if (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\Runtime\ClrObjectRuntime.cs (1)
641if (typeConverter.CanConvertFrom(value.GetType()))
System\Xaml\Schema\BuiltInValueConverter.cs (2)
176!stdConverter.CanConvertFrom(typeof(string)) || !stdConverter.CanConvertFrom(typeof(Uri)) ||
System.Xaml.Tests (1)
System\Windows\Markup\NameReferenceConverterTests.cs (1)
25Assert.Equal(expected, converter.CanConvertFrom(type));