8 overrides of IsAssignableFrom
System.Private.CoreLib (5)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilderInstantiation.cs (1)
256public override bool IsAssignableFrom([NotNullWhen(true)] Type? c) { throw new NotSupportedException(); }
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureType.cs (1)
89public sealed override bool IsAssignableFrom([NotNullWhen(true)] Type? c) => throw new NotSupportedException(SR.NotSupported_SignatureType);
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (1)
260public override bool IsAssignableFrom([NotNullWhen(true)] Type? c)
src\System\Reflection\Emit\RuntimeGenericTypeParameterBuilder.cs (1)
204public override bool IsAssignableFrom([NotNullWhen(true)] Type? c) { throw new NotSupportedException(); }
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (1)
840public override bool IsAssignableFrom([NotNullWhen(true)] Type? c)
System.Reflection.Context (1)
System\Reflection\Context\Delegation\DelegatingType.cs (1)
250public override bool IsAssignableFrom([NotNullWhen(true)] Type? c)
System.Reflection.Emit (1)
System\Reflection\Emit\EnumBuilderImpl.cs (1)
146public override bool IsAssignableFrom([NotNullWhen(true)] Type? c) => throw new NotSupportedException();
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\Types\RoType.cs (1)
252public sealed override bool IsAssignableFrom(Type? c)
1675 references to IsAssignableFrom
Aspire.Confluent.Kafka (1)
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\Shared\PropertyFetcher.AOT.cs (1)
106if (propertyInfo == null || !typeof(T).IsAssignableFrom(propertyInfo.PropertyType))
Aspire.Dashboard (4)
artifacts\obj\Aspire.Dashboard\Debug\net8.0\opentelemetry\proto\collector\logs\v1\LogsServiceGrpc.cs (1)
53public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
artifacts\obj\Aspire.Dashboard\Debug\net8.0\opentelemetry\proto\collector\metrics\v1\MetricsServiceGrpc.cs (1)
53public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
artifacts\obj\Aspire.Dashboard\Debug\net8.0\opentelemetry\proto\collector\trace\v1\TraceServiceGrpc.cs (1)
53public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
artifacts\obj\Aspire.Dashboard\Debug\net8.0\ResourceServiceGrpc.cs (1)
37public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
Aspire.Hosting (1)
artifacts\obj\Aspire.Hosting\Debug\net8.0\Dashboard\proto\ResourceServiceGrpc.cs (1)
37public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
Aspire.Microsoft.Data.SqlClient (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\DiagnosticSourceInstrumentation\PropertyFetcher.cs (1)
102if (propertyInfo == null || !typeof(T).IsAssignableFrom(propertyInfo.PropertyType))
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\DiagnosticSourceInstrumentation\PropertyFetcher.cs (1)
102if (propertyInfo == null || !typeof(T).IsAssignableFrom(propertyInfo.PropertyType))
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Shared\PropertyFetcher.AOT.cs (1)
108if (propertyInfo == null || !typeof(T).IsAssignableFrom(propertyInfo.PropertyType))
BasketService (1)
artifacts\obj\BasketService\Debug\net8.0\Protos\BasketGrpc.cs (1)
33public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
BuildActionTelemetryTable (3)
Program.cs (3)
119static bool IsCodeActionType(Type t) => typeof(CodeAction).IsAssignableFrom(t); 121static bool IsCodeActionProviderType(Type t) => typeof(CodeFixProvider).IsAssignableFrom(t) 122|| typeof(CodeRefactoringProvider).IsAssignableFrom(t);
ConfigurationSchemaGenerator (1)
ConfigSchemaEmitter.cs (1)
738public override bool CanConvert(Type typeToConvert) => typeof(JsonNode).IsAssignableFrom(typeToConvert) && typeToConvert != typeof(JsonValue);
DesignSurfaceExt (1)
TypeDiscoveryService.cs (1)
40if (baseType.IsAssignableFrom(type))
dotnet-svcutil-lib (109)
FrameworkFork\Microsoft.Xml\Xml\schema\Preprocessor.cs (1)
372if (typeof(XmlSchema).IsAssignableFrom(returnType))
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeGenerator.cs (3)
1808else if (source.IsAssignableFrom(target)) 1820else if (target.IsAssignableFrom(source)) 1829else if (source.IsAssignableFrom(target))
FrameworkFork\Microsoft.Xml\Xml\Serialization\ImportContext.cs (3)
336if (typeof(XmlSchemaType).IsAssignableFrom(t)) 483else if (typeof(XmlSchemaGroupBase).IsAssignableFrom(t)) 520if (typeof(XmlSchemaAnnotated).IsAssignableFrom(t))
FrameworkFork\Microsoft.Xml\Xml\Serialization\Mappings.cs (4)
1165if (_needSchema && typeof(XmlSchemaType).IsAssignableFrom(_getSchemaMethod.ReturnType)) 1256if (typeof(XmlSchemaType).IsAssignableFrom(_getSchemaMethod.ReturnType)) 1352if (typeof(XmlSchemaType).IsAssignableFrom(_getSchemaMethod.ReturnType)) 1358else if (typeof(XmlQualifiedName).IsAssignableFrom(_getSchemaMethod.ReturnType))
FrameworkFork\Microsoft.Xml\Xml\Serialization\SourceInfo.cs (4)
110if (get_Item == null && typeof(IList).IsAssignableFrom(varType)) 125else if ((elementType != null) && !(eType.IsAssignableFrom(elementType) || elementType.IsAssignableFrom(eType))) 218System.Diagnostics.Debug.Assert(targetType == nullableType || targetType.IsAssignableFrom(nullableType.GetGenericArguments()[0]));
FrameworkFork\Microsoft.Xml\Xml\Serialization\TypeExtensions.cs (3)
32targetType.IsAssignableFrom(sourceType)) 44targetType.IsAssignableFrom(method.ReturnType)) 50parameters[0].ParameterType.IsAssignableFrom(sourceType))
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (15)
830else if (typeof(IXmlSerializable).IsAssignableFrom(type)) 851else if (typeof(ICollection).IsAssignableFrom(type) && !IsArraySegment(type)) 895else if (typeof(XmlNode).IsAssignableFrom(type)) 900if (typeof(XmlText).IsAssignableFrom(type)) 902else if (typeof(XmlElement).IsAssignableFrom(type)) 904else if (type.IsAssignableFrom(typeof(XmlAttribute))) 949if (typeof(IEnumerable).IsAssignableFrom(type) && !IsArraySegment(type)) 1063else if (typeof(ICollection).IsAssignableFrom(type)) 1065else if (typeof(IEnumerable).IsAssignableFrom(type)) 1215if (typeToBeReplaced.IsAssignableFrom(currentType)) 1279if (typeof(IEnumerable).IsAssignableFrom(type)) 1283if (enumerator == null || !typeof(IEnumerator).IsAssignableFrom(enumerator.ReturnType)) 1290if (enumerator != null && typeof(IEnumerator).IsAssignableFrom(enumerator.ReturnType)) 1308if (enumerator == null || !typeof(IEnumerator).IsAssignableFrom(enumerator.ReturnType)) 1342if (typeof(IDictionary).IsAssignableFrom(type))
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (8)
495if (!(typeof(XmlQualifiedName).IsAssignableFrom(getMethod.ReturnType)) && !(typeof(XmlSchemaType).IsAssignableFrom(getMethod.ReturnType))) 1671Type targetType = typeof(IXmlSerializable).IsAssignableFrom(arrayElementType) ? arrayElementType : typeof(XmlNode).IsAssignableFrom(arrayElementType) ? arrayElementType : typeof(XmlElement); 1672if (!arrayElementType.IsAssignableFrom(targetType)) 1914Type targetType = typeof(IXmlSerializable).IsAssignableFrom(accessorType) ? accessorType : typeof(XmlNode).IsAssignableFrom(accessorType) ? accessorType : typeof(XmlElement); 1915if (!accessorType.IsAssignableFrom(targetType))
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemaImporter.cs (2)
409if (!(desiredMappingType.IsAssignableFrom(mapping.GetType()))) 533if (mapping != null && desiredMappingType.IsAssignableFrom(mapping.GetType()))
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemas.cs (2)
334if (typeof(XmlSchemaType).IsAssignableFrom(type)) 337if (ret == null || !type.IsAssignableFrom(ret.GetType()))
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationReader.cs (2)
1833if (itemType == null || currItemType.IsAssignableFrom(itemType)) 1837else if (!itemType.IsAssignableFrom(currItemType))
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (8)
347else if (typeof(XmlNode[]).IsAssignableFrom(t)) 778if (typeof(XmlAttribute).IsAssignableFrom(node.GetType())) 816if (typeof(IXmlSerializable).IsAssignableFrom(type)) return new InvalidOperationException(string.Format(ResXml.XmlInvalidSerializable, type.FullName)); 1230while ((elementType.IsArray || typeof(IEnumerable).IsAssignableFrom(elementType)) && GetPrimitiveTypeName(elementType, false) == null) 1319if (!typeof(IEnumerable).IsAssignableFrom(type)) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, "not array like type " + type.FullName)); 1322int arrayLength = typeof(ICollection).IsAssignableFrom(type) ? ((ICollection)o).Count : -1; 1422if (t.IsArray || typeof(IEnumerable).IsAssignableFrom(t)) 2408if (mapping.TypeDesc.Type != null && typeof(XmlSchemaObject).IsAssignableFrom(mapping.TypeDesc.Type))
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriterILGen.cs (2)
1058if (mapping.TypeDesc.Type != null && typeof(XmlSchemaObject).IsAssignableFrom(mapping.TypeDesc.Type)) 1575if (getEnumeratorMethod != null && typeof(IEnumerator).IsAssignableFrom(getEnumeratorMethod.ReturnType))
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ClassDataContract.cs (3)
386if (!childType.GetTypeInfo().IsEnum && !Globals.TypeOfIXmlSerializable.IsAssignableFrom(childType) 419if (Globals.TypeOfIXmlSerializable.IsAssignableFrom(type)) 490if (Globals.TypeOfException.IsAssignableFrom(type))
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeExporter.cs (3)
545if (Globals.TypeOfIXmlSerializable.IsAssignableFrom(type)) 845if (!Globals.TypeOfIExtensibleDataObject.IsAssignableFrom(actualType)) 847if (!Globals.TypeOfIPropertyChange.IsAssignableFrom(actualType))
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeGenerator.cs (3)
1522else if (source.IsAssignableFrom(target)) 1531else if (target.IsAssignableFrom(source)) 1540else if (source.IsAssignableFrom(target))
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CollectionDataContract.cs (4)
1015if (Globals.TypeOfIXmlSerializable.IsAssignableFrom(type) || IsArraySegment(type)) 1020if (!Globals.TypeOfIEnumerable.IsAssignableFrom(type)) 1049if (collectionType.IsAssignableFrom(type)) 1266if (getEnumeratorMethod == null || !Globals.TypeOfIEnumerator.IsAssignableFrom(getEnumeratorMethod.ReturnType))
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (5)
702else if (Globals.TypeOfException.IsAssignableFrom(type)) 704else if (Globals.TypeOfIXmlSerializable.IsAssignableFrom(type)) 1297Globals.TypeOfIXmlSerializable.IsAssignableFrom(type)) 1507else if (Globals.TypeOfIXmlSerializable.IsAssignableFrom(type)) 2114if (!Globals.TypeOfTypeEnumerable.IsAssignableFrom(method.ReturnType))
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContractSet.cs (1)
504(Globals.TypeOfIXmlSerializable.IsAssignableFrom(type) && !typeInfo.IsGenericTypeDefinition) ||
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ExceptionDataContract.cs (1)
508if (!(typeof(Exception).IsAssignableFrom(type)))
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\Globals.cs (2)
1013if (!seq1[i].Equals(seq2[i]) && !seq1[i].IsAssignableFrom(seq2[i])) 1057return s_typeOfScriptObject != null && s_typeOfScriptObject.IsAssignableFrom(type);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\SchemaExporter.cs (1)
62if (!(Globals.TypeOfXmlQualifiedName.IsAssignableFrom(getMethod.ReturnType)))
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\SchemaImporter.cs (1)
755&& Globals.TypeOfIXmlSerializable.IsAssignableFrom(referencedType))
FrameworkFork\System.ServiceModel\System\IdentityModel\Selectors\SecurityTokenRequirement.cs (1)
164if (dictionaryValue != null && !typeof(TValue).IsAssignableFrom(dictionaryValue.GetType()))
FrameworkFork\System.ServiceModel\System\IdentityModel\Selectors\SecurityTokenSerializer.cs (1)
225if (tokenTypes[i].IsAssignableFrom(tokenType))
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpMessageHandlerFactory.cs (1)
62if (!s_delegatingHandlerType.IsAssignableFrom(handler) || handler.IsAbstract())
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannel.cs (3)
422if (t.IsAssignableFrom(typeof(IClientChannel))) 425if (t.IsAssignableFrom(typeof(IDuplexContextChannel))) 428if (t.IsAssignableFrom(typeof(IServiceChannel)))
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannelProxy.cs (1)
70else if (declaringType.IsAssignableFrom(_serviceChannel.GetType()))
FrameworkFork\System.ServiceModel\System\ServiceModel\ClientBase.cs (2)
338if (typeof(CompletedAsyncResult).IsAssignableFrom(result.GetType())) 362if (typeof(CompletedAsyncResult).IsAssignableFrom(result.GetType()))
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceReflector.cs (4)
455if (typeof(Attribute).IsAssignableFrom(attrType)) 465if (attrType.IsAssignableFrom(customAttribute.GetType())) 612if (!t.IsAssignableFrom(potentialContractRoot)) 959return ((!type.IsSealed()) || typeof(IDisposable).IsAssignableFrom(type));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\TypeLoader.cs (4)
374if (!typeof(IEnumerable<Type>).IsAssignableFrom(method.ReturnType)) 398if (targetIface.IsAssignableFrom(implType) && targetIface.IsInterface()) 679if (!(declaringContract.ContractType.IsAssignableFrom(contractDescription.ContractType))) 728if (!inheritedContractAttr.CallbackContract.IsAssignableFrom(callbackType))
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (3)
868(!isArray && typeof(IEnumerable).IsAssignableFrom(member.MemberType) && member.MemberType != typeof(string) && !typeof(XmlNode).IsAssignableFrom(member.MemberType) && !typeof(IXmlSerializable).IsAssignableFrom(member.MemberType)))
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\FaultFormatter.cs (1)
152isDetailObjectValid = detailType.IsAssignableFrom(detailObj.GetType());
FrameworkFork\System.ServiceModel\System\ServiceModel\DuplexChannelFactory.cs (1)
235if (callbackType != null && !callbackType.IsAssignableFrom(userObjectType))
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityProtocolFactory.cs (2)
754else if (authenticatorType.IsAssignableFrom(spec2AuthenticatorType) || spec2AuthenticatorType.IsAssignableFrom(authenticatorType))
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecurityTokenSerializer.cs (1)
473if (tokenTypes[i].IsAssignableFrom(tokenType))
FrameworkFork\System.Web.Services\Services\Description\ServiceDescription.cs (2)
1642if (type.IsAssignableFrom(item.GetType())) 1661if (type.IsAssignableFrom(item.GetType()))
Shared\Options\OptionsSerializer.cs (1)
35return typeof(TAppOptions).GetTypeInfo().IsAssignableFrom(objectType);
GetDocument.Insider (3)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.5.25256.101\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
116&& typeof(TReturn).IsAssignableFrom(factory.ReturnType)
Commands\GetDocumentCommandWorker.cs (2)
231if (!_generateMethodReturnType.IsAssignableFrom(generateWithVersionMethod.ReturnType)) 444if (!returnType.IsAssignableFrom(method.ReturnType))
illink (3)
InMemory.FunctionalTests (1)
Http3\Http3TestBase.cs (1)
141var message = Assert.Single(LogMessages, m => m.Exception != null && exceptionType.IsAssignableFrom(m.Exception.GetType()));
IntegrationTestsWebsite (1)
artifacts\obj\IntegrationTestsWebsite\Release\net10.0\Protos\GreetGrpc.cs (1)
36public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
InteropClient (3)
artifacts\obj\InteropClient\Release\net10.0\TestGrpc.cs (3)
55public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); 525public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); 666public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
InteropWebsite (3)
artifacts\obj\InteropWebsite\Release\net10.0\TestGrpc.cs (3)
55public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); 330public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); 425public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
Microsoft.AspNetCore.Authentication.Abstractions (1)
AuthenticationScheme.cs (1)
24if (!typeof(IAuthenticationHandler).IsAssignableFrom(handlerType))
Microsoft.AspNetCore.Authentication.Core (3)
AuthenticationSchemeProvider.cs (1)
149if (typeof(IAuthenticationRequestHandler).IsAssignableFrom(scheme.HandlerType))
AuthenticationService.cs (2)
237.Where(sch => typeof(IAuthenticationSignInHandler).IsAssignableFrom(sch.HandlerType)) 277.Where(sch => typeof(IAuthenticationSignOutHandler).IsAssignableFrom(sch.HandlerType))
Microsoft.AspNetCore.Authentication.Test (1)
BearerTokenTests.cs (1)
18return services.Select(d => d.ServiceType).Single(typeof(AuthenticationHandler<BearerTokenOptions>).IsAssignableFrom);
Microsoft.AspNetCore.Components (17)
CascadingValue.cs (1)
131if (parameterInfo.Attribute is not CascadingParameterAttribute cascadingParameterAttribute || !parameterInfo.PropertyType.IsAssignableFrom(typeof(TValue)))
CascadingValueSource.cs (1)
141if (parameterInfo.Attribute is not CascadingParameterAttribute cascadingParameterAttribute || !parameterInfo.PropertyType.IsAssignableFrom(typeof(TValue)))
ChangeDetection.cs (1)
59|| typeof(IEventCallback).IsAssignableFrom(type);
DefaultComponentActivator.cs (1)
19if (!typeof(IComponent).IsAssignableFrom(componentType))
LayoutAttribute.cs (1)
23if (!typeof(IComponent).IsAssignableFrom(layoutType))
NavigationManagerExtensions.cs (1)
224if (valueType != typeof(string) && typeof(IEnumerable).IsAssignableFrom(valueType))
Reflection\ComponentProperties.cs (1)
342if (!propertyInfo.PropertyType.IsAssignableFrom(typeof(Dictionary<string, object>)))
Rendering\RenderTreeBuilder.cs (1)
500if (!typeof(IComponent).IsAssignableFrom(componentType))
RenderTree\EventArgsTypeCache.cs (1)
29if (typeof(EventArgs).IsAssignableFrom(declaredType))
Routing\RouteData.cs (1)
24if (!typeof(IComponent).IsAssignableFrom(pageType))
Routing\Router.cs (2)
146if (!typeof(IComponent).IsAssignableFrom(NotFoundPage)) 249if (!typeof(IComponent).IsAssignableFrom(context.Handler))
Routing\RouteTableFactory.cs (1)
76if (typeof(IComponent).IsAssignableFrom(type)
src\Http\Routing\src\ParameterPolicyActivator.cs (4)
37if (!typeof(T).IsAssignableFrom(parameterPolicyType)) 39if (!typeof(IParameterPolicy).IsAssignableFrom(parameterPolicyType)) 202if (typeof(IConvertible).IsAssignableFrom(parameters[i].ParameterType)) 220if (serviceProvider != null && !typeof(IConvertible).IsAssignableFrom(parameterType))
Microsoft.AspNetCore.Components.Endpoints (1)
Rendering\EndpointHtmlRenderer.Prerendering.cs (1)
105if (!typeof(IComponent).IsAssignableFrom(componentType))
Microsoft.AspNetCore.Components.Forms (2)
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (2)
260else if (typeof(ISpanFormattable).IsAssignableFrom(memberType)) 265else if (typeof(IFormattable).IsAssignableFrom(memberType))
Microsoft.AspNetCore.Components.QuickGrid (1)
Columns\PropertyColumn.cs (1)
56if (!typeof(IFormattable).IsAssignableFrom(nullableUnderlyingTypeOrNull ?? typeof(TProp)))
Microsoft.AspNetCore.Components.Web (2)
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (2)
260else if (typeof(ISpanFormattable).IsAssignableFrom(memberType)) 265else if (typeof(IFormattable).IsAssignableFrom(memberType))
Microsoft.AspNetCore.Components.WebAssembly (1)
Hosting\RootComponentMapping.cs (1)
24if (!typeof(IComponent).IsAssignableFrom(componentType))
Microsoft.AspNetCore.Connections.Abstractions (1)
src\Shared\ActivatorUtilities\ActivatorUtilities.cs (1)
122_parameters[applyIndex].ParameterType.IsAssignableFrom(givenType))
Microsoft.AspNetCore.DataProtection (3)
AuthenticatedEncryption\ConfigurationModel\XmlSerializedDescriptorInfo.cs (1)
28if (!typeof(IAuthenticatedEncryptorDescriptorDeserializer).IsAssignableFrom(deserializerType))
TypeExtensions.cs (1)
21if (!expectedBaseType.IsAssignableFrom(implementationType))
XmlEncryption\EncryptedXmlInfo.cs (1)
27if (!typeof(IXmlDecryptor).IsAssignableFrom(decryptorType))
Microsoft.AspNetCore.Diagnostics (2)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (2)
90(typeof(IAsyncStateMachine).IsAssignableFrom(type) || typeof(IEnumerator).IsAssignableFrom(type)))
Microsoft.AspNetCore.Grpc.JsonTranscoding (3)
Internal\Json\JsonConverterFactoryForWellKnownTypes.cs (1)
23if (!typeof(IMessage).IsAssignableFrom(typeToConvert))
Internal\Json\JsonConverterFactoryForWrappers.cs (1)
24if (!typeof(IMessage).IsAssignableFrom(typeToConvert))
Internal\Json\MessageTypeInfoResolver.cs (1)
66if (type.IsInterface || !typeof(IMessage).IsAssignableFrom(type))
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (11)
artifacts\obj\Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests\Release\net10.0\Proto\HttpbodyGrpc.cs (1)
37public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
artifacts\obj\Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests\Release\net10.0\Proto\Issue045270\HelloGrpc.cs (1)
33public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
artifacts\obj\Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests\Release\net10.0\Proto\Issue048192\HelloGrpc.cs (1)
33public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
artifacts\obj\Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests\Release\net10.0\Proto\TranscodingGrpc.cs (8)
37public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); 458public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); 601public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); 744public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); 887public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); 1030public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); 1173public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); 1358public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
Microsoft.AspNetCore.Grpc.Microbenchmarks (2)
artifacts\obj\Microsoft.AspNetCore.Grpc.Microbenchmarks\Release\net10.0\Proto\ChatGrpc.cs (1)
40public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
artifacts\obj\Microsoft.AspNetCore.Grpc.Microbenchmarks\Release\net10.0\Proto\GreetGrpc.cs (1)
40public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
Microsoft.AspNetCore.Grpc.Swagger.Tests (6)
artifacts\obj\Microsoft.AspNetCore.Grpc.Swagger.Tests\Release\net10.0\Proto\BodyGrpc.cs (1)
37public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
artifacts\obj\Microsoft.AspNetCore.Grpc.Swagger.Tests\Release\net10.0\Proto\CounterGrpc.cs (1)
37public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
artifacts\obj\Microsoft.AspNetCore.Grpc.Swagger.Tests\Release\net10.0\Proto\GreeterGrpc.cs (1)
40public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
artifacts\obj\Microsoft.AspNetCore.Grpc.Swagger.Tests\Release\net10.0\Proto\ParametersGrpc.cs (1)
37public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
artifacts\obj\Microsoft.AspNetCore.Grpc.Swagger.Tests\Release\net10.0\Proto\ResponsebodyGrpc.cs (1)
37public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
artifacts\obj\Microsoft.AspNetCore.Grpc.Swagger.Tests\Release\net10.0\Proto\XmldocGrpc.cs (1)
40public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
Microsoft.AspNetCore.Hosting (5)
GenericHost\GenericWebHostBuilder.cs (1)
226if (typeof(IStartup).IsAssignableFrom(startupType))
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (2)
90(typeof(IAsyncStateMachine).IsAssignableFrom(type) || typeof(IEnumerator).IsAssignableFrom(type)))
WebHostBuilder.cs (1)
320if (typeof(IStartup).IsAssignableFrom(startupType))
WebHostBuilderExtensions.cs (1)
150if (typeof(IStartup).IsAssignableFrom(startupType))
Microsoft.AspNetCore.Hosting.Abstractions (1)
HostingStartupAttribute.cs (1)
22if (!typeof(IHostingStartup).IsAssignableFrom(hostingStartupType))
Microsoft.AspNetCore.Http.Abstractions (5)
Extensions\UseMiddlewareExtensions.cs (2)
54if (typeof(IMiddleware).IsAssignableFrom(middleware)) 87if (!typeof(Task).IsAssignableFrom(invokeMethod.ReturnType))
Validation\TypeExtensions.cs (2)
36if (typeof(IEnumerable).IsAssignableFrom(type) && 132return interfaceType.IsAssignableFrom(type);
Validation\ValidatableTypeInfo.cs (1)
80if (subType.IsAssignableFrom(actualType))
Microsoft.AspNetCore.Http.Extensions (10)
RequestDelegateFactory.cs (5)
797else if (parameter.CustomAttributes.Any(a => typeof(IFromServiceMetadata).IsAssignableFrom(a.AttributeType))) 1041if (!isAwaitable && (returnType == typeof(void) || typeof(IResult).IsAssignableFrom(returnType))) 1116if (typeof(IResult).IsAssignableFrom(typeArg)) 1164if (typeof(IResult).IsAssignableFrom(typeArg)) 1213else if (typeof(IResult).IsAssignableFrom(returnType))
src\Shared\EndpointMetadataPopulator.cs (3)
29if (typeof(IEndpointParameterMetadataProvider).IsAssignableFrom(parameter.ParameterType)) 38if (typeof(IEndpointMetadataProvider).IsAssignableFrom(parameter.ParameterType)) 55if (returnType is not null && typeof(IEndpointMetadataProvider).IsAssignableFrom(returnType))
src\Shared\ObjectMethodExecutor\AwaitableInfo.cs (2)
73var implementsINotifyCompletion = typeof(INotifyCompletion).IsAssignableFrom(awaiterType); 84var implementsICriticalNotifyCompletion = typeof(ICriticalNotifyCompletion).IsAssignableFrom(awaiterType);
Microsoft.AspNetCore.Http.Extensions.Tests (6)
PropertyAsParameterInfoTests.cs (5)
83a => typeof(TestAttribute).IsAssignableFrom(a.AttributeType)); 100a => typeof(TestAttribute).IsAssignableFrom(a.AttributeType)); 103a => typeof(SampleAttribute).IsAssignableFrom(a.AttributeType)); 120a => typeof(TestAttribute).IsAssignableFrom(a.GetType())); 123a => typeof(SampleAttribute).IsAssignableFrom(a.GetType()));
ValidationsGenerator\ValidationsGeneratorTestBase.cs (1)
299&& typeof(TReturn).IsAssignableFrom(factory.ReturnType)
Microsoft.AspNetCore.Http.Results (1)
ResultsOfTHelper.cs (1)
22if (typeof(IEndpointMetadataProvider).IsAssignableFrom(typeof(TTarget)))
Microsoft.AspNetCore.Identity (1)
IdentityBuilderExtensions.cs (1)
75if (!managerType.IsAssignableFrom(customType))
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (1)
src\Identity\test\Shared\ApiConsistencyTestBase.cs (1)
42where typeof(Task).IsAssignableFrom(method.ReturnType)
Microsoft.AspNetCore.Identity.InMemory.Test (1)
src\Identity\test\Shared\ApiConsistencyTestBase.cs (1)
42where typeof(Task).IsAssignableFrom(method.ReturnType)
Microsoft.AspNetCore.Identity.Test (1)
src\Identity\test\Shared\ApiConsistencyTestBase.cs (1)
42where typeof(Task).IsAssignableFrom(method.ReturnType)
Microsoft.AspNetCore.JsonPatch (2)
Internal\ConversionResultProvider.cs (2)
27else if (typeToConvertTo.IsAssignableFrom(value.GetType())) 65else if (typeToConvertTo.IsAssignableFrom(value.GetType()))
Microsoft.AspNetCore.JsonPatch.SystemTextJson (2)
Internal\ConversionResultProvider.cs (2)
18if (typeToConvertTo.IsAssignableFrom(value.GetType())) 35if (typeToConvertTo != value.GetType() && typeToConvertTo.IsAssignableFrom(value.GetType()))
Microsoft.AspNetCore.Mvc.Abstractions (2)
ModelBinding\BindingInfo.cs (1)
65if (value != null && !typeof(IModelBinder).IsAssignableFrom(value))
ModelBinding\ModelMetadata.cs (1)
783if (ModelType != typeof(string) && !ModelType.IsArray && typeof(IEnumerable).IsAssignableFrom(ModelType))
Microsoft.AspNetCore.Mvc.ApiExplorer (6)
ApiResponseTypeProvider.cs (3)
236if (typeof(IResult).IsAssignableFrom(metadata.Type)) 367if (typeof(IActionResult).IsAssignableFrom(unwrappedType) || 368typeof(IResult).IsAssignableFrom(unwrappedType))
EndpointMetadataApiDescriptionProvider.cs (3)
277else if (parameter.ParameterInfo.CustomAttributes.Any(a => typeof(IFromServiceMetadata).IsAssignableFrom(a.AttributeType) || typeof(FromKeyedServicesAttribute) == a.AttributeType) || 337if (typeof(IResult).IsAssignableFrom(responseType) || 338producesResponseMetadata.Any(metadata => typeof(IResult).IsAssignableFrom(metadata.Type)))
Microsoft.AspNetCore.Mvc.Core (46)
ActionResultOfT.cs (4)
24if (typeof(IActionResult).IsAssignableFrom(typeof(TValue)) || 25typeof(IResult).IsAssignableFrom(typeof(TValue))) 40if (typeof(IActionResult).IsAssignableFrom(typeof(TValue)) || 41typeof(IResult).IsAssignableFrom(typeof(TValue)))
ApiExplorer\ApiConventionMatcher.cs (1)
177return conventionType.IsAssignableFrom(type);
ApplicationModels\DefaultApplicationModelProvider.cs (2)
367if (returnType is not null && typeof(IEndpointMetadataProvider).IsAssignableFrom(returnType)) 692(typeof(IDisposable).IsAssignableFrom(declaringType) &&
ApplicationParts\ApplicationPartFactory.cs (1)
46if (!typeof(ApplicationPartFactory).IsAssignableFrom(type))
BindPropertyAttribute.cs (1)
46if (value != null && !typeof(IModelBinder).IsAssignableFrom(value))
Filters\FilterCollection.cs (2)
79if (!typeof(IFilterMetadata).IsAssignableFrom(filterType)) 157if (!typeof(IFilterMetadata).IsAssignableFrom(filterType))
Infrastructure\ActionMethodExecutor.cs (3)
151=> !executor.IsMethodAsync && typeof(IActionResult).IsAssignableFrom(executor.MethodReturnType); 282=> typeof(Task<IActionResult>).IsAssignableFrom(executor.MethodReturnType); 319return executor.IsMethodAsync && typeof(IActionResult).IsAssignableFrom(executor.AsyncResultType);
ModelBinderAttribute.cs (1)
64if (value != null && !typeof(IModelBinder).IsAssignableFrom(value))
ModelBinding\Binders\BinderTypeModelBinder.cs (1)
27if (!typeof(IModelBinder).IsAssignableFrom(binderType))
ModelBinding\Binders\CollectionModelBinder.cs (4)
193if (targetType.IsAssignableFrom(typeof(List<TElement?>))) 201typeof(ICollection<TElement>).IsAssignableFrom(targetType); 234if (targetType.IsAssignableFrom(typeof(List<TElement?>))) 447if (targetType.IsAssignableFrom(typeof(List<TElement?>)))
ModelBinding\Binders\CollectionModelBinderProvider.cs (1)
45if (modelType.IsAssignableFrom(listType))
ModelBinding\Binders\DictionaryModelBinder.cs (3)
230if (targetType.IsAssignableFrom(typeof(Dictionary<TKey, TValue?>))) 242if (targetType.IsAssignableFrom(typeof(Dictionary<TKey, TValue>))) 254if (targetType.IsAssignableFrom(typeof(Dictionary<TKey, TValue>)))
ModelBinding\Binders\FormCollectionModelBinderProvider.cs (1)
25if (typeof(FormCollection).IsAssignableFrom(modelType))
ModelBinding\Binders\FormFileModelBinderProvider.cs (1)
27typeof(IEnumerable<IFormFile>).IsAssignableFrom(modelType))
ModelBinding\Binders\HeaderModelBinder.cs (1)
173if (bindingContext.ModelType.IsAssignableFrom(typeof(string[])))
ModelBinding\Metadata\BindingMetadata.cs (1)
45if (value != null && !typeof(IModelBinder).IsAssignableFrom(value))
ModelBinding\Metadata\BindingSourceMetadataProvider.cs (1)
47if (Type.IsAssignableFrom(context.Key.ModelType))
ModelBinding\Metadata\ExcludeBindingMetadataProvider.cs (1)
36if (!_type.IsAssignableFrom(context.Key.ModelType))
ModelBinding\ModelBindingHelper.cs (9)
224if (!modelType.IsAssignableFrom(model.GetType())) 463if (typeof(T).IsAssignableFrom(modelType)) 477if (!typeof(IEnumerable<T>).IsAssignableFrom(modelType)) 492if (modelType.IsAssignableFrom(typeof(List<T>))) 500typeof(ICollection<T>).IsAssignableFrom(modelType); 555if (typeof(T).IsAssignableFrom(modelType)) 573if (modelType.IsAssignableFrom(typeof(List<T>))) 621if (type.IsAssignableFrom(value.GetType())) 678if (value == null || destinationType.IsAssignableFrom(value.GetType()))
ModelBinding\SuppressChildValidationMetadataProvider.cs (1)
62if (Type.IsAssignableFrom(context.Key.ModelType))
Routing\DynamicControllerRouteValueTransformerMetadata.cs (1)
14if (!typeof(DynamicRouteValueTransformer).IsAssignableFrom(selectorType))
src\Shared\EndpointMetadataPopulator.cs (3)
29if (typeof(IEndpointParameterMetadataProvider).IsAssignableFrom(parameter.ParameterType)) 38if (typeof(IEndpointMetadataProvider).IsAssignableFrom(parameter.ParameterType)) 55if (returnType is not null && typeof(IEndpointMetadataProvider).IsAssignableFrom(returnType))
src\Shared\ObjectMethodExecutor\AwaitableInfo.cs (2)
73var implementsINotifyCompletion = typeof(INotifyCompletion).IsAssignableFrom(awaiterType); 84var implementsICriticalNotifyCompletion = typeof(ICriticalNotifyCompletion).IsAssignableFrom(awaiterType);
Microsoft.AspNetCore.Mvc.Core.Test (12)
ApplicationModels\ActionModelTest.cs (3)
99if (typeof(IEnumerable<object>).IsAssignableFrom(property.PropertyType)) 106else if (typeof(IDictionary<string, string>).IsAssignableFrom(property.PropertyType)) 113else if (typeof(IDictionary<object, object>).IsAssignableFrom(property.PropertyType))
ApplicationModels\AttributeRouteModelTests.cs (1)
31if (typeof(IEnumerable<object>).IsAssignableFrom(property.PropertyType))
ApplicationModels\ControllerModelTest.cs (3)
101if (typeof(IEnumerable<object>).IsAssignableFrom(property.PropertyType)) 108else if (typeof(IDictionary<string, string>).IsAssignableFrom(property.PropertyType)) 115else if (typeof(IDictionary<object, object>).IsAssignableFrom(property.PropertyType))
ApplicationModels\InferParameterBindingInfoConventionTest.cs (1)
939return Assert.Single(action.Parameters.Where(x => typeof(T).IsAssignableFrom(x.ParameterType)));
ApplicationModels\ParameterModelTest.cs (2)
42if (typeof(IEnumerable<object>).IsAssignableFrom(property.PropertyType)) 49else if (typeof(IDictionary<object, object>).IsAssignableFrom(property.PropertyType))
ApplicationModels\PropertyModelTest.cs (2)
38if (typeof(IEnumerable<object>).IsAssignableFrom(property.PropertyType)) 45else if (typeof(IDictionary<object, object>).IsAssignableFrom(property.PropertyType))
Microsoft.AspNetCore.Mvc.DataAnnotations (14)
DataAnnotationsModelValidatorProvider.cs (2)
87if (typeof(IValidatableObject).IsAssignableFrom(context.ModelMetadata.ModelType)) 99if (typeof(IValidatableObject).IsAssignableFrom(modelType))
ValidationAttributeAdapterProvider.cs (12)
26if (typeof(RegularExpressionAttribute).IsAssignableFrom(type)) 30else if (typeof(MaxLengthAttribute).IsAssignableFrom(type)) 34else if (typeof(RequiredAttribute).IsAssignableFrom(type)) 38else if (typeof(CompareAttribute).IsAssignableFrom(type)) 42else if (typeof(MinLengthAttribute).IsAssignableFrom(type)) 46else if (typeof(CreditCardAttribute).IsAssignableFrom(type)) 50else if (typeof(StringLengthAttribute).IsAssignableFrom(type)) 54else if (typeof(RangeAttribute).IsAssignableFrom(type)) 58else if (typeof(EmailAddressAttribute).IsAssignableFrom(type)) 62else if (typeof(PhoneAttribute).IsAssignableFrom(type)) 66else if (typeof(UrlAttribute).IsAssignableFrom(type)) 70else if (typeof(FileExtensionsAttribute).IsAssignableFrom(type))
Microsoft.AspNetCore.Mvc.NewtonsoftJson (2)
JsonPatchOperationsArrayProvider.cs (1)
44if (typeof(IJsonPatchDocument).GetTypeInfo().IsAssignableFrom(parameterDescription.Type))
NewtonsoftJsonPatchInputFormatter.cs (1)
86if (!typeof(IJsonPatchDocument).IsAssignableFrom(modelType) ||
Microsoft.AspNetCore.Mvc.Razor (1)
RazorPagePropertyActivator.cs (1)
92else if (typeof(ViewDataDictionary).IsAssignableFrom(property.PropertyType))
Microsoft.AspNetCore.Mvc.RazorPages (6)
ApplicationModels\DefaultPageApplicationModelProvider.cs (4)
164if (typeof(IAsyncPageFilter).IsAssignableFrom(pageModel.HandlerType) || 165typeof(IPageFilter).IsAssignableFrom(pageModel.HandlerType)) 170if (typeof(IAsyncResultFilter).IsAssignableFrom(pageModel.HandlerType) || 171typeof(IResultFilter).IsAssignableFrom(pageModel.HandlerType))
Infrastructure\DynamicPageRouteValueTransformerMetadata.cs (1)
15if (!typeof(DynamicRouteValueTransformer).IsAssignableFrom(selectorType))
Infrastructure\ExecutorFactory.cs (1)
32else if (typeof(IActionResult).IsAssignableFrom(returnType))
Microsoft.AspNetCore.Mvc.TagHelpers (1)
SelectTagHelper.cs (1)
100typeof(IEnumerable).IsAssignableFrom(realModelType);
Microsoft.AspNetCore.Mvc.Testing (1)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.5.25256.101\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
116&& typeof(TReturn).IsAssignableFrom(factory.ReturnType)
Microsoft.AspNetCore.Mvc.ViewFeatures (16)
DefaultHtmlGenerator.cs (2)
990if (typeof(long).IsAssignableFrom(valueType) || typeof(ulong).IsAssignableFrom(valueType))
HtmlHelperOfT.cs (1)
71if (runtimeType != null && typeof(TModel) != runtimeType && typeof(TModel).IsAssignableFrom(runtimeType))
Infrastructure\DefaultTempDataSerializer.cs (3)
230typeof(ICollection<int>).IsAssignableFrom(type) || 231typeof(ICollection<string>).IsAssignableFrom(type) || 232typeof(IDictionary<string, string>).IsAssignableFrom(type);
TemplateRenderer.cs (3)
215if (typeof(IEnumerable).IsAssignableFrom(fieldType)) 217if (typeof(IEnumerable<IFormFile>).IsAssignableFrom(fieldType)) 230else if (typeof(IFormFile) != fieldType && typeof(IFormFile).IsAssignableFrom(fieldType))
TryGetValueProvider.cs (1)
66if (result == null && typeof(IDictionary).IsAssignableFrom(targetType))
ViewComponents\DefaultViewComponentDescriptorProvider.cs (1)
104else if (typeof(Task).IsAssignableFrom(selectedMethod.ReturnType))
ViewComponents\DefaultViewComponentHelper.cs (1)
117if (descriptor.Parameters.Count == 1 && descriptor.Parameters[0].ParameterType.IsAssignableFrom(arguments.GetType()))
ViewDataDictionary.cs (4)
205else if (!declaredModelType.IsAssignableFrom(source.ModelMetadata.ModelType)) 210else if (modelType != null && !source.ModelMetadata.ModelType.IsAssignableFrom(modelType)) 452else if (modelType != null && !ModelMetadata.ModelType.IsAssignableFrom(modelType)) 516return _declaredModelType.IsAssignableFrom(value.GetType());
Microsoft.AspNetCore.OpenApi (4)
Services\OpenApiGenerator.cs (2)
109if (typeof(IResult).IsAssignableFrom(responseType)) 430else if (parameter.CustomAttributes.Any(a => typeof(IFromServiceMetadata).IsAssignableFrom(a.AttributeType) || typeof(FromKeyedServicesAttribute) == a.AttributeType) ||
src\Shared\ObjectMethodExecutor\AwaitableInfo.cs (2)
73var implementsINotifyCompletion = typeof(INotifyCompletion).IsAssignableFrom(awaiterType); 84var implementsICriticalNotifyCompletion = typeof(ICriticalNotifyCompletion).IsAssignableFrom(awaiterType);
Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests (1)
SnapshotTestHelper.cs (1)
307&& typeof(TReturn).IsAssignableFrom(factory.ReturnType)
Microsoft.AspNetCore.Owin (1)
OwinFeatureCollection.cs (1)
346if (key.IsAssignableFrom(GetType()))
Microsoft.AspNetCore.ResponseCompression (1)
CompressionProviderCollection.cs (1)
37if (!typeof(ICompressionProvider).IsAssignableFrom(providerType))
Microsoft.AspNetCore.Routing (4)
ParameterPolicyActivator.cs (4)
37if (!typeof(T).IsAssignableFrom(parameterPolicyType)) 39if (!typeof(IParameterPolicy).IsAssignableFrom(parameterPolicyType)) 202if (typeof(IConvertible).IsAssignableFrom(parameters[i].ParameterType)) 220if (serviceProvider != null && !typeof(IConvertible).IsAssignableFrom(parameterType))
Microsoft.AspNetCore.Server.IIS (2)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (2)
90(typeof(IAsyncStateMachine).IsAssignableFrom(type) || typeof(IEnumerator).IsAssignableFrom(type)))
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (4)
Http1\Http1HttpProtocolFeatureCollectionTests.cs (4)
67if (type.IsAssignableFrom(typeof(HttpProtocol))) 202if (type.IsAssignableFrom(typeof(HttpProtocol))) 229if (type.IsAssignableFrom(typeof(HttpProtocol))) 246if (type.IsAssignableFrom(typeof(HttpProtocol)))
Microsoft.AspNetCore.Shared.Tests (5)
src\Shared\ActivatorUtilities\ActivatorUtilities.cs (1)
122_parameters[applyIndex].ParameterType.IsAssignableFrom(givenType))
src\Shared\ObjectMethodExecutor\AwaitableInfo.cs (2)
73var implementsINotifyCompletion = typeof(INotifyCompletion).IsAssignableFrom(awaiterType); 84var implementsICriticalNotifyCompletion = typeof(ICriticalNotifyCompletion).IsAssignableFrom(awaiterType);
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (2)
90(typeof(IAsyncStateMachine).IsAssignableFrom(type) || typeof(IEnumerator).IsAssignableFrom(type)))
Microsoft.AspNetCore.SignalR.Client.Core (1)
src\SignalR\common\Shared\MessageBuffer.cs (1)
162if (typeof(HubInvocationMessage).IsAssignableFrom(hubMessageType))
Microsoft.AspNetCore.SignalR.Core (5)
Internal\DefaultHubDispatcher.cs (1)
750descriptor.OriginalParameterTypes[parameterPointer].IsAssignableFrom(hubMethodInvocationMessage.Arguments[hubInvocationArgumentPointer]?.GetType())))
Internal\TypedClientBuilder.cs (1)
285if (!typeof(Task).IsAssignableFrom(interfaceMethod.ReturnType))
src\Shared\ObjectMethodExecutor\AwaitableInfo.cs (2)
73var implementsINotifyCompletion = typeof(INotifyCompletion).IsAssignableFrom(awaiterType); 84var implementsICriticalNotifyCompletion = typeof(ICriticalNotifyCompletion).IsAssignableFrom(awaiterType);
src\SignalR\common\Shared\MessageBuffer.cs (1)
162if (typeof(HubInvocationMessage).IsAssignableFrom(hubMessageType))
Microsoft.AspNetCore.TestHost (1)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.5.25256.101\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
116&& typeof(TReturn).IsAssignableFrom(factory.ReturnType)
Microsoft.Build (10)
BackEnd\Components\Communications\TranslatorExtensions.cs (2)
76typeof(T).IsAssignableFrom(type), 79typeof(ITranslatable).IsAssignableFrom(type),
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
382typeof(T).IsAssignableFrom(t.type))
BackEnd\Components\SdkResolution\SdkResolverLoader.cs (1)
227.Where(t => t.info.IsClass && t.info.IsPublic && !t.info.IsAbstract && typeof(SdkResolver).IsAssignableFrom(t.type))
BuildCheck\Acquisition\BuildCheckAcquisitionModule.cs (1)
44Type[] checkTypes = availableTypes.Where(t => typeof(Check).IsAssignableFrom(t)).ToArray();
Instance\TaskFactoryWrapper.cs (1)
276bool taskTypeImplementsIGeneratedTask = typeof(IGeneratedTask).IsAssignableFrom(_taskFactory.TaskType);
Instance\TaskRegistry.cs (1)
656typeof(Microsoft.Build.Framework.ITaskFactory).IsAssignableFrom(type);
LoadedType.cs (1)
100bool isAssignableToITask = iTaskItemType.IsAssignableFrom(pt);
TaskParameter.cs (1)
173else if (typeof(ITaskItem).IsAssignableFrom(wrappedParameterType))
TaskParameterTypeVerifier.cs (1)
43typeof(ITaskItem).IsAssignableFrom(parameterType); /* ITaskItem or derived type */
Microsoft.Build.Framework (1)
TaskPropertyInfo.cs (1)
32IsAssignableToITask = typeof(ITaskItem).IsAssignableFrom(elementType);
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\OptionDefinition.cs (1)
102typeof(ICodeStyleOption2).IsAssignableFrom(type) ||
Microsoft.CodeAnalysis.EditorFeatures (1)
InlineDiagnostics\AbstractDiagnosticsTaggerProvider.SingleDiagnosticKindPullTaggerProvider.cs (1)
59private readonly bool _requiresBeforeTagsChangedNotification = diagnosticKind == DiagnosticKind.CompilerSyntax && typeof(TTag).IsAssignableFrom(typeof(IErrorTag));
Microsoft.CodeAnalysis.ExternalAccess.Extensions (2)
Internal\ExtensionMessageHandlerWrapper.cs (2)
43if ((message is null && MessageType.IsValueType) || (message is not null && !MessageType.IsAssignableFrom(message.GetType()))) 52if ((response is null && ResponseType.IsValueType) || (response is not null && !ResponseType.IsAssignableFrom(response.GetType())))
Microsoft.CodeAnalysis.Features (2)
Common\AbstractProjectExtensionProvider.cs (1)
163if (typeof(TExtension).IsAssignableFrom(typeInfo))
EmbeddedLanguages\ExportEmbeddedLanguageFeatureServiceAttribute.cs (1)
55Contract.ThrowIfFalse(contractType.IsInterface && typeof(IEmbeddedLanguageFeatureService).IsAssignableFrom(contractType),
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
LspServices\AbstractExportLspServiceAttribute.cs (1)
77_lazyMethodHandlerData = typeof(IMethodHandler).IsAssignableFrom(serviceType)
Protocol\Converters\SumConverter.cs (3)
20return typeof(ISumType).IsAssignableFrom(typeToConvert); 70typeof(IStringEnum).IsAssignableFrom(parameterTypeInfo)) 307typeof(IStringEnum).IsAssignableFrom(unionTypeInfo.Type);
Protocol\SumType.cs (1)
882if (typeof(ISumType).IsAssignableFrom(type))
Microsoft.CodeAnalysis.Test.Utilities (1)
TestHelpers.cs (1)
43return t.GetFields(BindingFlags.Public | BindingFlags.Static).Any(f => type.IsAssignableFrom(f.FieldType));
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\OptionDefinition.cs (2)
100typeof(ICodeStyleOption).IsAssignableFrom(type) || 102typeof(ICodeStyleOption2).IsAssignableFrom(type) ||
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
MEF\ExportProviderCache.cs (1)
104return types.Any(excludedType => excludedType.IsAssignableFrom(part.Type));
Options\OptionsTestInfo.cs (1)
51if (typeof(IOption2).IsAssignableFrom(field.FieldType))
Microsoft.Extensions.AI (1)
Functions\AIFunctionFactory.cs (1)
608!declaringType.IsAssignableFrom(targetType))
Microsoft.Extensions.AI.Abstractions (1)
Utilities\AIJsonUtilities.cs (1)
58if (!typeof(AIContent).IsAssignableFrom(contentType))
Microsoft.Extensions.Caching.Hybrid (1)
Internal\DefaultJsonSerializerFactory.cs (1)
78if (typeof(IEnumerable).IsAssignableFrom(type))
Microsoft.Extensions.DependencyInjection (4)
ServiceLookup\ConstructorCallSite.cs (1)
20if (!serviceType.IsAssignableFrom(constructorInfo.DeclaringType))
ServiceLookup\Expressions\ExpressionResolverBuilder.cs (1)
198if (type.IsAssignableFrom(expression.Type)
ServiceLookup\ServiceCallSite.cs (2)
28typeof(IDisposable).IsAssignableFrom(ImplementationType) || 29typeof(IAsyncDisposable).IsAssignableFrom(ImplementationType);
Microsoft.Extensions.DependencyInjection.Abstractions (2)
ActivatorUtilities.cs (2)
696if (constructorParameters[j].ParameterType.IsAssignableFrom(givenParameter)) 819_constructor.Parameters[applyIndex].ParameterType.IsAssignableFrom(givenType))
Microsoft.Extensions.Http.Resilience.Tests (1)
artifacts\obj\Microsoft.Extensions.Http.Resilience.Tests\Debug\net8.0\Protos\GreetGrpc.cs (1)
36public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
Microsoft.Extensions.Identity.Core (4)
IdentityBuilder.cs (3)
146if (!typeof(IUserTwoFactorTokenProvider<>).MakeGenericType(UserType).IsAssignableFrom(provider)) 178if (!userManagerType.IsAssignableFrom(customType)) 264if (!managerType.IsAssignableFrom(customType))
TokenProviderDescriptor.cs (1)
43if (typeof(T).IsAssignableFrom(providerType))
Microsoft.Extensions.ObjectPool (1)
DefaultObjectPoolProvider.cs (1)
24if (typeof(IDisposable).IsAssignableFrom(typeof(T)))
Microsoft.Extensions.ObjectPool.DependencyInjection (1)
DependencyInjectionPooledObjectPolicy.cs (1)
22_isResettable = typeof(IResettable).IsAssignableFrom(typeof(TImplementation));
Microsoft.Maui (15)
Hosting\ImageSources\ImageSourceToImageSourceServiceTypeMapping.cs (4)
34 Debug.Assert(typeof(IImageSource).IsAssignableFrom(type)); 54 if (imageSource.IsAssignableFrom(type)) 56 if (bestImageSource is null || bestImageSource.IsAssignableFrom(imageSource)) 61 else if (!imageSource.IsAssignableFrom(bestImageSource))
Hosting\Internal\RegisteredHandlerServiceTypeSet.cs (4)
32 Debug.Assert(typeof(IElement).IsAssignableFrom(type)); 51 if (registeredViewHandlerServiceType.IsAssignableFrom(type)) 53 if (bestVirtualViewHandlerServiceType is null || bestVirtualViewHandlerServiceType.IsAssignableFrom(registeredViewHandlerServiceType)) 57 else if (!registeredViewHandlerServiceType.IsAssignableFrom(bestVirtualViewHandlerServiceType))
Hosting\MauiHandlersCollectionExtensions.cs (4)
23 if (!typeof(IElement).IsAssignableFrom(viewType) || !typeof(IElementHandler).IsAssignableFrom(handlerType)) 81 if (!typeof(IElement).IsAssignableFrom(viewType) || !typeof(IElementHandler).IsAssignableFrom(handlerType))
HotReload\HotReloadHelper.cs (2)
151 if (typeof(IHotReloadableView).IsAssignableFrom(newViewType)) 154 if (typeof(IViewHandler).IsAssignableFrom(newViewType))
Platform\ReflectionExtensions.cs (1)
27 return self.IsAssignableFrom(o.GetType());
Microsoft.Maui.Controls (17)
BindableObject.cs (1)
485 if (value is BindingBase binding && !property.ReturnType.IsAssignableFrom(typeof(BindableProperty)))
BindableProperty.cs (1)
232 if (returnType.IsAssignableFrom(valueType))
BindingExpression.cs (1)
74 if (sourceObject != null && !dataType.IsAssignableFrom(sourceObject.GetType()))
ContentConverter.cs (1)
116 if (type.IsAssignableFrom(parent.GetType()))
DependencyService.cs (1)
99 DependencyTypes.FirstOrDefault(t => target.IsAssignableFrom(t.Type)).Type;
MergedStyle.cs (1)
48 if (value != null && !value.TargetType.IsAssignableFrom(TargetType))
Registrar.cs (2)
517 if (typeof(IRegisterable).IsAssignableFrom(rendererType)) 520 if (typeof(IElementHandler).IsAssignableFrom(rendererType))
RelativeBindingSource.cs (2)
166 AncestorType!.IsAssignableFrom(element.GetType()); 171 AncestorType!.IsAssignableFrom(element.BindingContext.GetType());
Style.cs (1)
198 => value is null || value.TargetType.IsAssignableFrom(TargetType);
TypeConversionHelper.cs (3)
28 if (targetType.IsAssignableFrom(wrappedType)) 151 && parameters[0].ParameterType.IsAssignableFrom(fromType); 154 => toType.IsAssignableFrom(method.ReturnType);
VisualElement\VisualElement_StyleSheet.cs (1)
24 if (styleAttribute.TargetType.IsAssignableFrom(GetType()))
Visuals\VisualTypeConverter.cs (1)
81 if (typeof(IVisual).IsAssignableFrom(type) && type != typeof(IVisual))
Xaml\TypeConversionExtensions.cs (1)
219 if (value != null && !toType.IsAssignableFrom(value.GetType()))
Microsoft.Maui.Controls.Xaml (16)
ApplyPropertiesVisitor.cs (4)
47 public bool IsResourceDictionary(ElementNode node) => Context.Types.TryGetValue(node, out var type) && typeof(ResourceDictionary).IsAssignableFrom(type); 167 && typeof(IEnumerable).IsAssignableFrom(Context.Types[parentElement]) 494 if (!parameters[i].ParameterType.IsAssignableFrom(eventInfo.EventHandlerType.GetMethod("Invoke").GetParameters()[i].ParameterType)) 727 if (method.IsFamily && method.DeclaringType.IsAssignableFrom(rootElement.GetType()))
CreateValuesVisitor.cs (2)
36 public bool IsResourceDictionary(ElementNode node) => typeof(ResourceDictionary).IsAssignableFrom(Context.Types[node]); 265 if ((p[i].ParameterType.IsAssignableFrom(types[i])))
FillResourceDictionariesVisitor.cs (7)
26 public bool IsResourceDictionary(ElementNode node) => typeof(ResourceDictionary).IsAssignableFrom(Context.Types[node]); 30 if (!Context.Types.TryGetValue((IElementNode)parentNode, out var type) || !typeof(ResourceDictionary).IsAssignableFrom(type)) 46 if (typeof(ResourceDictionary).IsAssignableFrom(Context.Types[node]) && node.TryGetPropertyName(parentNode, out XmlName propertyName)) 60 && typeof(ResourceDictionary).IsAssignableFrom(parentType) 64 && typeof(ResourceDictionary).IsAssignableFrom(Context.Types[((IElementNode)parentNode.Parent)]) 83 && typeof(ResourceDictionary).IsAssignableFrom(parentType) 87 && typeof(ResourceDictionary).IsAssignableFrom(Context.Types[((IElementNode)parentNode.Parent)])
MarkupExtensions\RelativeSourceExtension.cs (1)
45 actualMode = typeof(Element).IsAssignableFrom(AncestorType)
MarkupExtensions\StaticResourceExtension.cs (1)
44 if (propertyType is null || propertyType.IsAssignableFrom(valueType))
RegisterXNamesVisitor.cs (1)
22 public bool IsResourceDictionary(ElementNode node) => typeof(ResourceDictionary).IsAssignableFrom(Context.Types[node]);
Microsoft.ML.Core (21)
CommandLine\CmdParser.cs (6)
341else if (t1.IsAssignableFrom(t2)) 343else if (t2.IsAssignableFrom(t1)) 360else if (t1.IsAssignableFrom(t2)) 362else if (t2.IsAssignableFrom(t1)) 1462if (typeof(IComponentFactory).IsAssignableFrom(ItemValueType)) 2307!typeof(IComponentFactory).IsAssignableFrom(factoryType) ||
ComponentModel\ComponentCatalog.cs (7)
288if (!typeof(TRes).IsAssignableFrom(Type)) 298if (!typeof(TRes).IsAssignableFrom(Type)) 430if (!typeof(IComponentFactory).IsAssignableFrom(argumentType)) 473if (instType.IsAssignableFrom(loaderType)) 609if (!typeof(IComponentFactory).IsAssignableFrom(faceType)) 741.Where(info => info.SignatureTypes.Contains(typeSig) && typeBase.IsAssignableFrom(info.Type)) 1012if (!typeof(TRes).IsAssignableFrom(info.Type))
EntryPoints\ModuleArgs.cs (5)
621if (typeof(IDataView).IsAssignableFrom(type)) 623if (typeof(TransformModel).IsAssignableFrom(type)) 625if (typeof(PredictorModel).IsAssignableFrom(type)) 627if (typeof(IFileHandle).IsAssignableFrom(type)) 638if (typeof(IComponentFactory).IsAssignableFrom(type))
Utilities\FuncMethodInfo`1.cs (1)
20Contracts.CheckParam(typeof(TResult).IsAssignableFrom(GenericMethodDefinition.ReturnType), nameof(methodInfo), "Cannot be generic on return type");
Utilities\FuncMethodInfo`2.cs (1)
21Contracts.CheckParam(typeof(TResult).IsAssignableFrom(GenericMethodDefinition.ReturnType), nameof(methodInfo), "Cannot be generic on return type");
Utilities\FuncMethodInfo`3.cs (1)
21Contracts.CheckParam(typeof(TResult).IsAssignableFrom(GenericMethodDefinition.ReturnType), nameof(methodInfo), "Cannot be generic on return type");
Microsoft.ML.Data (4)
Commands\ScoreCommand.cs (1)
317if (info == null || !typeof(IDataScorerTransform).IsAssignableFrom(info.Type))
EntryPoints\EntryPointNode.cs (2)
37return typeof(IVarSerializationHelper).IsAssignableFrom(objectType); 234_ectx.Assert(value == null || Type.IsAssignableFrom(value.GetType()));
EntryPoints\InputBuilder.cs (1)
344else if (typeof(IComponentFactory).IsAssignableFrom(type))
Microsoft.ML.GenAI.Core (1)
CausalLMPipelineChatClient.cs (1)
88serviceType.IsAssignableFrom(GetType()) ? this :
Microsoft.ML.TestFramework (1)
SubComponent.cs (1)
209Contracts.Check(type != null && typeof(SubComponent).IsAssignableFrom(type));
Microsoft.ML.Transforms (2)
GroupTransform.cs (2)
412if ((typeof(IEquatable<T>).IsAssignableFrom(typeof(T)))) 414else if ((typeof(ReadOnlyMemory<char>).IsAssignableFrom(typeof(T))))
Microsoft.VisualBasic.Core (4)
Microsoft\VisualBasic\CompilerServices\LateBinding.vb (1)
1165If (Value Is Nothing) OrElse Member.DeclaringType.IsAssignableFrom(Value.GetType) Then
Microsoft\VisualBasic\CompilerServices\ObjectType.vb (3)
345Return ToType.GetElementType().IsAssignableFrom(FromType.GetElementType()) 350Return ToType.IsAssignableFrom(FromType) 362Return ToType.IsAssignableFrom(FromType)
Microsoft.VisualStudio.LanguageServices (2)
ErrorReporting\VisualStudioErrorReportingService.ExceptionFormatting.cs (2)
93=> !(declaringType != null && typeof(INotifyCompletion).IsAssignableFrom(declaringType)); 137if (typeof(IAsyncStateMachine).GetTypeInfo().IsAssignableFrom(declaringType))
MSBuild (3)
LoadedType.cs (1)
100bool isAssignableToITask = iTaskItemType.IsAssignableFrom(pt);
TaskParameter.cs (1)
173else if (typeof(ITaskItem).IsAssignableFrom(wrappedParameterType))
TaskParameterTypeVerifier.cs (1)
43typeof(ITaskItem).IsAssignableFrom(parameterType); /* ITaskItem or derived type */
MSBuildTaskHost (4)
TaskParameter.cs (2)
127else if (typeof(ITaskItem[]).GetTypeInfo().IsAssignableFrom(wrappedParameterType.GetTypeInfo())) 173else if (typeof(ITaskItem).IsAssignableFrom(wrappedParameterType))
TaskParameterTypeVerifier.cs (2)
42bool result = typeof(ITaskItem[]).GetTypeInfo().IsAssignableFrom(parameterType.GetTypeInfo()) || /* ITaskItem array or derived type, or */ 43typeof(ITaskItem).IsAssignableFrom(parameterType); /* ITaskItem or derived type */
MyFrontend (1)
artifacts\obj\MyFrontend\Debug\net8.0\BasketGrpc.cs (1)
33public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
PresentationBuildTasks (98)
MS\Internal\MarkupCompiler\MarkupCompiler.cs (10)
1154if (_codeContexts.Count > 1 && KnownTypes.Types[(int)KnownElements.INameScope].IsAssignableFrom(cc.ElementType)) 1772if (_codeContexts.Count > 1 && KnownTypes.Types[(int)KnownElements.INameScope].IsAssignableFrom(cc.ElementType)) 1901Debug.Assert(pis != null && pis.Length == 2 && KnownTypes.Types[(int)KnownElements.DependencyObject].IsAssignableFrom(pis[0].ParameterType)); 1977if (mei.mi.DeclaringType.IsAssignableFrom(eventTarget)) 1983KnownTypes.Types[(int)KnownElements.UIElement].IsAssignableFrom(eventTarget) || 1984KnownTypes.Types[(int)KnownElements.ContentElement].IsAssignableFrom(eventTarget)) 2183if (iNameScope.IsAssignableFrom(t)) 2187if (resourceDictionary.IsAssignableFrom(t)) 3031if (elementType != null && KnownTypes.Types[(int)KnownElements.IComponentConnector].IsAssignableFrom(elementType)) 3172(memberInfo.DeclaringType.IsAssignableFrom(_ccRoot.ElementType) && (memberInfo is PropertyInfo)));
MS\Internal\MarkupCompiler\ParserExtension.cs (2)
162KnownTypes.Types[(int)KnownElements.Application].IsAssignableFrom(memberInfo.DeclaringType)) 569bool appEvent = KnownTypes.Types[(int)KnownElements.Application].IsAssignableFrom(xamlClrEventNode.EventMember.DeclaringType);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlRecords.cs (6)
462return (KnownTypes.Types[(int)KnownElements.IAddChildInternal].IsAssignableFrom( parentObjectType )); 473else if (ReflectionHelper.GetMscorlibType(typeof(IDictionary)).IsAssignableFrom(propertyType)) 477else if (ReflectionHelper.GetMscorlibType(typeof(IList)).IsAssignableFrom(propertyType) || 479(ReflectionHelper.GetMscorlibType(typeof(IEnumerable)).IsAssignableFrom(propertyType) && !propertyCanWrite)) 4696|| (KnownTypes.Types[(int)KnownElements.DependencyProperty].IsAssignableFrom(propertyMember.GetType())), 4738KnownTypes.Types[(int)KnownElements.DependencyProperty].IsAssignableFrom(PropertyMember.GetType( )) )
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlRecordWriter.cs (8)
347if (typeof(String).IsAssignableFrom(xamlElementNode.ElementType) || 348KnownTypes.Types[(int)KnownElements.StaticExtension].IsAssignableFrom(xamlElementNode.ElementType) || 349KnownTypes.Types[(int)KnownElements.TypeExtension].IsAssignableFrom(xamlElementNode.ElementType)) 367else if (_deferLoadingSupport && KnownTypes.Types[(int)KnownElements.ResourceDictionary].IsAssignableFrom(xamlElementNode.ElementType)) 787if (!typeof(String).IsAssignableFrom(xamlKeyElementNode.ElementType) && 788!KnownTypes.Types[(int)KnownElements.StaticExtension].IsAssignableFrom(xamlKeyElementNode.ElementType) && 789!KnownTypes.Types[(int)KnownElements.TypeExtension].IsAssignableFrom(xamlKeyElementNode.ElementType) && 790!KnownTypes.Types[(int)KnownElements.ResourceKey].IsAssignableFrom(xamlKeyElementNode.ElementType))
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\MarkupExtensionParser.cs (1)
592else if (!KnownTypes.Types[(int)KnownElements.MarkupExtension].IsAssignableFrom(targetType))
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\ParserContext.cs (2)
865if (attributeType.IsAssignableFrom(constructorArgumentType)) 869else if (attributeType.IsAssignableFrom(markupExtensionBracketCharacterType))
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\StyleXamlParser.cs (2)
635if (KnownTypes.Types[(int)KnownElements.SetterBase].IsAssignableFrom(xamlElementStartNode.ElementType)) 666(KnownTypes.Types[(int)KnownElements.SetterBase].IsAssignableFrom(xamlElementStartNode.ElementType)))
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\TemplateXamlParser.cs (7)
653if (KnownTypes.Types[(int)KnownElements.ControlTemplate].IsAssignableFrom(xamlElementStartNode.ElementType)) 657else if (KnownTypes.Types[(int)KnownElements.DataTemplate].IsAssignableFrom(xamlElementStartNode.ElementType)) 673else if (KnownTypes.Types[(int)KnownElements.ItemsPanelTemplate].IsAssignableFrom(xamlElementStartNode.ElementType)) 704(KnownTypes.Types[(int)KnownElements.SetterBase].IsAssignableFrom(xamlElementStartNode.ElementType))) 841!KnownTypes.Types[(int)KnownElements.FrameworkElement].IsAssignableFrom(elementType) 843!KnownTypes.Types[(int)KnownElements.FrameworkContentElement].IsAssignableFrom(elementType)) 1535if (!KnownTypes.Types[(int)KnownElements.DataTrigger].IsAssignableFrom(t))
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (34)
228return (ReflectionHelper.GetMscorlibType(typeof(IList)).IsAssignableFrom(type) 229|| ReflectionHelper.GetMscorlibType(typeof(IDictionary)).IsAssignableFrom(type) 230|| ReflectionHelper.GetMscorlibType(typeof(Array)).IsAssignableFrom(type)); 624ReflectionHelper.GetMscorlibType(typeof(IDictionary)).IsAssignableFrom(ParentContext.ContextData as Type)); 1382!typeof(System.Xml.XmlException).IsAssignableFrom(innerException.GetType())) 1896if (KnownTypes.Types[(int)KnownElements.Application].IsAssignableFrom(type) || 1897KnownTypes.Types[(int)KnownElements.ResourceDictionary].IsAssignableFrom(type)) 2286dependencyObjectType.IsAssignableFrom(CurrentContext.ContextDataType)) 2960KnownTypes.Types[(int)KnownElements.IComponentConnector].IsAssignableFrom(parentType)) 3121&& !ReflectionHelper.GetMscorlibType(typeof(IDictionary)).IsAssignableFrom(pType)) 3354if (KnownTypes.Types[(int)KnownElements.FrameworkElement].IsAssignableFrom(objectType) || 3355KnownTypes.Types[(int)KnownElements.FrameworkContentElement].IsAssignableFrom(objectType) || 3356KnownTypes.Types[(int)KnownElements.Timeline].IsAssignableFrom(objectType) || 3357KnownTypes.Types[(int)KnownElements.BeginStoryboard].IsAssignableFrom(objectType)) 3382if (KnownTypes.Types[(int)KnownElements.Timeline].IsAssignableFrom(objectType)) 3428if (FEType.IsAssignableFrom(baseType) || 3429FCEType.IsAssignableFrom(baseType) || 3430BSBType.IsAssignableFrom(baseType)) 3437if (TimelineType.IsAssignableFrom(baseType)) 3682if (KnownTypes.Types[(int)KnownElements.RoutedEvent].IsAssignableFrom(elementBaseType)) 4196ReflectionHelper.GetMscorlibType(typeof(IEnumerable)).IsAssignableFrom(propertyType) && 4197!ReflectionHelper.GetMscorlibType(typeof(IList)).IsAssignableFrom(propertyType) && 4377if (((ParentContext.ContextDataType).IsAssignableFrom(currentObjectType) || 4378KnownTypes.Types[(int)KnownElements.MarkupExtension].IsAssignableFrom(currentObjectType)) 4495if (ReflectionHelper.GetMscorlibType(typeof(IList)).IsAssignableFrom(parentElementType) 4496&& ReflectionHelper.GetMscorlibType(typeof(IDictionary)).IsAssignableFrom(parentElementType)) 4593if (ReflectionHelper.GetMscorlibType(typeof(IList)).IsAssignableFrom(pi.PropertyType)) 4650!ReflectionHelper.GetMscorlibType(typeof(IEnumerable)).IsAssignableFrom(parentType) && 4651!ReflectionHelper.GetMscorlibType(typeof(IList)).IsAssignableFrom(parentType) && 4652!ReflectionHelper.GetMscorlibType(typeof(IDictionary)).IsAssignableFrom(parentType)) 4670&& !arrayType.IsAssignableFrom(objectType)) 4728else if( ReflectionHelper.GetMscorlibType(typeof(IList)).IsAssignableFrom(contentPropertyType) ) 4969if( propertyInfo.PropertyType.IsAssignableFrom(ReflectionHelper.GetMscorlibType(typeof(string))) ) 6782return _typeIXmlSerializable.IsAssignableFrom(type);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (7)
1287if (pis == null || pis.Length != 2 || !dependencyObjectType.IsAssignableFrom(pis[0].ParameterType)) 1391!objectType.IsAssignableFrom(owner)) 1448if (pis == null || pis.Length != 2 || !dependencyObjectType.IsAssignableFrom(pis[0].ParameterType)) 1816if (KnownTypes.Types[(int)KnownElements.FrameworkElement].IsAssignableFrom(typeAndSerializer.ObjectType) || 1817KnownTypes.Types[(int)KnownElements.FrameworkContentElement].IsAssignableFrom(typeAndSerializer.ObjectType)) 2709else if (KnownTypes.Types[(int)KnownElements.FrameworkTemplate].IsAssignableFrom(objectType)) 3763if (KnownTypes.Types[(int)KnownElements.LineBreak].IsAssignableFrom(type))
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\TypeConverterHelper.cs (19)
156else if (typeof(Int32).IsAssignableFrom(type)) 160else if (typeof(Int16).IsAssignableFrom(type)) 164else if (typeof(Int64).IsAssignableFrom(type)) 168else if (typeof(UInt32).IsAssignableFrom(type)) 172else if (typeof(UInt16).IsAssignableFrom(type)) 176else if (typeof(UInt64).IsAssignableFrom(type)) 180else if (typeof(Boolean).IsAssignableFrom(type)) 184else if (typeof(Double).IsAssignableFrom(type)) 188else if (typeof(Single).IsAssignableFrom(type)) 192else if (typeof(Byte).IsAssignableFrom(type)) 196else if (typeof(SByte).IsAssignableFrom(type)) 200else if (typeof(Char).IsAssignableFrom(type)) 204else if (typeof(Decimal).IsAssignableFrom(type)) 208else if (typeof(TimeSpan).IsAssignableFrom(type)) 212else if (typeof(Guid).IsAssignableFrom(type)) 216else if (typeof(String).IsAssignableFrom(type)) 220else if (typeof(CultureInfo).IsAssignableFrom(type)) 224else if (typeof(Type).IsAssignableFrom(type)) 228else if (typeof(DateTime).IsAssignableFrom(type))
PresentationCore (11)
System\Windows\EventManager.cs (3)
155if (!typeof(UIElement).IsAssignableFrom(classType) && 156!typeof(ContentElement).IsAssignableFrom(classType) && 157!typeof(UIElement3D).IsAssignableFrom(classType))
System\Windows\GlobalEventManager.cs (3)
57typeof(UIElement).IsAssignableFrom(classType) || 58typeof(ContentElement).IsAssignableFrom(classType) || 59typeof(UIElement3D).IsAssignableFrom(classType),
System\Windows\Media\Animation\AnimationStorage.cs (1)
1043return dp.PropertyType.IsAssignableFrom(animation.TargetPropertyType)
System\Windows\Media\CharacterMetricsDictionary.cs (1)
200if (!elementType.IsAssignableFrom(typeof(SC.DictionaryEntry)))
System\Windows\Media\CultureSpecificStringDictionary.cs (1)
169if (!elementType.IsAssignableFrom(typeof(SC.DictionaryEntry)))
System\Windows\Media\FamilyMapCollection.cs (1)
94if (!elementType.IsAssignableFrom(typeof(FamilyTypeface)))
System\Windows\Media\FamilyTypefaceCollection.cs (1)
372if (!elementType.IsAssignableFrom(typeof(FamilyTypeface)))
PresentationFramework (365)
MS\Internal\Annotations\Component\AnnotationHighlightLayer.cs (10)
991if (typeof(Run).IsAssignableFrom(elementType) || 992typeof(BlockUIContainer).IsAssignableFrom(elementType)) 997else if (typeof(Table).IsAssignableFrom(elementType) || 998typeof(Floater).IsAssignableFrom(elementType) || 999typeof(Figure).IsAssignableFrom(elementType)) 1006if (typeof(Run).IsAssignableFrom(elementType) || 1007typeof(BlockUIContainer).IsAssignableFrom(elementType)) 1015if (typeof(TableCell).IsAssignableFrom(elementType) || 1016typeof(Floater).IsAssignableFrom(elementType) || 1017typeof(Figure).IsAssignableFrom(elementType))
MS\Internal\Data\ClrBindingWorker.cs (1)
83else if (targetType.IsAssignableFrom(typeof(XmlDataCollection)))
MS\Internal\Data\DefaultValueConverter.cs (10)
68(!targetToSource && targetType.IsAssignableFrom(sourceType))) 134if (typeof(IListSource).IsAssignableFrom(sourceType) && 135targetType.IsAssignableFrom(typeof(IList))) 152if ((canConvertTo || targetType.IsAssignableFrom(sourceType)) && 153(!targetToSource || canConvertFrom || sourceType.IsAssignableFrom(targetType))) 164if ((canConvertFrom || targetType.IsAssignableFrom(sourceType)) && 165(!targetToSource || canConvertTo || sourceType.IsAssignableFrom(targetType))) 322((o != null && destinationType.IsAssignableFrom(o.GetType())) || 579if (o != null && _sourceType.IsAssignableFrom(o.GetType())) 617if ((o != null && _targetType.IsAssignableFrom(o.GetType())) ||
MS\Internal\Data\IndexedEnumerable.cs (1)
494if (indexerParameters[0].ParameterType.IsAssignableFrom(typeof(int)))
MS\Internal\Data\PropertyPathWorker.cs (3)
654typeof(DependencyObject).IsAssignableFrom(_arySVS[_arySVS.Length - 1].type); 1355if (paramType.IsAssignableFrom(pInfo.type)) 1397if (arg == null && paramType.IsAssignableFrom(typeof(string)))
MS\Internal\Data\ViewManager.cs (1)
578if (!typeof(ICollectionView).IsAssignableFrom(collectionViewType))
MS\Internal\Documents\TextContainerHelper.cs (3)
397while (typeof(TextElement).IsAssignableFrom(position.ParentType)) 440while (typeof(TextElement).IsAssignableFrom(position.ParentType)) 456while (typeof(TextElement).IsAssignableFrom(position.ParentType))
MS\Internal\Helper.cs (9)
661if (!typeof(MarkupExtension).IsAssignableFrom(memberType) || 662!memberType.IsAssignableFrom(markupExtension.GetType())) 682if (!typeof(BindingBase).IsAssignableFrom(markupExtension.GetType()) || 683!typeof(Collection<BindingBase>).IsAssignableFrom(targetProperty.GetType())) 706if (!typeof(BindingBase).IsAssignableFrom(markupExtension.GetType()) || 707!typeof(Collection<BindingBase>).IsAssignableFrom(targetType)) 718if (typeof(Setter).IsAssignableFrom(type)) 722else if (typeof(DataTrigger).IsAssignableFrom(type)) 726else if (typeof(Condition).IsAssignableFrom(type))
MS\Internal\WindowsRuntime\Generated\WinRT\TypeExtensions.cs (2)
13if (typeof(Exception).IsAssignableFrom(type)) 70return typeof(Delegate).IsAssignableFrom(type);
System\Windows\Automation\Peers\ItemsControlAutomationPeer.cs (1)
662if(!(typeof(T).IsAssignableFrom(typeof(System.WeakReference))))
System\Windows\Controls\DataGridAutoGeneratingColumnEventArgs.cs (2)
106typeof(PropertyDescriptor).IsAssignableFrom(value.GetType()) || 107typeof(PropertyInfo).IsAssignableFrom(value.GetType()),
System\Windows\Controls\DataGridColumn.cs (4)
1159else if (typeof(string).IsAssignableFrom(propertyType)) 1163else if (typeof(bool).IsAssignableFrom(propertyType)) 1167else if (typeof(Uri).IsAssignableFrom(propertyType)) 1177if (!typeof(IComparable).IsAssignableFrom(propertyType))
System\Windows\Controls\GridViewHeaderRowPresenter.cs (1)
1468if (style != null && !style.TargetType.IsAssignableFrom(typeof(GridViewColumnHeader)))
System\Windows\Controls\ItemsPanelTemplate.cs (1)
124if (!typeof(Panel).IsAssignableFrom(root.Type))
System\Windows\Controls\Primitives\Selector.cs (1)
629if (!knownType.IsAssignableFrom(itemType))
System\Windows\ControlTemplate.cs (3)
134if (!typeof(Control).IsAssignableFrom(targetType) && 135!typeof(Page).IsAssignableFrom(targetType) && 136!typeof(PageFunctionBase).IsAssignableFrom(targetType))
System\Windows\Data\BindingExpression.cs (2)
1318&& !targetType.IsAssignableFrom(value.GetType())) 2156if (sourceType.IsAssignableFrom(value.GetType()))
System\Windows\Data\CollectionView.cs (1)
1517if (typeof(ICustomTypeProvider).IsAssignableFrom(type))
System\Windows\Data\CollectionViewSource.cs (1)
204typeof(ICollectionView).IsAssignableFrom(type);
System\Windows\DeferrableContentConverter.cs (1)
17if (typeof(Stream).IsAssignableFrom(sourceType) || sourceType == typeof(byte[]))
System\Windows\Documents\DPTypeDescriptorContext.cs (1)
63else if (typeof(CultureInfo).IsAssignableFrom(property.PropertyType)) //NumberSubstitution.CultureOverrideProperty
System\Windows\Documents\MsSpellCheckLib\Utils\RetryHelper.cs (2)
288Type match = exceptions.Find((e) => e.IsAssignableFrom(exceptionType)); 300Invariant.Assert(exceptions.TrueForAll((t) => typeof(Exception).IsAssignableFrom(t)));
System\Windows\Documents\Paragraph.cs (2)
255typeof(LineBreak).IsAssignableFrom(navigator.ParentType) || 256typeof(AnchoredBlock).IsAssignableFrom(navigator.ParentType))
System\windows\Documents\TextEditor.cs (2)
321if (((Type)_registeredEditingTypes[i]).IsAssignableFrom(controlType)) 329if (controlType.IsAssignableFrom((Type)_registeredEditingTypes[i]))
System\windows\Documents\TextEditorSelection.cs (2)
107if (!typeof(BlockUIContainer).IsAssignableFrom(position.ParentType)) 2426while (typeof(Inline).IsAssignableFrom(navigator.ParentType))
System\windows\Documents\TextEditorSpelling.cs (1)
207if (typeof(Run).IsAssignableFrom(textStart.ParentType) &&
System\windows\Documents\TextEditorTyping.cs (4)
799if (typeof(ListItem).IsAssignableFrom(position.ParentType) && 815typeof(ListItem).IsAssignableFrom(position.ParentType)) 848typeof(Inline).IsAssignableFrom(navigator.ParentType)) 862return typeof(ListItem).IsAssignableFrom(navigator.ParentType);
System\Windows\Documents\TextElementCollection.cs (1)
600if (elementType == null || !elementType.IsAssignableFrom(typeof(TextElementType)))
System\Windows\Documents\TextPointerBase.cs (22)
205typeof(Inline).IsAssignableFrom(backwardType) && !TextSchema.IsMergeableInline(backwardType) && !typeof(Run).IsAssignableFrom(forwardType) && 209typeof(Inline).IsAssignableFrom(forwardType) && !TextSchema.IsMergeableInline(forwardType) && !typeof(Run).IsAssignableFrom(backwardType) && 233typeof(ListItem).IsAssignableFrom(parentType) || 234typeof(TableCell).IsAssignableFrom(parentType); 239typeof(FlowDocumentView).IsAssignableFrom(parentType) || 240typeof(FlowDocument).IsAssignableFrom(parentType); 256typeof(Table).IsAssignableFrom(position.GetElementType(LogicalDirection.Forward))); 263return (typeof(BlockUIContainer).IsAssignableFrom(position.ParentType)); 284while (parentType != null && allowedParentType.IsAssignableFrom(parentType)) 286if (limitingType.IsAssignableFrom(parentType)) 365if (typeof(Inline).IsAssignableFrom(elementType) && !TextSchema.IsMergeableInline(elementType)) 594if (!typeof(Inline).IsAssignableFrom(elementType)) 710return typeof(TableRow).IsAssignableFrom(thisPosition.ParentType) && 724!typeof(Inline).IsAssignableFrom(thisPosition.GetElementType(LogicalDirection.Backward)); 1169!typeof(Inline).IsAssignableFrom(thisNavigator.GetElementType(direction)) && 1177!typeof(Inline).IsAssignableFrom(thisNavigator.GetElementType(oppositeDirection)) && 1492!typeof(Inline).IsAssignableFrom(position.ParentType)) 1524if (typeof(LineBreak).IsAssignableFrom(neighbor) || 1525typeof(Paragraph).IsAssignableFrom(neighbor)) 1531else if (lineBreakType.IsAssignableFrom(neighbor))
System\Windows\Documents\TextRangeBase.cs (17)
351!typeof(Inline).IsAssignableFrom(navigator.GetElementType(direction)) // 356!typeof(Inline).IsAssignableFrom(navigator.ParentType)) 470while (!typeof(Paragraph).IsAssignableFrom(position.ParentType) && 477if (typeof(Paragraph).IsAssignableFrom(position.ParentType)) 519while (typeof(Inline).IsAssignableFrom(startNavigator.ParentType)) 523while (typeof(Inline).IsAssignableFrom(endNavigator.ParentType)) 686if (typeof(Paragraph).IsAssignableFrom(elementType) || 687typeof(BlockUIContainer).IsAssignableFrom(elementType)) 691else if (typeof(LineBreak).IsAssignableFrom(elementType)) 696else if (typeof(List).IsAssignableFrom(elementType)) 712if (typeof(AnchoredBlock).IsAssignableFrom(elementType)) 717else if (typeof(List).IsAssignableFrom(elementType) && navigator is TextPointer) 722else if (typeof(ListItem).IsAssignableFrom(elementType)) 767typeof(TableCell).IsAssignableFrom(navigator.ParentType)) 1251!typeof(AnchoredBlock).IsAssignableFrom(start.ParentType)) 1826while (outerAnchoredBlock != null && !typeof(AnchoredBlock).IsAssignableFrom(outerAnchoredBlock.GetType())) 1868while (outerAnchoredBlock != null && !typeof(AnchoredBlock).IsAssignableFrom(outerAnchoredBlock.GetType()))
System\Windows\Documents\TextRangeSerialization.cs (28)
191if (elementLevel == EmptyDocumentDepth && typeof(Run).IsAssignableFrom(rangeStart.ParentType)) 353while (!typeof(TableRow).IsAssignableFrom(pointer.ParentType)) 355Invariant.Assert(typeof(TextElement).IsAssignableFrom(pointer.ParentType), "pointer must be still in a scope of TextElement"); 358Invariant.Assert(typeof(TableRow).IsAssignableFrom(pointer.ParentType), "pointer must be in a scope of TableRow"); 424Invariant.Assert(typeof(TextElement).IsAssignableFrom(thisElement.ParentType), "thisElement is expected to be a TextElement"); 658typeof(Paragraph).IsAssignableFrom(contextType) || 659typeof(Inline).IsAssignableFrom(contextType) && !typeof(AnchoredBlock).IsAssignableFrom(contextType)) 868&& typeof(Inline).IsAssignableFrom(parentContext.ParentType)) 885if ((property == Block.MarginProperty && (typeof(Paragraph).IsAssignableFrom(propertyOwnerType) || typeof(List).IsAssignableFrom(propertyOwnerType))) 887(property == Block.PaddingProperty) && typeof(List).IsAssignableFrom(propertyOwnerType)) 1515Invariant.Assert(itemType.IsAssignableFrom(start.GetAdjacentElement(LogicalDirection.Forward).GetType()), 1517Invariant.Assert(itemType.IsAssignableFrom(end.GetAdjacentElement(LogicalDirection.Backward).GetType()), 1524Invariant.Assert(!(backwardFromStart == TextPointerContext.ElementEnd) || itemType.IsAssignableFrom(start.GetAdjacentElement(LogicalDirection.Backward).GetType()), 1527Invariant.Assert(!(forwardFromEnd == TextPointerContext.ElementStart) || itemType.IsAssignableFrom(end.GetAdjacentElement(LogicalDirection.Forward).GetType()), 1621else if (targetType.IsAssignableFrom(element.GetType())) 1676while (typeof(TextElement).IsAssignableFrom(runningEnd.ParentType) && !runningEnd.HasEqualScope(commonAncestor)) 1695if (typeof(TextElement).IsAssignableFrom(commonAncestor.ParentType)) 1720if (typeof(TableRow).IsAssignableFrom(commonAncestor.ParentType) || 1721typeof(TableRowGroup).IsAssignableFrom(commonAncestor.ParentType) || 1722typeof(Table).IsAssignableFrom(commonAncestor.ParentType) || 1723typeof(BlockUIContainer).IsAssignableFrom(commonAncestor.ParentType) || 1724typeof(List).IsAssignableFrom(commonAncestor.ParentType) || 1725typeof(Inline).IsAssignableFrom(commonAncestor.ParentType) && TextSchema.HasTextDecorations(commonAncestor.GetValue(Inline.TextDecorationsProperty))) 1735while (typeof(TextElement).IsAssignableFrom(navigator.ParentType)) 1874Invariant.Assert(typeof(Hyperlink).IsAssignableFrom(textReader.GetElementType(LogicalDirection.Forward))); 1923!typeof(Hyperlink).IsAssignableFrom(hyperlinkStart.ParentType))
System\Windows\Documents\TextSchema.cs (105)
129if (typeof(Hyperlink).IsAssignableFrom(childType) || 130typeof(AnchoredBlock).IsAssignableFrom(childType)) 184if (typeof(Inline).IsAssignableFrom(newType)) 186return typeof(Inline).IsAssignableFrom(siblingType); 188else if (typeof(Block).IsAssignableFrom(newType)) 190return typeof(Block).IsAssignableFrom(siblingType); 192else if (typeof(TableRowGroup).IsAssignableFrom(newType)) 194return typeof(TableRowGroup).IsAssignableFrom(siblingType); 196else if (typeof(TableRow).IsAssignableFrom(newType)) 198return typeof(TableRow).IsAssignableFrom(siblingType); 200else if (typeof(TableCell).IsAssignableFrom(newType)) 202return typeof(TableCell).IsAssignableFrom(siblingType); 204else if (typeof(ListItem).IsAssignableFrom(newType)) 206return typeof(ListItem).IsAssignableFrom(siblingType); 218if (typeof(TextElement).IsAssignableFrom(position.ParentType) && 221if (typeof(Hyperlink).IsAssignableFrom(childType) || 222typeof(AnchoredBlock).IsAssignableFrom(childType)) 233Invariant.Assert(!typeof(TextElement).IsAssignableFrom(parentType)); 259typeof(Run).IsAssignableFrom(elementType) || 260typeof(Span).IsAssignableFrom(elementType); 275return typeof(Inline).IsAssignableFrom(elementType) && !IsFormattingType(elementType); 305typeof(Paragraph).IsAssignableFrom(elementType) || 306typeof(ListItem).IsAssignableFrom(elementType) || 307typeof(List).IsAssignableFrom(elementType) || 308typeof(Section).IsAssignableFrom(elementType); 325typeof(Paragraph).IsAssignableFrom(elementType) || 326typeof(BlockUIContainer).IsAssignableFrom(elementType); 333typeof(Block).IsAssignableFrom(type)); 339typeof(LineBreak).IsAssignableFrom(type)); 364if (typeof(Run).IsAssignableFrom(type)) 372else if (typeof(Hyperlink).IsAssignableFrom(type)) 376else if (typeof(Span).IsAssignableFrom(type)) 384else if (typeof(InlineUIContainer).IsAssignableFrom(type)) 388else if (typeof(LineBreak).IsAssignableFrom(type)) 392else if (typeof(Floater).IsAssignableFrom(type)) 396else if (typeof(Figure).IsAssignableFrom(type)) 403else if (typeof(Paragraph).IsAssignableFrom(type)) 407else if (typeof(Section).IsAssignableFrom(type)) 411else if (typeof(List).IsAssignableFrom(type)) 415else if (typeof(Table).IsAssignableFrom(type)) 419else if (typeof(BlockUIContainer).IsAssignableFrom(type)) 426else if (typeof(ListItem).IsAssignableFrom(type)) 430else if (typeof(TableColumn).IsAssignableFrom(type)) 434else if (typeof(TableRowGroup).IsAssignableFrom(type)) 438else if (typeof(TableRow).IsAssignableFrom(type)) 442else if (typeof(TableCell).IsAssignableFrom(type)) 455if (typeof(TableCell).IsAssignableFrom(type)) 460if (typeof(Block).IsAssignableFrom(type) || typeof(FlowDocument).IsAssignableFrom(type)) 465Invariant.Assert(typeof(TextElement).IsAssignableFrom(type) || typeof(TableColumn).IsAssignableFrom(type), 478if (typeof(Run).IsAssignableFrom(type)) 486else if (typeof(Hyperlink).IsAssignableFrom(type)) 490else if (typeof(Span).IsAssignableFrom(type)) 498else if (typeof(InlineUIContainer).IsAssignableFrom(type)) 502else if (typeof(LineBreak).IsAssignableFrom(type)) 506else if (typeof(Floater).IsAssignableFrom(type)) 510else if (typeof(Figure).IsAssignableFrom(type)) 517else if (typeof(Paragraph).IsAssignableFrom(type)) 521else if (typeof(Section).IsAssignableFrom(type)) 525else if (typeof(List).IsAssignableFrom(type)) 529else if (typeof(Table).IsAssignableFrom(type)) 533else if (typeof(BlockUIContainer).IsAssignableFrom(type)) 540else if (typeof(ListItem).IsAssignableFrom(type)) 544else if (typeof(TableColumn).IsAssignableFrom(type)) 548else if (typeof(TableRowGroup).IsAssignableFrom(type)) 552else if (typeof(TableRow).IsAssignableFrom(type)) 556else if (typeof(TableCell).IsAssignableFrom(type)) 755typeof(double).IsAssignableFrom(propertyType) || 756typeof(long).IsAssignableFrom(propertyType) || 757typeof(int).IsAssignableFrom(propertyType) || 758typeof(Thickness).IsAssignableFrom(propertyType); 802typeof(Run).IsAssignableFrom(parentType) || 803typeof(TextBox).IsAssignableFrom(parentType) || 804typeof(PasswordBox).IsAssignableFrom(parentType)) 813else if (typeof(TextBlock).IsAssignableFrom(parentType)) 815return typeof(Inline).IsAssignableFrom(childType) && 816!typeof(AnchoredBlock).IsAssignableFrom(childType); 819else if (typeof(Hyperlink).IsAssignableFrom(parentType)) 821return typeof(Inline).IsAssignableFrom(childType) && 822!typeof(Hyperlink).IsAssignableFrom(childType) && 823!typeof(AnchoredBlock).IsAssignableFrom(childType); 826else if (typeof(Span).IsAssignableFrom(parentType) || 827typeof(Paragraph).IsAssignableFrom(parentType) || 828typeof(AccessText).IsAssignableFrom(parentType)) 830return typeof(Inline).IsAssignableFrom(childType); 833else if (typeof(InlineUIContainer).IsAssignableFrom(parentType)) 835return typeof(UIElement).IsAssignableFrom(childType); 838else if (typeof(List).IsAssignableFrom(parentType)) 840return typeof(ListItem).IsAssignableFrom(childType); 843else if (typeof(Table).IsAssignableFrom(parentType)) 845return typeof(TableRowGroup).IsAssignableFrom(childType); 847else if (typeof(TableRowGroup).IsAssignableFrom(parentType)) 849return typeof(TableRow).IsAssignableFrom(childType); 851else if (typeof(TableRow).IsAssignableFrom(parentType)) 853return typeof(TableCell).IsAssignableFrom(childType); 858typeof(Section).IsAssignableFrom(parentType) || 859typeof(ListItem).IsAssignableFrom(parentType) || 860typeof(TableCell).IsAssignableFrom(parentType) || 861typeof(Floater).IsAssignableFrom(parentType) || 862typeof(Figure).IsAssignableFrom(parentType) || 863typeof(FlowDocument).IsAssignableFrom(parentType)) 865return typeof(Block).IsAssignableFrom(childType); 868else if (typeof(BlockUIContainer).IsAssignableFrom(parentType)) 870return typeof(UIElement).IsAssignableFrom(childType);
System\Windows\FrameworkElementFactory.cs (6)
83if (!typeof(FrameworkElement).IsAssignableFrom(value) && 84!typeof(FrameworkContentElement).IsAssignableFrom(value) && 85!typeof(Visual3D).IsAssignableFrom(value)) 551if (!typeof(IAddChild).IsAssignableFrom(_type)) 1157if (typeof(ContentPresenter).IsAssignableFrom(_type)) 1206else if (typeof(GridViewRowPresenter).IsAssignableFrom(_type))
System\Windows\FrameworkTemplate.cs (2)
372typeof(FrameworkContentElement).IsAssignableFrom(templateRoot.Type)) 572if (typeof(ResourceDictionary).IsAssignableFrom(type.UnderlyingType))
System\Windows\Markup\Baml2006\Baml2006Reader.cs (1)
1059!_context.CurrentFrame.Member.Type.UnderlyingType.IsAssignableFrom(typeof(String)))
System\Windows\Markup\Baml2006\WpfKnownType.cs (6)
262if (typeof(Setter).IsAssignableFrom(_underlyingType)) 266else if (typeof(DataTrigger).IsAssignableFrom(_underlyingType)) 270else if (typeof(Condition).IsAssignableFrom(_underlyingType)) 279if (typeof(Setter).IsAssignableFrom(_underlyingType)) 283else if (typeof(Trigger).IsAssignableFrom(_underlyingType)) 287else if (typeof(Condition).IsAssignableFrom(_underlyingType))
System\Windows\Markup\Baml2006\WpfSharedXamlSchemaContext.cs (1)
47if (!runtimeType.IsAssignableFrom(type.GetType()))
System\Windows\Markup\Baml2006\WpfXamlType.cs (7)
98else if (typeof(ResourceDictionary).IsAssignableFrom(UnderlyingType)) 486if (typeof(IDictionary).IsAssignableFrom(UnderlyingType)) 490if (typeof(IList).IsAssignableFrom(UnderlyingType)) 495if (typeof(System.Windows.Documents.DocumentReferenceCollection).IsAssignableFrom(UnderlyingType) || 496typeof(System.Windows.Documents.PageContentCollection).IsAssignableFrom(UnderlyingType)) 502if (typeof(ICollection<System.Windows.Data.XmlNamespaceMapping>).IsAssignableFrom(UnderlyingType) 521return typeof(System.Windows.Data.XmlNamespaceMappingCollection).IsAssignableFrom(UnderlyingType);
System\Windows\Markup\BamlRecordReader.cs (13)
843typeof(MarkupExtension).IsAssignableFrom(elementType)) 873ReaderFlags flags = (typeof(DependencyObject).IsAssignableFrom(elementType) ? ReaderFlags.DependencyObject : 876if (typeof(IDictionary).IsAssignableFrom(elementType)) 880else if (typeof(IList).IsAssignableFrom(elementType)) 884else if (typeof(ArrayExtension).IsAssignableFrom(elementType)) 1239ReaderFlags flags = (elementType.IsAssignableFrom(typeof(DependencyObject)) ? 1299if (typeof(IList).IsAssignableFrom(propertyDefinition.PropertyType)) 1623if (!paramInfo.ParameterType.IsAssignableFrom(param.GetType())) 1992if (typeof(IXmlSerializable).IsAssignableFrom(pi.PropertyType)) 2002if (typeof(IXmlSerializable).IsAssignableFrom(dp.PropertyType)) 3021if (typeof(IList).IsAssignableFrom(expectedType)) 3031else if (typeof(IEnumerable).IsAssignableFrom(expectedType) && 4858if (isMarkupExtension || parentContext.ExpectedType.IsAssignableFrom(elementType))
System\Windows\Markup\BamlRecords.cs (6)
462return (KnownTypes.Types[(int)KnownElements.IAddChildInternal].IsAssignableFrom( parentObjectType )); 481else if (typeof(IDictionary).IsAssignableFrom(propertyType)) 485else if ((typeof(IList).IsAssignableFrom(propertyType) || 487(typeof(IEnumerable).IsAssignableFrom(propertyType) && !propertyCanWrite))) 4696|| (KnownTypes.Types[(int)KnownElements.DependencyProperty].IsAssignableFrom(propertyMember.GetType())), 4738KnownTypes.Types[(int)KnownElements.DependencyProperty].IsAssignableFrom(PropertyMember.GetType( )) )
System\Windows\Markup\BamlRecordWriter.cs (8)
347if (typeof(String).IsAssignableFrom(xamlElementNode.ElementType) || 348KnownTypes.Types[(int)KnownElements.StaticExtension].IsAssignableFrom(xamlElementNode.ElementType) || 349KnownTypes.Types[(int)KnownElements.TypeExtension].IsAssignableFrom(xamlElementNode.ElementType)) 367else if (_deferLoadingSupport && KnownTypes.Types[(int)KnownElements.ResourceDictionary].IsAssignableFrom(xamlElementNode.ElementType)) 787if (!typeof(String).IsAssignableFrom(xamlKeyElementNode.ElementType) && 788!KnownTypes.Types[(int)KnownElements.StaticExtension].IsAssignableFrom(xamlKeyElementNode.ElementType) && 789!KnownTypes.Types[(int)KnownElements.TypeExtension].IsAssignableFrom(xamlKeyElementNode.ElementType) && 790!KnownTypes.Types[(int)KnownElements.ResourceKey].IsAssignableFrom(xamlKeyElementNode.ElementType))
System\Windows\Markup\BamlWriter.cs (1)
1137if(mostDerived == null || mostDerived.DeclaringType.IsAssignableFrom(pi.DeclaringType))
System\Windows\Markup\MarkupExtensionParser.cs (1)
592else if (!KnownTypes.Types[(int)KnownElements.MarkupExtension].IsAssignableFrom(targetType))
System\Windows\Markup\ParserContext.cs (2)
865if (attributeType.IsAssignableFrom(constructorArgumentType)) 869else if (attributeType.IsAssignableFrom(markupExtensionBracketCharacterType))
System\Windows\Markup\Primitives\ElementMarkupObject.cs (5)
431else if (value is string && PropertyType.IsAssignableFrom(typeof(object))) 485(typeof(IList).IsAssignableFrom(PropertyType) || 486typeof(IDictionary).IsAssignableFrom(PropertyType) || 487typeof(Freezable).IsAssignableFrom(PropertyType) || 488typeof(FrameworkElementFactory).IsAssignableFrom(PropertyType))) &&
System\Windows\Markup\Primitives\ExtensionSimplifierMarkupObject.cs (1)
233!typeof(MarkupExtension).IsAssignableFrom(item.ObjectType))
System\Windows\Markup\Primitives\MarkupWriter.cs (9)
471if (typeof(MarkupExtension).IsAssignableFrom(item.ObjectType) && 873typeof(FrameworkTemplate).IsAssignableFrom(descriptor.ComponentType) && 892!typeof(IList).IsAssignableFrom(descriptor.PropertyType)) 910property.PropertyType.IsAssignableFrom(typeof(string)) ) 1011if (property.PropertyType.IsAssignableFrom(arrayExt.Type.MakeArrayType())) 1017else if (property.PropertyType.IsAssignableFrom(firstItem.ObjectType)) 1039if (typeof(MarkupExtension).IsAssignableFrom(tagType) && 1149return typeof(IEnumerable).IsAssignableFrom(type) || 1150typeof(Array).IsAssignableFrom(type);
System\Windows\Markup\WpfXamlLoader.cs (2)
381if (typeof(DependencyObject).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType)) 394typeof(Style).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType))
System\Windows\Markup\XamlTypeMapper.cs (7)
617if(!propType.IsAssignableFrom(obj.GetType())) 1287if (pis == null || pis.Length != 2 || !dependencyObjectType.IsAssignableFrom(pis[0].ParameterType)) 1391!objectType.IsAssignableFrom(owner)) 1448if (pis == null || pis.Length != 2 || !dependencyObjectType.IsAssignableFrom(pis[0].ParameterType)) 1816if (KnownTypes.Types[(int)KnownElements.FrameworkElement].IsAssignableFrom(typeAndSerializer.ObjectType) || 1817KnownTypes.Types[(int)KnownElements.FrameworkContentElement].IsAssignableFrom(typeAndSerializer.ObjectType)) 2709else if (KnownTypes.Types[(int)KnownElements.FrameworkTemplate].IsAssignableFrom(objectType))
System\Windows\PropertyPath.cs (1)
811if (value == null && type.IsAssignableFrom(typeof(string)))
System\Windows\Style.cs (4)
163if (!typeof(FrameworkElement).IsAssignableFrom(value) && 164!typeof(FrameworkContentElement).IsAssignableFrom(value) && 467if(!TargetType.IsAssignableFrom(elementType)) 499!_basedOn.TargetType.IsAssignableFrom(_targetType))
System\Windows\StyleHelper.cs (2)
663if (typeof(Freezable).IsAssignableFrom(valueType)) 667else if (typeof(MarkupExtension).IsAssignableFrom(valueType))
System\Windows\TemplateContent.cs (35)
122(typeof(FrameworkTemplate).IsAssignableFrom(CurrentFrame.Type.UnderlyingType) || 123typeof(Style).IsAssignableFrom(CurrentFrame.Type.UnderlyingType))); 147(typeof(FrameworkTemplate).IsAssignableFrom(CurrentFrame.Type.UnderlyingType) || 148typeof(Style).IsAssignableFrom(CurrentFrame.Type.UnderlyingType))); 431if (typeof(FrameworkElement).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType) || 432typeof(FrameworkContentElement).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType)) 459if (typeof(FrameworkElement).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType) || 460typeof(FrameworkContentElement).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType)) 484if (typeof(FrameworkElement).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType) || 485typeof(FrameworkContentElement).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType)) 501if (typeof(ContentPresenter).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType)) 522if (typeof(GridViewRowPresenter).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType)) 551if (typeof(GridViewRowPresenter).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType)) 558else if (typeof(ContentPresenter).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType)) 612IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType) || 614IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType)) 660if (typeof(FrameworkElement).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType) || 661typeof(FrameworkContentElement).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType)) 671if (typeof(ContentPresenter).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType) 726if (typeof(FrameworkElement).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType) || 727typeof(FrameworkContentElement).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType)) 817if (!typeof(FrameworkElement).IsAssignableFrom(parentType.UnderlyingType) && 818!typeof(FrameworkContentElement).IsAssignableFrom(parentType.UnderlyingType)) 913if (typeof(FrameworkTemplate).IsAssignableFrom(xamlReader.Type.UnderlyingType)) 918else if (typeof(Style).IsAssignableFrom(xamlReader.Type.UnderlyingType)) 941if (typeof(StaticResourceExtension).IsAssignableFrom(xamlReader.Type.UnderlyingType)) 974if (xamlReader.Value != null && typeof(StaticResourceExtension).IsAssignableFrom(xamlReader.Value.GetType())) 1021if (typeof(IList).IsAssignableFrom(property.PropertyType)) 1029if (typeof(IDictionary).IsAssignableFrom(property.PropertyType)) 1156typeof(Freezable).IsAssignableFrom(type) 1164(typeof(MarkupExtension).IsAssignableFrom(type) 1166!typeof(StaticResourceExtension).IsAssignableFrom(type)) 1169typeof(Style).IsAssignableFrom(type) 1171typeof(FrameworkTemplate).IsAssignableFrom(type) 1174typeof(System.Windows.Data.CollectionViewSource).IsAssignableFrom(type)
PresentationFramework-SystemData (1)
SystemDataExtension.cs (1)
40return typeof(INullable).IsAssignableFrom(type);
ReachFramework (105)
Serialization\Manager\NGCSerializationManager.cs (15)
222if (typeof(System.Windows.Documents.FixedDocumentSequence).IsAssignableFrom(objectType)) 226else if (typeof(System.Windows.Documents.DocumentReferenceCollection).IsAssignableFrom(objectType)) 230else if (typeof(System.Windows.Documents.FixedDocument).IsAssignableFrom(objectType)) 234else if(typeof(System.Windows.Documents.PageContentCollection).IsAssignableFrom(objectType)) 238else if(typeof(System.Windows.Documents.PageContent).IsAssignableFrom(objectType)) 242else if(typeof(System.Windows.Controls.UIElementCollection).IsAssignableFrom(objectType)) 246else if(typeof(System.Windows.Documents.FixedPage).IsAssignableFrom(objectType)) 250else if (typeof(System.Windows.Documents.DocumentPaginator).IsAssignableFrom(objectType)) 254else if (typeof(System.Windows.Documents.DocumentPage).IsAssignableFrom(objectType)) 258else if (typeof(System.Windows.Media.Visual).IsAssignableFrom(objectType)) 660if((typeof(System.Windows.Media.Visual).IsAssignableFrom(serializedObjectType)) && 671(typeof(System.Windows.Documents.DocumentPaginator).IsAssignableFrom(serializedObjectType)) || 672(typeof(System.Windows.Media.Visual).IsAssignableFrom(serializedObjectType)) ) 693(typeof(System.Windows.Documents.DocumentPaginator).IsAssignableFrom(serializedObjectType)) || 694(typeof(System.Windows.Media.Visual).IsAssignableFrom(serializedObjectType)) )
Serialization\Manager\NGCSerializationManagerAsync.cs (17)
155else if(typeof(System.Windows.Xps.Serialization.NGCSerializerContext).IsAssignableFrom(objectOnStack.GetType())) 267else if(typeof(System.Windows.Xps.Serialization.NGCSerializerContext).IsAssignableFrom(objectOnStack.GetType())) 438if (typeof(System.Windows.Documents.FixedDocumentSequence).IsAssignableFrom(objectType)) 442else if (typeof(System.Windows.Documents.DocumentReferenceCollection).IsAssignableFrom(objectType)) 446else if (typeof(System.Windows.Documents.FixedDocument).IsAssignableFrom(objectType)) 450else if(typeof(System.Windows.Documents.PageContentCollection).IsAssignableFrom(objectType)) 454else if(typeof(System.Windows.Documents.PageContent).IsAssignableFrom(objectType)) 458else if(typeof(System.Windows.Controls.UIElementCollection).IsAssignableFrom(objectType)) 462else if(typeof(System.Windows.Documents.FixedPage).IsAssignableFrom(objectType)) 466else if (typeof(System.Windows.Documents.DocumentPaginator).IsAssignableFrom(objectType)) 470else if (typeof(System.Windows.Documents.DocumentPage).IsAssignableFrom(objectType)) 474else if (typeof(System.Windows.Media.Visual).IsAssignableFrom(objectType)) 909if((typeof(System.Windows.Media.Visual).IsAssignableFrom(serializedObjectType)) && 920(typeof(System.Windows.Documents.DocumentPaginator).IsAssignableFrom(serializedObjectType)) || 921(typeof(System.Windows.Media.Visual).IsAssignableFrom(serializedObjectType)) ) 970(typeof(System.Windows.Documents.DocumentPaginator).IsAssignableFrom(serializedObjectType)) || 971(typeof(System.Windows.Media.Visual).IsAssignableFrom(serializedObjectType)) )
Serialization\Manager\ReachSerializationUtils.cs (4)
304(typeof(System.Windows.Documents.DocumentPaginator).IsAssignableFrom(_serializedObject.GetType()) 337else if(typeof(System.Windows.Media.Visual).IsAssignableFrom(_serializedObject.GetType())) 356(typeof(System.Windows.Documents.DocumentPaginator).IsAssignableFrom(_serializedObject.GetType()) 366else if(typeof(System.Windows.Media.Visual).IsAssignableFrom(_serializedObject.GetType()))
Serialization\Manager\XpsOMSerializationManager.cs (18)
143if (typeof(System.Windows.Documents.FixedDocument).IsAssignableFrom(objectType)) 147else if (typeof(System.Windows.Documents.PageContentCollection).IsAssignableFrom(objectType)) 151else if (typeof(System.Windows.Documents.PageContent).IsAssignableFrom(objectType)) 155else if (typeof(System.Windows.Controls.UIElementCollection).IsAssignableFrom(objectType)) 159else if (typeof(System.Windows.Documents.FixedPage).IsAssignableFrom(objectType)) 163else if (typeof(System.Windows.Documents.FixedDocumentSequence).IsAssignableFrom(objectType)) 167else if (typeof(System.Windows.Documents.DocumentReferenceCollection).IsAssignableFrom(objectType)) 171else if (typeof(System.Windows.Documents.DocumentReference).IsAssignableFrom(objectType)) 175else if (typeof(System.Windows.Documents.DocumentPaginator).IsAssignableFrom(objectType)) 179else if (typeof(System.Windows.Documents.DocumentPage).IsAssignableFrom(objectType)) 183else if (typeof(System.Windows.Media.Visual).IsAssignableFrom(objectType)) 187else if (typeof(System.Printing.PrintTicket).IsAssignableFrom(objectType)) 209if (typeof(BitmapSource).IsAssignableFrom(serializedObject.GetType())) 213else if (typeof(GlyphRun).IsAssignableFrom(serializedObject.GetType())) 217else if (typeof(Color).IsAssignableFrom(serializedObject.GetType())) 241if (typeof(BitmapSource).IsAssignableFrom(serializedObjectType)) 245else if (typeof(GlyphRun).IsAssignableFrom(serializedObjectType)) 249else if (typeof(Color).IsAssignableFrom(serializedObjectType))
Serialization\Manager\XpsOMSerializationManagerAsync.cs (14)
125else if (typeof(System.Windows.Xps.Serialization.ReachSerializerContext).IsAssignableFrom(objectOnStack.GetType())) 222else if (typeof(System.Windows.Xps.Serialization.ReachSerializerContext).IsAssignableFrom(objectOnStack.GetType())) 302if (typeof(System.Windows.Documents.FixedDocument).IsAssignableFrom(objectType)) 306else if (typeof(System.Windows.Documents.PageContentCollection).IsAssignableFrom(objectType)) 310else if (typeof(System.Windows.Documents.PageContent).IsAssignableFrom(objectType)) 314else if (typeof(System.Windows.Controls.UIElementCollection).IsAssignableFrom(objectType)) 318else if (typeof(System.Windows.Documents.FixedPage).IsAssignableFrom(objectType)) 322else if (typeof(System.Windows.Documents.FixedDocumentSequence).IsAssignableFrom(objectType)) 326else if (typeof(System.Windows.Documents.DocumentReferenceCollection).IsAssignableFrom(objectType)) 330else if (typeof(System.Windows.Documents.DocumentReference).IsAssignableFrom(objectType)) 334else if (typeof(System.Windows.Documents.DocumentPaginator).IsAssignableFrom(objectType)) 338else if (typeof(System.Windows.Documents.DocumentPage).IsAssignableFrom(objectType)) 342else if (typeof(System.Windows.Media.Visual).IsAssignableFrom(objectType)) 346else if (typeof(System.Printing.PrintTicket).IsAssignableFrom(objectType))
Serialization\Manager\XpsSerializationManager.cs (21)
299if (typeof(System.Windows.Documents.FixedDocument).IsAssignableFrom(objectType)) 303else if (typeof(System.Windows.Documents.PageContentCollection).IsAssignableFrom(objectType)) 307else if(typeof(System.Windows.Documents.PageContent).IsAssignableFrom(objectType)) 311else if(typeof(System.Windows.Controls.UIElementCollection).IsAssignableFrom(objectType)) 315else if(typeof(System.Windows.Documents.FixedPage).IsAssignableFrom(objectType)) 319else if (typeof(System.Windows.Documents.FixedDocumentSequence).IsAssignableFrom(objectType)) 323else if (typeof(System.Windows.Documents.DocumentReferenceCollection).IsAssignableFrom(objectType)) 327else if (typeof(System.Windows.Documents.DocumentReference).IsAssignableFrom(objectType)) 331else if (typeof(System.Windows.Documents.DocumentPaginator).IsAssignableFrom(objectType)) 335else if (typeof(System.Windows.Documents.DocumentPage).IsAssignableFrom(objectType)) 339else if (typeof(System.Windows.Media.Visual).IsAssignableFrom(objectType)) 343else if (typeof(System.Printing.PrintTicket).IsAssignableFrom(objectType)) 364if (typeof(BitmapSource).IsAssignableFrom(serializedObject.GetType())) 368else if (typeof(GlyphRun).IsAssignableFrom(serializedObject.GetType())) 372else if (typeof(Color).IsAssignableFrom(serializedObject.GetType())) 396if (typeof(BitmapSource).IsAssignableFrom(serializedObjectType)) 400else if (typeof(GlyphRun).IsAssignableFrom(serializedObjectType)) 404else if (typeof(Color).IsAssignableFrom(serializedObjectType)) 1055if((typeof(System.Windows.Media.Visual).IsAssignableFrom(serializedObjectType)) && 1066(typeof(System.Windows.Media.Visual).IsAssignableFrom(serializedObjectType)) || 1067(typeof(System.Windows.Documents.DocumentPaginator).IsAssignableFrom(serializedObjectType)) )
Serialization\Manager\XpsSerializationManagerAsync.cs (14)
142else if(typeof(System.Windows.Xps.Serialization.ReachSerializerContext).IsAssignableFrom(objectOnStack.GetType())) 250else if(typeof(System.Windows.Xps.Serialization.ReachSerializerContext).IsAssignableFrom(objectOnStack.GetType())) 375if (typeof(System.Windows.Documents.FixedDocument).IsAssignableFrom(objectType)) 379else if (typeof(System.Windows.Documents.PageContentCollection).IsAssignableFrom(objectType)) 383else if(typeof(System.Windows.Documents.PageContent).IsAssignableFrom(objectType)) 387else if(typeof(System.Windows.Controls.UIElementCollection).IsAssignableFrom(objectType)) 391else if(typeof(System.Windows.Documents.FixedPage).IsAssignableFrom(objectType)) 395else if (typeof(System.Windows.Documents.FixedDocumentSequence).IsAssignableFrom(objectType)) 399else if (typeof(System.Windows.Documents.DocumentReferenceCollection).IsAssignableFrom(objectType)) 403else if (typeof(System.Windows.Documents.DocumentReference).IsAssignableFrom(objectType)) 407else if (typeof(System.Windows.Documents.DocumentPaginator).IsAssignableFrom(objectType)) 411else if (typeof(System.Windows.Documents.DocumentPage).IsAssignableFrom(objectType)) 415else if (typeof(System.Windows.Media.Visual).IsAssignableFrom(objectType)) 419else if (typeof(System.Printing.PrintTicket).IsAssignableFrom(objectType))
Serialization\VisualTreeFlattener.cs (2)
239if (typeof(Color).IsAssignableFrom(objType)) 243else if (typeof(BitmapSource).IsAssignableFrom(objType))
Roslyn.VisualStudio.DiagnosticsWindow (1)
Panels\TelemetryPanel.xaml.cs (1)
132return codeActionType.IsAssignableFrom(type);
Sandbox (5)
artifacts\obj\Sandbox\Release\net10.0\GreetGrpc.cs (1)
37public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
artifacts\obj\Sandbox\Release\net10.0\TranscodingGrpc.cs (4)
37public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); 339public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); 427public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); 515public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
Stress.TelemetryService (3)
artifacts\obj\Stress.TelemetryService\Debug\net8.0\opentelemetry\proto\collector\logs\v1\LogsServiceGrpc.cs (1)
53public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
artifacts\obj\Stress.TelemetryService\Debug\net8.0\opentelemetry\proto\collector\metrics\v1\MetricsServiceGrpc.cs (1)
53public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
artifacts\obj\Stress.TelemetryService\Debug\net8.0\opentelemetry\proto\collector\trace\v1\TraceServiceGrpc.cs (1)
53public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
System.ComponentModel.Annotations (2)
System\ComponentModel\DataAnnotations\CustomValidationAttribute.cs (1)
252if (!typeof(ValidationResult).IsAssignableFrom(methodInfo.ReturnType))
System\ComponentModel\DataAnnotations\RangeAttribute.cs (1)
221if (!comparableType.IsAssignableFrom(type))
System.ComponentModel.Composition (12)
Microsoft\Internal\Collections\CollectionServices.CollectionOfObject.cs (1)
27if (typeof(IList).IsAssignableFrom(collectionObject.GetType()))
Microsoft\Internal\Collections\CollectionServices.cs (1)
36if (type.UnderlyingSystemType == StringType || !IEnumerableType.IsAssignableFrom(type))
Microsoft\Internal\ContractServices.cs (1)
25if (typeof(Delegate).IsAssignableFrom(contractType))
Microsoft\Internal\GenerationServices.cs (2)
102else if (GenerationServices.s_typeType.IsAssignableFrom(valueType)) 106else if (GenerationServices.s_iEnumerableType.IsAssignableFrom(valueType))
System\ComponentModel\Composition\AttributedModel\AttributedPartCreationInfo.cs (1)
77return typeof(IDisposable).IsAssignableFrom(GetPartType());
System\ComponentModel\Composition\ExportServices.cs (1)
33return metadataViewType.IsAssignableFrom(DefaultMetadataViewType);
System\ComponentModel\Composition\Hosting\CompositionServices.cs (1)
641if (typeof(Type).IsAssignableFrom(type))
System\ComponentModel\Composition\MetadataViewProvider.cs (2)
22if (metadataViewType.IsAssignableFrom(typeof(IDictionary<string, object?>))) 57if (!metadataViewType.IsAssignableFrom(proxyType))
System\ComponentModel\Composition\ReflectionModel\GenericServices.cs (1)
152if ((constraintType != null) && !constraintType.IsAssignableFrom(type))
System\ComponentModel\Composition\ReflectionModel\ImportType.cs (1)
115return baseType.IsAssignableFrom(type);
System.ComponentModel.Composition.Registration (3)
System\ComponentModel\Composition\Registration\ImportBuilder.cs (1)
76bool asMany = (!_asManySpecified) ? type != s_stringType && typeof(IEnumerable).IsAssignableFrom(type) : _asMany;
System\ComponentModel\Composition\Registration\RegistrationBuilder.cs (2)
35var partBuilder = new PartBuilder<T>((t) => typeof(T) != t && typeof(T).IsAssignableFrom(t)); 45var partBuilder = new PartBuilder((t) => type != t && type.IsAssignableFrom(t));
System.ComponentModel.TypeConverter (19)
System\ComponentModel\BindingList.cs (1)
63if (typeof(INotifyPropertyChanged).IsAssignableFrom(typeof(T)))
System\ComponentModel\PropertyDescriptor.cs (2)
81if (converterType != null && typeof(TypeConverter).IsAssignableFrom(converterType)) 124if (converterType != null && typeof(TypeConverter).IsAssignableFrom(converterType))
System\ComponentModel\ReflectEventDescriptor.cs (5)
85if (type == null || !(typeof(Delegate)).IsAssignableFrom(type)) 99Debug.Assert(eventInfo.ReflectedType!.IsAssignableFrom(componentClass), "eventInfo.ReflectedType is used below, but only componentClass is annotated with DynamicallyAccessedMembers. Ensure ReflectedType is in componentClass's hierarchy."); 150public override bool IsMulticast => (typeof(MulticastDelegate)).IsAssignableFrom(EventType); 263Debug.Assert(currentReflectType.IsAssignableFrom(_componentClass), "currentReflectType must be in _componentClass's hierarchy"); 384Debug.Assert(currentReflectType.IsAssignableFrom(_componentClass), "currentReflectType must be in _componentClass's hierarchy");
System\ComponentModel\ReflectPropertyDescriptor.cs (1)
271if (typeof(INotifyPropertyChanged).IsAssignableFrom(ComponentType))
System\ComponentModel\ReflectTypeDescriptionProvider.cs (3)
618if (receiverType.IsAssignableFrom(componentType)) 1487if (keyType != null && keyType.IsInterface && keyType.IsAssignableFrom(callingType)) 1578else if (typeof(ICollection).IsAssignableFrom(callingType))
System\ComponentModel\ReflectTypeDescriptionProvider.ReflectedTypeData.cs (4)
200if (converterType != null && typeof(TypeConverter).IsAssignableFrom(converterType)) 220if (converterType != null && typeof(TypeConverter).IsAssignableFrom(converterType)) 331if (editorType != null && editorBaseType.IsAssignableFrom(editorType)) 357if (editorType != null && editorBaseType.IsAssignableFrom(editorType))
System\ComponentModel\TypeDescriptor.cs (3)
375if (providerType != null && typeof(TypeDescriptionProvider).IsAssignableFrom(providerType)) 2334if (nodeType != null && type.IsAssignableFrom(nodeType) || nodeType == typeof(object)) 2418if (nodeType != null && type.IsAssignableFrom(nodeType) || nodeType == typeof(object))
System.Configuration.ConfigurationManager (23)
System\Configuration\ConfigurationElement.cs (9)
132if (typeof(ConfigurationElementCollection).IsAssignableFrom(prop.Type)) 735if (typeof(ConfigurationElement).IsAssignableFrom(type)) 775if ((result != null) && typeof(ConfigurationElement).IsAssignableFrom(result.Type)) 786Debug.Assert(typeof(ConfigurationElement).IsAssignableFrom(type)); 1228if (typeof(ConfigurationElement).IsAssignableFrom(validProp.Type)) 1239if (!typeof(ConfigurationElement).IsAssignableFrom(validProp.Type)) 1321typeof(ConfigurationElement).IsAssignableFrom(propToLock.Type)) || 1325!typeof(ConfigurationElement).IsAssignableFrom(propToLock.Type)) 1642if ((propToLock != null) && typeof(ConfigurationElement).IsAssignableFrom(propToLock.Type))
System\Configuration\ConfigurationLockCollection.cs (2)
172if (!typeof(ConfigurationElement).IsAssignableFrom(propToLock?.Type)) 178if (typeof(ConfigurationElement).IsAssignableFrom(propToLock?.Type))
System\Configuration\ConfigurationProperty.cs (3)
124if (typeof(ConfigurationElementCollection).IsAssignableFrom(propertyType)) 176_isConfigurationElementType = typeof(ConfigurationElement).IsAssignableFrom(Type); 225if (typeof(ConfigurationSection).IsAssignableFrom(type))
System\Configuration\ConfigurationValidatorAttribute.cs (1)
19if (!typeof(ConfigurationValidatorBase).IsAssignableFrom(validator))
System\Configuration\MgmtConfigurationRecord.cs (1)
131if (!typeof(ConfigurationSection).IsAssignableFrom(type))
System\Configuration\ProtectedConfigurationSection.cs (1)
80if (!typeof(ProtectedConfigurationProvider).IsAssignableFrom(t))
System\Configuration\RuntimeConfigurationRecord.cs (1)
99if (typeof(ConfigurationSection).IsAssignableFrom(type))
System\Configuration\SettingsPropertyValue.cs (2)
118if (value != null && !Property.PropertyType.IsAssignableFrom(value.GetType())) // is it the correct type 149if (value != null && !Property.PropertyType.IsAssignableFrom(value.GetType())) // is it the correct type
System\Configuration\SubclassTypeValidator.cs (1)
31if (!_base.IsAssignableFrom((Type)value))
System\Configuration\TypeUtil.cs (1)
158if (baseType.IsAssignableFrom(type))
System\Diagnostics\TraceUtils.cs (1)
45if (!baseType.IsAssignableFrom(objectType))
System.Data.Common (30)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
251!s_securityType.IsAssignableFrom(type));
System\Data\Common\DataStorage.cs (9)
300if (typeof(INullable).IsAssignableFrom(dataType)) 505Debug.Assert(nullable == typeof(INullable).IsAssignableFrom(dataType), "INullable"); 506Debug.Assert(changeTracking == typeof(System.ComponentModel.IChangeTracking).IsAssignableFrom(dataType), "IChangeTracking"); 507Debug.Assert(revertibleChangeTracking == typeof(System.ComponentModel.IRevertibleChangeTracking).IsAssignableFrom(dataType), "IRevertibleChangeTracking"); 508Debug.Assert(xmlSerializable == typeof(IXmlSerializable).IsAssignableFrom(dataType), "IXmlSerializable"); 516typeof(INullable).IsAssignableFrom(dataType), 517typeof(System.ComponentModel.IChangeTracking).IsAssignableFrom(dataType), 518typeof(System.ComponentModel.IRevertibleChangeTracking).IsAssignableFrom(dataType), 519typeof(IXmlSerializable).IsAssignableFrom(dataType));
System\Data\Common\ObjectStorage.cs (4)
31: base(column, type, null, DBNull.Value, typeof(ICloneable).IsAssignableFrom(type), GetStorageType(type)) 33_implementsIXmlSerializable = typeof(IXmlSerializable).IsAssignableFrom(type); 564if (typeof(IDynamicMetaObjectProvider).IsAssignableFrom(type) && 565!typeof(IXmlSerializable).IsAssignableFrom(type))
System\Data\Common\SqlUDTStorage.cs (3)
31: base(column, type, nullValue, nullValue, typeof(ICloneable).IsAssignableFrom(type), GetStorageType(type)) 33_implementsIXmlSerializable = typeof(IXmlSerializable).IsAssignableFrom(type); 34_implementsIComparable = typeof(IComparable).IsAssignableFrom(type);
System\Data\DataColumnPropertyDescriptor.cs (1)
22if (typeof(IList).IsAssignableFrom(PropertyType))
System\Data\DataSetUtil.cs (1)
96!typeof(System.Security.SecurityException).IsAssignableFrom(e.GetType()));
System\Data\EnumerableRowCollection.cs (1)
147if ((null == _table) || !typeof(DataRow).IsAssignableFrom(typeof(TRow)))
System\Data\EnumerableRowCollectionExtensions.cs (2)
159typeof(TResult).IsAssignableFrom(source.ElementType) && typeof(DataRow).IsAssignableFrom(typeof(TResult)),
System\Data\ProviderBase\SchemaMapping.cs (6)
596if (typeof(IDataReader).IsAssignableFrom(fieldType)) 605else if (typeof(System.Data.SqlTypes.SqlXml).IsAssignableFrom(fieldType)) 613else if (typeof(System.Xml.XmlReader).IsAssignableFrom(fieldType)) 821if (typeof(IDataReader).IsAssignableFrom(fieldType)) 830else if (typeof(System.Data.SqlTypes.SqlXml).IsAssignableFrom(fieldType)) 838else if (typeof(System.Xml.XmlReader).IsAssignableFrom(fieldType))
System\Data\xmlsaver.cs (2)
2583if (!col.IsCustomType || !DataColumn.IsValueCustomTypeInstance(columnValue) || (typeof(IXmlSerializable).IsAssignableFrom(columnValue.GetType()))) 3017if (!col.IsCustomType || !DataColumn.IsValueCustomTypeInstance(value) || (typeof(IXmlSerializable).IsAssignableFrom(value.GetType())))
System.Data.Odbc (1)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
251!s_securityType.IsAssignableFrom(type));
System.Linq.Expressions (28)
System\Dynamic\Utils\TypeUtils.cs (7)
335if (nnSourceType.IsAssignableFrom(nnDestType)) 341if (nnDestType.IsAssignableFrom(nnSourceType)) 384if (source.IsAssignableFrom(dest) || dest.IsAssignableFrom(source)) 857destination.IsAssignableFrom(source); 924return !dest.IsValueType && !src.IsValueType && dest.IsAssignableFrom(src); 969Debug.Assert(typeof(Delegate).IsAssignableFrom(delegateType));
System\Linq\Expressions\BinaryExpression.cs (2)
1393Debug.Assert(typeof(System.MulticastDelegate).IsAssignableFrom(delegateType) && delegateType != typeof(System.MulticastDelegate)); 1549Debug.Assert(typeof(System.MulticastDelegate).IsAssignableFrom(delegateType) && delegateType != typeof(System.MulticastDelegate));
System\Linq\Expressions\Common\ConstantCheck.cs (1)
80if (nnTestType.IsAssignableFrom(nnOperandType))
System\Linq\Expressions\Compiler\ILGen.cs (2)
583(nnExprType.IsAssignableFrom(nnType) || // down cast 584nnType.IsAssignableFrom(nnExprType))) // up cast
System\Linq\Expressions\Compiler\LambdaCompiler.Expressions.cs (1)
186if (typeof(LambdaExpression).IsAssignableFrom(expr.Type))
System\Linq\Expressions\Compiler\LambdaCompiler.Logical.cs (3)
128Debug.Assert(p.Type.IsAssignableFrom(b.Left.Type) || 129p.Type.IsAssignableFrom(nnLeftType)); 135if (!p.Type.IsAssignableFrom(b.Left.Type))
System\Linq\Expressions\Compiler\LambdaCompiler.Unary.cs (1)
34Debug.Assert(typeof(LambdaExpression).IsAssignableFrom(quote.Type));
System\Linq\Expressions\ConstantExpression.cs (1)
119if (type.IsAssignableFrom(valueType))
System\Linq\Expressions\Interpreter\LightCompiler.cs (3)
51public bool Matches(Type exceptionType) => _exceptionType.IsAssignableFrom(exceptionType); 1209if (typeTo == typeof(object) || typeTo.IsAssignableFrom(typeFrom)) 2668if (typeof(LambdaExpression).IsAssignableFrom(node.Expression.Type))
System\Linq\Expressions\Interpreter\TypeOperations.cs (1)
311if (!_t.IsAssignableFrom(valueType))
System\Linq\Expressions\LambdaExpression.cs (1)
919if (!typeof(MulticastDelegate).IsAssignableFrom(delegateType) || delegateType == typeof(MulticastDelegate))
System\Linq\Expressions\MemberAssignment.cs (1)
65if (!memberType.IsAssignableFrom(expression.Type))
System\Linq\Expressions\MemberListBinding.cs (1)
123if (!typeof(IEnumerable).IsAssignableFrom(listType))
System\Linq\Expressions\MemberMemberBinding.cs (1)
160if (!b.Member.DeclaringType!.IsAssignableFrom(type))
System\Linq\Expressions\MethodCallExpression.cs (1)
1363!(TypeUtils.IsSameOrSubclass(typeof(LambdaExpression), pType) && pType.IsAssignableFrom(arg.GetType())))
System\Linq\Expressions\UnaryExpression.cs (1)
817if (!array.Type.IsArray || !typeof(Array).IsAssignableFrom(array.Type))
System.Linq.Queryable (18)
System\Linq\EnumerableQuery.cs (2)
77if (!typeof(IQueryable<TElement>).IsAssignableFrom(expression.Type)) 95if (!typeof(TElement).IsAssignableFrom(expression.Type))
System\Linq\EnumerableRewriter.cs (16)
39if ((mInfo.IsStatic || mInfo.DeclaringType!.IsAssignableFrom(obj!.Type)) 96if (type.IsAssignableFrom(expr.Type)) 102if (!type.IsAssignableFrom(expr.Type) && type.IsArray && expr.NodeType == ExpressionType.NewArrayInit) 105if (type.IsAssignableFrom(strippedType)) 138if (typeof(IEnumerable).IsAssignableFrom(t)) 287areAssignableFrom = areAssignableFrom && leftParam.IsAssignableFrom(rightParam); 346if (!parameterType.IsAssignableFrom(arg.Type)) 352if (!parameterType.IsAssignableFrom(arg.Type) && 353!parameterType.IsAssignableFrom(StripExpression(arg.Type))) 381if (!typeof(IQueryable).IsAssignableFrom(type)) 388if (trueType.IsAssignableFrom(falseType)) 390if (falseType.IsAssignableFrom(trueType)) 398if (!typeof(IQueryable).IsAssignableFrom(type)) 410if (!typeof(IQueryable).IsAssignableFrom(type)) 414return Expression.MakeGoto(node.Kind, target, value, GetEquivalentType(typeof(EnumerableQuery).IsAssignableFrom(type) ? value.Type : type)); 430if (!typeof(IQueryable).IsAssignableFrom(type))
System.Net.Http.Json (2)
System\Net\Http\Json\JsonContent.cs (2)
28Debug.Assert(inputValue is null || jsonTypeInfo.Type.IsAssignableFrom(inputValue.GetType())); 167if (inputValue is not null && !inputType.IsAssignableFrom(inputValue.GetType()))
System.Private.CoreLib (32)
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\Collection.cs (2)
211if (!(targetType.IsAssignableFrom(sourceType) || sourceType.IsAssignableFrom(targetType)))
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyCollection.cs (2)
142if (!(targetType.IsAssignableFrom(sourceType) || sourceType.IsAssignableFrom(targetType)))
src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (8)
231if (!pCls.IsAssignableFrom(argTypes[index])) 267if (!paramArrayType.IsAssignableFrom(argTypes[j])) 501if (pCls.IsAssignableFrom(valueType)) 594if (!pCls.IsAssignableFrom(type)) 681if (!pCls.IsAssignableFrom(indexes[j])) 699if (!candidates[i].PropertyType.IsAssignableFrom(returnType)) 997c1FromC2 = c1.IsAssignableFrom(c2); 998c2FromC1 = c2.IsAssignableFrom(c1);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (1)
2123if ((arg != null && !pType.IsAssignableFrom(arg.GetType()))
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\DynamicMethod.cs (2)
353bool includeMethodImplAttribute = attributeType.IsAssignableFrom(typeof(MethodImplAttribute)); 372return attributeType.IsAssignableFrom(typeof(MethodImplAttribute));
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (1)
39return IsAssignableFrom(typeInfo.AsType());
src\libraries\System.Private.CoreLib\src\System\Reflection\EventInfo.cs (1)
39return mc.IsAssignableFrom(cl);
src\libraries\System.Private.CoreLib\src\System\Reflection\RuntimeConstructorInfo.cs (1)
42if (typeof(Delegate).IsAssignableFrom(DeclaringType))
src\libraries\System.Private.CoreLib\src\System\Reflection\TypeDelegator.cs (1)
23return IsAssignableFrom(typeInfo.AsType());
src\libraries\System.Private.CoreLib\src\System\Reflection\TypeInfo.cs (1)
128if (!constraints[i].IsAssignableFrom(typeInfo))
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.cs (2)
344if (ReferenceEquals(foundType, type) || type.IsAssignableFrom(foundType) || value == null) 362if (ReferenceEquals(foundType, type) || type.IsAssignableFrom(foundType))
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (1)
289if (!constraints[i].IsAssignableFrom(c))
src\libraries\System.Private.CoreLib\src\System\Type.cs (2)
143public bool IsAssignableTo([NotNullWhen(true)] Type? targetType) => targetType?.IsAssignableFrom(this) ?? false; 602public virtual bool IsInstanceOfType([NotNullWhen(true)] object? o) => o != null && IsAssignableFrom(o.GetType());
src\libraries\System.Private.CoreLib\src\System\Type.Helpers.cs (2)
349return toType.IsAssignableFrom(c); 363if (!constraints[i].IsAssignableFrom(c))
src\System\Collections\Generic\ArraySortHelper.CoreCLR.cs (2)
26if (typeof(IComparable<T>).IsAssignableFrom(typeof(T))) 59if (typeof(IComparable<TKey>).IsAssignableFrom(typeof(TKey)))
src\System\Collections\Generic\ComparerHelpers.cs (1)
36if (typeof(IComparable<>).MakeGenericType(type).IsAssignableFrom(type))
src\System\Reflection\Emit\RuntimeEnumBuilder.cs (1)
25return IsAssignableFrom(typeInfo.AsType());
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (1)
248if (!destType.IsAssignableFrom(type))
System.Private.DataContractSerialization (30)
System\Runtime\Serialization\ClassDataContract.cs (6)
278if (!childType.IsEnum && !Globals.TypeOfIXmlSerializable.IsAssignableFrom(childType) 313if (Globals.TypeOfIXmlSerializable.IsAssignableFrom(type)) 336if (Globals.TypeOfISerializable.IsAssignableFrom(type)) 634IsISerializable = (Globals.TypeOfISerializable.IsAssignableFrom(type)); 641if (baseType != null && !(baseType.IsSerializable && Globals.TypeOfISerializable.IsAssignableFrom(baseType))) 669_hasExtensionData = (Globals.TypeOfIExtensibleDataObject.IsAssignableFrom(type));
System\Runtime\Serialization\CodeGenerator.cs (4)
91Debug.Assert(typeof(Delegate).IsAssignableFrom(delegateType)); 1166else if (source.IsAssignableFrom(target)) 1175else if (target.IsAssignableFrom(source)) 1184else if (source.IsAssignableFrom(target))
System\Runtime\Serialization\CollectionDataContract.cs (3)
1040if (Globals.TypeOfIXmlSerializable.IsAssignableFrom(type) || IsArraySegment(type)) 1045if (!Globals.TypeOfIEnumerable.IsAssignableFrom(type)) 1350if (getEnumeratorMethod == null || !Globals.TypeOfIEnumerator.IsAssignableFrom(getEnumeratorMethod.ReturnType))
System\Runtime\Serialization\DataContract.cs (4)
465else if (Globals.TypeOfIXmlSerializable.IsAssignableFrom(type)) 1106Globals.TypeOfIXmlSerializable.IsAssignableFrom(type)) 1324else if (Globals.TypeOfIXmlSerializable.IsAssignableFrom(type)) 1988if (!Globals.TypeOfTypeEnumerable.IsAssignableFrom(method.ReturnType))
System\Runtime\Serialization\DataContractSet.cs (1)
417(Globals.TypeOfIXmlSerializable.IsAssignableFrom(type) && !type.IsGenericTypeDefinition) ||
System\Runtime\Serialization\Json\JsonFormatReaderGenerator.cs (2)
92if (Globals.TypeOfIDeserializationCallback.IsAssignableFrom(classContract.UnderlyingType)) 262return Globals.TypeOfIObjectReference.IsAssignableFrom(classContract.UnderlyingType);
System\Runtime\Serialization\Json\XmlObjectSerializerWriteContextComplexJson.cs (1)
323if ((contractType == typeof(XmlDataContract)) && !Globals.TypeOfIXmlSerializable.IsAssignableFrom(declaredType))
System\Runtime\Serialization\ReflectionReader.cs (2)
587if (genericCollectionType.IsAssignableFrom(collectionType)) 595else if (typeIList.IsAssignableFrom(collectionType))
System\Runtime\Serialization\SchemaExporter.cs (2)
636if (!(Globals.TypeOfXmlQualifiedName.IsAssignableFrom(getMethod.ReturnType)) && !(Globals.TypeOfXmlSchemaType.IsAssignableFrom(getMethod.ReturnType)))
System\Runtime\Serialization\SchemaImporter.cs (2)
506if (Globals.TypeOfIXmlSerializable.IsAssignableFrom(referencedType)) 741&& Globals.TypeOfIXmlSerializable.IsAssignableFrom(referencedType))
System\Runtime\Serialization\XmlFormatReaderGenerator.cs (2)
128if (Globals.TypeOfIDeserializationCallback.IsAssignableFrom(classContract.UnderlyingType)) 326return Globals.TypeOfIObjectReference.IsAssignableFrom(classContract.UnderlyingType);
System\Runtime\Serialization\XPathQueryGenerator.cs (1)
77if (member.MemberInfo.Name == memberNode.Name && member.MemberInfo.DeclaringType!.IsAssignableFrom(memberNode.DeclaringType))
System.Private.Windows.Core (1)
System\Private\Windows\BinaryFormat\Deserializer\ClassRecordDeserializer.cs (1)
55if (surrogate is not null || typeof(ISerializable).IsAssignableFrom(type))
System.Private.Windows.Core.TestUtilities (1)
ReflectionHelper.cs (1)
48return !type.IsAbstract && type.IsPublic && typeof(T).IsAssignableFrom(type);
System.Private.Xml (82)
System\Xml\Schema\Preprocessor.cs (1)
351if (typeof(XmlSchema).IsAssignableFrom(returnType))
System\Xml\Serialization\CodeGenerator.cs (3)
1208else if (source.IsAssignableFrom(target)) 1219else if (target.IsAssignableFrom(source)) 1228else if (source.IsAssignableFrom(target))
System\Xml\Serialization\ImportContext.cs (3)
262if (typeof(XmlSchemaType).IsAssignableFrom(t)) 398else if (typeof(XmlSchemaGroupBase).IsAssignableFrom(t)) 435if (typeof(XmlSchemaAnnotated).IsAssignableFrom(t))
System\Xml\Serialization\Mappings.cs (5)
1007return baseDeclaringType != null && derivedDeclaringType != null && baseDeclaringType.IsAssignableFrom(derivedDeclaringType); 1121if (_needSchema && typeof(XmlSchemaType).IsAssignableFrom(_getSchemaMethod.ReturnType)) 1213if (typeof(XmlSchemaType).IsAssignableFrom(_getSchemaMethod.ReturnType)) 1308if (typeof(XmlSchemaType).IsAssignableFrom(_getSchemaMethod.ReturnType)) 1314else if (typeof(XmlQualifiedName).IsAssignableFrom(_getSchemaMethod.ReturnType))
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (2)
777if (elementType.IsAssignableFrom(checkTypeSource!.Type)) 1567if (structMapping.TypeDesc.Type != null && typeof(XmlSchemaObject).IsAssignableFrom(structMapping.TypeDesc.Type))
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (3)
238if (o != null && !td.Type!.IsAssignableFrom(o!.GetType())) 251if (td.Type!.IsAssignableFrom(o!.GetType())) 619if (mapping.TypeDesc.Type != null && typeof(XmlSchemaObject).IsAssignableFrom(mapping.TypeDesc.Type))
System\Xml\Serialization\SourceInfo.cs (4)
112if (get_Item == null && typeof(IList).IsAssignableFrom(varType)) 127else if ((elementType != null) && !(eType.IsAssignableFrom(elementType) || elementType.IsAssignableFrom(eType))) 222System.Diagnostics.Debug.Assert(targetType == nullableType || targetType.IsAssignableFrom(nullableType.GetGenericArguments()[0]));
System\Xml\Serialization\TypeExtensions.cs (3)
31targetType.IsAssignableFrom(sourceType)) 43targetType.IsAssignableFrom(method.ReturnType)) 49parameters[0].ParameterType.IsAssignableFrom(sourceType))
System\Xml\Serialization\Types.cs (15)
795else if (typeof(IXmlSerializable).IsAssignableFrom(type)) 812else if (typeof(ICollection).IsAssignableFrom(type) && !IsArraySegment(type)) 853else if (typeof(XmlNode).IsAssignableFrom(type)) 858if (typeof(XmlText).IsAssignableFrom(type)) 860else if (typeof(XmlElement).IsAssignableFrom(type)) 862else if (type.IsAssignableFrom(typeof(XmlAttribute))) 904if (typeof(IEnumerable).IsAssignableFrom(type) && !IsArraySegment(type)) 1014else if (typeof(ICollection).IsAssignableFrom(type)) 1016else if (typeof(IEnumerable).IsAssignableFrom(type)) 1191if (typeToBeReplaced.IsAssignableFrom(currentType)) 1272if (typeof(IEnumerable).IsAssignableFrom(type)) 1276if (enumerator == null || !typeof(IEnumerator).IsAssignableFrom(enumerator.ReturnType)) 1283if (enumerator != null && typeof(IEnumerator).IsAssignableFrom(enumerator.ReturnType)) 1301if (enumerator == null || !typeof(IEnumerator).IsAssignableFrom(enumerator.ReturnType)) 1333if (typeof(IDictionary).IsAssignableFrom(type))
System\Xml\Serialization\XmlReflectionImporter.cs (8)
502if (!(typeof(XmlQualifiedName).IsAssignableFrom(getMethod.ReturnType)) && !(typeof(XmlSchemaType).IsAssignableFrom(getMethod.ReturnType))) 1688Type targetType = typeof(IXmlSerializable).IsAssignableFrom(arrayElementType) ? arrayElementType : typeof(XmlNode).IsAssignableFrom(arrayElementType) ? arrayElementType : typeof(XmlElement); 1689if (!arrayElementType.IsAssignableFrom(targetType)) 1929Type targetType = typeof(IXmlSerializable).IsAssignableFrom(accessorType) ? accessorType : typeof(XmlNode).IsAssignableFrom(accessorType) ? accessorType : typeof(XmlElement); 1930if (!accessorType.IsAssignableFrom(targetType))
System\Xml\Serialization\XmlSchemaImporter.cs (2)
364if (!(desiredMappingType.IsAssignableFrom(mapping.GetType()))) 422if (mapping != null && desiredMappingType.IsAssignableFrom(mapping.GetType()))
System\Xml\Serialization\XmlSchemas.cs (2)
230if (typeof(XmlSchemaType).IsAssignableFrom(type)) 233if (ret == null || !type.IsAssignableFrom(ret.GetType()))
System\Xml\Serialization\XmlSerializationReader.cs (4)
1727if (itemType == null || currItemType.IsAssignableFrom(itemType)) 1731else if (!itemType.IsAssignableFrom(currItemType)) 3296if (structMapping.TypeDesc.Type != null && typeof(XmlSchemaObject).IsAssignableFrom(structMapping.TypeDesc.Type)) 4899if (head.Type!.IsAssignableFrom(derived.Type))
System\Xml\Serialization\XmlSerializationReaderILGen.cs (3)
1511if (structMapping.TypeDesc.Type != null && typeof(XmlSchemaObject).IsAssignableFrom(structMapping.TypeDesc.Type)) 2819Debug.Assert(!localA.LocalType.IsGenericType || (localA.LocalType.GetGenericArguments().Length == 1 && localA.LocalType.GetGenericArguments()[0].IsAssignableFrom(elementType))); 3291if (head.Type!.IsAssignableFrom(derived.Type))
System\Xml\Serialization\XmlSerializationWriter.cs (8)
371else if (typeof(XmlNode[]).IsAssignableFrom(t)) 782if (typeof(XmlAttribute).IsAssignableFrom(node.GetType())) 820if (typeof(IXmlSerializable).IsAssignableFrom(type)) return new InvalidOperationException(SR.Format(SR.XmlInvalidSerializable, type.FullName)); 1195while ((elementType.IsArray || typeof(IEnumerable).IsAssignableFrom(elementType)) && GetPrimitiveTypeName(elementType, false) == null) 1284if (!typeof(IEnumerable).IsAssignableFrom(type)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "not array like type " + type.FullName)); 1287int arrayLength = typeof(ICollection).IsAssignableFrom(type) ? ((ICollection)o).Count : -1; 1388if (t.IsArray || typeof(IEnumerable).IsAssignableFrom(t)) 3143if (mapping.TypeDesc.Type != null && typeof(XmlSchemaObject).IsAssignableFrom(mapping.TypeDesc.Type))
System\Xml\Serialization\XmlSerializationWriterILGen.cs (1)
1009if (mapping.TypeDesc.Type != null && typeof(XmlSchemaObject).IsAssignableFrom(mapping.TypeDesc.Type))
System\Xml\Xsl\IlGen\GenerateHelper.cs (2)
910Debug.Assert(clrTypeSrc.IsAssignableFrom(clrTypeDst) || clrTypeDst.IsAssignableFrom(clrTypeSrc),
System\Xml\Xsl\IlGen\IteratorDescriptor.cs (2)
101typeof(IList<>).MakeGenericType(itemStorageType).IsAssignableFrom(loc.LocalType), 134typeof(IList<>).MakeGenericType(itemStorageType).IsAssignableFrom(methGlobal.ReturnType),
System\Xml\Xsl\IlGen\XmlIlVisitor.cs (1)
3689if (xmlTypeFormalArg.TypeCode == XmlTypeCode.Item || !clrTypeFormalArg.IsAssignableFrom(clrTypeActualArg))
System\Xml\Xsl\QIL\QilTypeChecker.cs (2)
1003Check(clrTypeValue.IsAssignableFrom(clrType), node, $"Literal value must be of type {clrTypeValue.Name}"); 1009Check(clrTypeClass.IsAssignableFrom(node.GetType()), node, $"Node must be instance of {clrTypeClass.Name}");
System\Xml\Xsl\Runtime\XmlQueryContext.cs (1)
307if (xmlTypeFormalArg.TypeCode == XmlTypeCode.Item || !clrTypeFormalArg.IsAssignableFrom(objActualArgs[i].GetType()))
System\Xml\Xsl\Runtime\XmlQueryRuntime.cs (4)
480Debug.Assert(XmlILTypeHelper.GetStorageType(xmlType).IsAssignableFrom(value.GetType()), 483Debug.Assert(destinationType == typeof(object) || !destinationType.IsAssignableFrom(value.GetType()), 558Debug.Assert(destinationType.IsAssignableFrom(value.GetType()), $"ChangeType from type {value.GetType().Name} to type {destinationType.Name} failed"); 680Debug.Assert(XmlILTypeHelper.GetStorageType(xmlType).IsAssignableFrom(value.GetType()), $"Xml type {xmlType} is not represented in ILGen as {value.GetType().Name}");
System\Xml\Xsl\XsltOld\XsltCompileContext.cs (3)
553if (typeof(XPathNavigator).IsAssignableFrom(type) || typeof(IXPathNavigable).IsAssignableFrom(type)) 557if (typeof(XPathNodeIterator).IsAssignableFrom(type))
System.Private.Xml.Linq (1)
System\Xml\Linq\XHelper.cs (1)
15return o != null && type.IsAssignableFrom(o.GetType());
System.Reflection.Context (3)
System\Reflection\Context\Custom\AttributeUtils.cs (1)
162Debug.Assert(attributeFilterType.IsAssignableFrom(attributeType));
System\Reflection\Context\Delegation\DelegatingType.cs (1)
252return _typeInfo.IsAssignableFrom(c);
System\Reflection\Context\Projection\ProjectingType.cs (1)
144return UnderlyingType.IsAssignableFrom(otherType.UnderlyingType);
System.Reflection.DispatchProxy (3)
System\Reflection\DispatchProxyGenerator.cs (3)
640Debug.Assert(source.IsAssignableFrom(target)); 646else if (target.IsAssignableFrom(source)) 657Debug.Assert(source.IsAssignableFrom(target) || target.IsInterface || source.IsInterface);
System.Reflection.Emit (3)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (1)
39return IsAssignableFrom(typeInfo.AsType());
System\Reflection\Emit\TypeBuilderImpl.cs (2)
348if (interfaceType.IsAssignableFrom(iface)) 359if (interfaceType.IsAssignableFrom(@interface))
System.Reflection.MetadataLoadContext (5)
System\Reflection\DefaultBinder.cs (5)
101if (!pCls.IsAssignableFrom(type)) 196if (!pCls.IsAssignableFrom(indexes[j])) 214if (!candidates[i].PropertyType.IsAssignableFrom(returnType)) 481c1FromC2 = c1.IsAssignableFrom(c2); 482c2FromC1 = c2.IsAssignableFrom(c1);
System.Reflection.TypeExtensions (1)
System\Reflection\TypeExtensions.cs (1)
345return type.IsAssignableFrom(c);
System.Resources.Extensions (1)
System\Resources\Extensions\BinaryFormat\Deserializer\ClassRecordDeserializer.cs (1)
56if (surrogate is not null || typeof(ISerializable).IsAssignableFrom(type))
System.Runtime.Serialization.Schema (3)
System\Runtime\Serialization\Schema\CodeExporter.cs (3)
546if (typeof(IXmlSerializable).IsAssignableFrom(type)) 829if (!typeof(IExtensibleDataObject).IsAssignableFrom(actualType)) 831if (!typeof(INotifyPropertyChanged).IsAssignableFrom(actualType))
System.Security.Cryptography (6)
System\Security\Cryptography\CapiHelper.Unix.cs (5)
69if (typeof(SHA1).IsAssignableFrom(hashAlgType)) 71if (typeof(SHA256).IsAssignableFrom(hashAlgType)) 73if (typeof(SHA384).IsAssignableFrom(hashAlgType)) 75if (typeof(SHA512).IsAssignableFrom(hashAlgType)) 77if (typeof(MD5).IsAssignableFrom(hashAlgType))
System\Security\Cryptography\CryptoConfig.cs (1)
477if (rci == null || typeof(Delegate).IsAssignableFrom(rci.DeclaringType))
System.Security.Cryptography.Xml (1)
System\Security\Cryptography\Xml\CryptoHelpers.cs (1)
98Debug.Assert(!typeof(Transform).IsAssignableFrom(typeof(T)));
System.ServiceModel.Syndication (9)
System\ServiceModel\Syndication\Atom10FeedFormatter.cs (1)
42if (!typeof(SyndicationFeed).IsAssignableFrom(feedTypeToCreate))
System\ServiceModel\Syndication\Atom10ItemFormatter.cs (1)
26if (!typeof(SyndicationItem).IsAssignableFrom(itemTypeToCreate))
System\ServiceModel\Syndication\AtomPub10CategoriesDocumentFormatter.cs (2)
25if (!typeof(InlineCategoriesDocument).IsAssignableFrom(inlineDocumentType)) 30if (!typeof(ReferencedCategoriesDocument).IsAssignableFrom(referencedDocumentType))
System\ServiceModel\Syndication\AtomPub10ServiceDocumentFormatter.cs (1)
29if (!typeof(ServiceDocument).IsAssignableFrom(documentTypeToCreate))
System\ServiceModel\Syndication\Rss20FeedFormatter.cs (1)
35if (!typeof(SyndicationFeed).IsAssignableFrom(feedTypeToCreate))
System\ServiceModel\Syndication\Rss20ItemFormatter.cs (1)
27if (!typeof(SyndicationItem).IsAssignableFrom(itemTypeToCreate))
System\ServiceModel\Syndication\SyndicationElementExtension.cs (2)
120if (_extensionData != null && typeof(TExtension).IsAssignableFrom(_extensionData.GetType())) 134if (_extensionData != null && typeof(TExtension).IsAssignableFrom(_extensionData.GetType()))
System.Text.Json (41)
System\ReflectionExtensions.cs (2)
34return type.IsAssignableFrom(from.GetGenericArguments()[0]); 37return type.IsAssignableFrom(from);
System\Text\Json\Serialization\Converters\Collection\IAsyncEnumerableOfTConverter.cs (1)
17if (!typeToConvert.IsAssignableFrom(typeof(IAsyncEnumerable<TElement>)))
System\Text\Json\Serialization\Converters\Collection\ICollectionOfTConverter.cs (1)
43if (jsonTypeInfo.CreateObject is null && Type.IsAssignableFrom(typeof(List<TElement>)))
System\Text\Json\Serialization\Converters\Collection\IDictionaryConverter.cs (1)
102if (jsonTypeInfo.CreateObject is null && Type.IsAssignableFrom(typeof(Dictionary<string, object?>)))
System\Text\Json\Serialization\Converters\Collection\IDictionaryOfTKeyTValueConverter.cs (1)
45if (jsonTypeInfo.CreateObject is null && Type.IsAssignableFrom(typeof(Dictionary<TKey, TValue>)))
System\Text\Json\Serialization\Converters\Collection\IEnumerableConverter.cs (1)
18private readonly bool _isDeserializable = typeof(TCollection).IsAssignableFrom(typeof(List<object?>));
System\Text\Json\Serialization\Converters\Collection\IEnumerableConverterFactory.cs (4)
30return typeof(IEnumerable).IsAssignableFrom(typeToConvert); 148else if (typeof(IDictionary).IsAssignableFrom(typeToConvert)) 157else if (typeof(IList).IsAssignableFrom(typeToConvert)) 172Debug.Assert(typeof(IEnumerable).IsAssignableFrom(typeToConvert));
System\Text\Json\Serialization\Converters\Collection\IEnumerableConverterFactoryHelpers.cs (2)
106if (stackType?.IsAssignableFrom(type) == true) 112if (queueType?.IsAssignableFrom(type) == true)
System\Text\Json\Serialization\Converters\Collection\IEnumerableOfTConverter.cs (1)
16private readonly bool _isDeserializable = typeof(TCollection).IsAssignableFrom(typeof(List<TElement>));
System\Text\Json\Serialization\Converters\Collection\IListConverter.cs (1)
82if (jsonTypeInfo.CreateObject is null && Type.IsAssignableFrom(typeof(List<object?>)))
System\Text\Json\Serialization\Converters\Collection\IListOfTConverter.cs (1)
43if (jsonTypeInfo.CreateObject is null && Type.IsAssignableFrom(typeof(List<TElement>)))
System\Text\Json\Serialization\Converters\Collection\IReadOnlyDictionaryOfTKeyTValueConverter.cs (1)
14private readonly bool _isDeserializable = typeof(TDictionary).IsAssignableFrom(typeof(Dictionary<TKey, TValue>));
System\Text\Json\Serialization\Converters\Collection\ISetOfTConverter.cs (1)
40if (jsonTypeInfo.CreateObject is null && Type.IsAssignableFrom(typeof(HashSet<TElement>)))
System\Text\Json\Serialization\Converters\Node\JsonNodeConverterFactory.cs (2)
14if (typeof(JsonValue).IsAssignableFrom(typeToConvert)) 33public override bool CanConvert(Type typeToConvert) => typeof(JsonNode).IsAssignableFrom(typeToConvert);
System\Text\Json\Serialization\Converters\Object\ObjectConverterFactory.cs (1)
33Debug.Assert(!typeof(IEnumerable).IsAssignableFrom(typeToConvert));
System\Text\Json\Serialization\Converters\Value\UnsupportedTypeConverterFactory.cs (2)
20typeof(MemberInfo).IsAssignableFrom(type) || 30typeof(Delegate).IsAssignableFrom(type);
System\Text\Json\Serialization\JsonConverter.MetadataHandling.cs (4)
33Debug.Assert(Type!.IsAssignableFrom(resolvedType.Type)); 51Debug.Assert(Type!.IsAssignableFrom(polymorphicConverter.Type)); 72Debug.Assert(value != null && Type!.IsAssignableFrom(value.GetType())); 123Debug.Assert(Type.IsAssignableFrom(polymorphicConverter.Type));
System\Text\Json\Serialization\JsonSerializer.Helpers.cs (1)
75if (!inputType.IsAssignableFrom(runtimeType))
System\Text\Json\Serialization\JsonSerializerOptions.Caching.cs (2)
328if (interfaceType.IsAssignableFrom(candidateType)) 334else if (candidateType.IsAssignableFrom(interfaceType))
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Converters.cs (1)
193if (!typeof(JsonConverter).IsAssignableFrom(converterType) || ctor == null || !ctor.IsPublic)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (1)
148Debug.Assert(currentType.IsAssignableFrom(typeInfo.Type));
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (2)
376Debug.Assert(declaringTypeInfo is null || declaringType.IsAssignableFrom(declaringTypeInfo.Type)); 1070=> MemberName == other.MemberName && DeclaringType.IsAssignableFrom(other.DeclaringType);
System\Text\Json\Serialization\Metadata\PolymorphicTypeResolver.cs (7)
121Debug.Assert(BaseType.IsAssignableFrom(runtimeType)); 194baseType.IsAssignableFrom(derivedType) && !derivedType.IsGenericTypeDefinition; 202Debug.Assert(BaseType.IsAssignableFrom(type)); 213for (Type? candidate = type.BaseType; BaseType.IsAssignableFrom(candidate); candidate = candidate.BaseType) 229if (interfaceTy != BaseType && BaseType.IsAssignableFrom(interfaceTy) && 287if (matchingResult.Type.IsAssignableFrom(interfaceType)) 292else if (interfaceType.IsAssignableFrom(matchingResult.Type))
System.Web.Services.Description (2)
System\Web\Services\Description\ServiceDescription.cs (2)
1149if (type.IsAssignableFrom(item.GetType())) 1164if (type.IsAssignableFrom(item.GetType()))
System.Windows.Forms (88)
misc\ImageListUtils.cs (1)
48if (typeof(ImageList).IsAssignableFrom(property.PropertyType))
System\Windows\Forms\ComponentModel\COM2Interop\COM2IManagedPerPropertyBrowsingHandler.cs (5)
122Debug.Assert(typeof(Attribute).IsAssignableFrom(type), $"Attribute type {type.FullName} does not derive from Attribute"); 123if (!typeof(Attribute).IsAssignableFrom(type)) 142Debug.Assert(typeof(Attribute).IsAssignableFrom(type), $"Attribute type {type.FullName} does not derive from Attribute"); 143if (!typeof(Attribute).IsAssignableFrom(type)) 158if (parameters.Length == 1 && parameters[0].ParameterType.IsAssignableFrom(value.GetType()))
System\Windows\Forms\ComponentModel\COM2Interop\COM2IVsPerPropertyBrowsingHandler.cs (2)
97if (typeof(IDispatch.Interface).IsAssignableFrom(sender.PropertyType) && sender.CanShow) 171if (sender.CanShow && typeof(IDispatch.Interface).IsAssignableFrom(sender.PropertyType))
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyDescriptor.cs (2)
492&& typeof(TypeConverter).IsAssignableFrom(converterType)) 511localConverter ??= typeof(IDispatch).IsAssignableFrom(PropertyType)
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (4)
917else if (typeof(Image).IsAssignableFrom(type) || imageTypeConverter.CanConvertFrom(type)) 940if (typeof(IList).IsAssignableFrom(_props[i].PropertyType)) 1207Debug.Assert(!_props[i].IsBrowsable || typeof(IList).IsAssignableFrom(_props[i].PropertyType), "if the DGV does not have any columns then the properties in the currency manager should be Browsable(false) or point to sub lists"); 1471if (!columnType.IsAssignableFrom(valueType))
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (2)
25295|| (dataGridViewCurrentCell.FormattedValueType is not null && dataGridViewCurrentCell.FormattedValueType.IsAssignableFrom(nullValue.GetType()))) 25361&& dataGridViewCurrentCell.ValueType.IsAssignableFrom(dgvcpe.Value.GetType()))
System\Windows\Forms\Controls\DataGridView\DataGridViewBand.cs (1)
129if (value is not null && !typeof(DataGridViewHeaderCell).IsAssignableFrom(value))
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (4)
1612(formattedValue is null || !FormattedValueType.IsAssignableFrom(formattedValue.GetType()))) 1645(formattedValue is null || FormattedValueType is null || !FormattedValueType.IsAssignableFrom(formattedValue.GetType()))) 1650!typeof(ValueType).IsAssignableFrom(FormattedValueType)) 3730!FormattedValueType.IsAssignableFrom(formattedValue.GetType()))
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (16)
62if (value is null || !FormattedValueType.IsAssignableFrom(value.GetType())) 130if (FormattedValueType.IsAssignableFrom(s_defaultCheckStateType)) 160else if (FormattedValueType.IsAssignableFrom(s_defaultBooleanType)) 403ThreeState = (value is not null && s_defaultCheckStateType.IsAssignableFrom(value)); 1574Debug.Assert(formattedValue is null || FormattedValueType is null || FormattedValueType.IsAssignableFrom(formattedValue.GetType())); 1586else if (ValueType is not null && ValueType.IsAssignableFrom(s_defaultBooleanType)) 1590else if (ValueType is not null && ValueType.IsAssignableFrom(s_defaultCheckStateType)) 1601else if (ValueType is not null && ValueType.IsAssignableFrom(s_defaultBooleanType)) 1605else if (ValueType is not null && ValueType.IsAssignableFrom(s_defaultCheckStateType)) 1620else if (ValueType is not null && ValueType.IsAssignableFrom(s_defaultBooleanType)) 1624else if (ValueType is not null && ValueType.IsAssignableFrom(s_defaultCheckStateType)) 1635else if (ValueType is not null && ValueType.IsAssignableFrom(s_defaultBooleanType)) 1639else if (ValueType is not null && ValueType.IsAssignableFrom(s_defaultCheckStateType)) 1650else if (ValueType is not null && ValueType.IsAssignableFrom(s_defaultCheckStateType)) 1676if (FormattedValueType.IsAssignableFrom(typeof(CheckState))) 1691else if (FormattedValueType.IsAssignableFrom(s_defaultBooleanType))
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (1)
410HeaderCell.ValueType.IsAssignableFrom(typeof(string)))
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (1)
913if (value is null || ((ValueType is not null && !ValueType.IsAssignableFrom(value.GetType())) && value != DBNull.Value))
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (5)
42if (s_defaultTypeImage.IsAssignableFrom(ValueType)) 46else if (s_defaultTypeIcon.IsAssignableFrom(ValueType)) 198ValueIsIcon = (value is not null && s_defaultTypeIcon.IsAssignableFrom(value)); 546if (s_defaultTypeImage.IsAssignableFrom(ValueType)) 554else if (s_defaultTypeIcon.IsAssignableFrom(ValueType))
System\Windows\Forms\Controls\ListControl\ListControl.cs (2)
266if (typeof(IList).IsAssignableFrom(props[i].PropertyType)) 279if (typeof(IList).IsAssignableFrom(props[i].PropertyType))
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
1498else if (typeof(EventsTab).IsAssignableFrom(tabType))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MergePropertyDescriptor.cs (1)
309if (value is IList list && typeof(IList).IsAssignableFrom(PropertyType))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (1)
108if (componentType is not null && (!componentType.IsPublic || !componentType.IsAssignableFrom(ownerType)))
System\Windows\Forms\Controls\ToolStrips\ToolStripContainer.ToolStripContainerTypedControlCollection.cs (2)
35if (!_contentPanelType.IsAssignableFrom(controlType) && !_panelType.IsAssignableFrom(controlType))
System\Windows\Forms\Controls\ToolStrips\ToolStripCustomIComparer.cs (2)
20if (x.GetType().IsAssignableFrom(y.GetType())) 25if (y.GetType().IsAssignableFrom(x.GetType()))
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (1)
796if (typeof(ToolStripDropDownItem).IsAssignableFrom(childItem.GetType()))
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (2)
237if ((typeof(ToolStripButton).IsAssignableFrom(e.Item.GetType()) 240|| (typeof(ToolStripMenuItem).IsAssignableFrom(e.Item.GetType())
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (2)
1095&& (sourceToolStrip.GetType().IsAssignableFrom(targetToolStrip.GetType()) 1096|| targetToolStrip.GetType().IsAssignableFrom(sourceToolStrip.GetType())));
System\Windows\Forms\Controls\TreeView\TreeViewImageIndexConverter.cs (1)
89if (typeof(ImageList).IsAssignableFrom(prop.PropertyType))
System\Windows\Forms\DataBinding\Binding.BindToObject.cs (1)
152if (typeof(Array).IsAssignableFrom(type))
System\Windows\Forms\DataBinding\BindingContext.cs (1)
269bindingManagerBase = typeof(IList).IsAssignableFrom(prop.PropertyType)
System\Windows\Forms\DataBinding\BindingManagerBase.cs (2)
107if (!typeof(IList).IsAssignableFrom(listType)) 129if (typeof(IList).IsAssignableFrom(listType))
System\Windows\Forms\DataBinding\BindingSource.cs (4)
664if (typeof(ITypedList).IsAssignableFrom(type) && typeof(IList).IsAssignableFrom(type)) 668else if (typeof(IListSource).IsAssignableFrom(type)) 1472if (value is not null && !_itemType!.IsAssignableFrom(value.GetType()))
System\Windows\Forms\DataBinding\ListBindingHelper.cs (11)
209if (list is Type listAsType && typeof(IListSource).IsAssignableFrom(listAsType)) 223if (typeof(Array).IsAssignableFrom(listType)) 309if (typeof(Array).IsAssignableFrom(type)) 323else if (typeof(IList).IsAssignableFrom(type)) 494if (typeof(IList).IsAssignableFrom(type) || 495typeof(ITypedList).IsAssignableFrom(type) || 496typeof(IListSource).IsAssignableFrom(type)) 504if (typeof(IList<>).IsAssignableFrom(type.GetGenericTypeDefinition())) 515if (typeof(IList<>).IsAssignableFrom(curInterface.GetGenericTypeDefinition())) 576if (typeof(Array).IsAssignableFrom(targetType)) 590if (indexer is not null && !typeof(ICustomTypeDescriptor).IsAssignableFrom(indexer.PropertyType))
System\Windows\Forms\DataBinding\RelatedCurrencyManager.cs (1)
36if (_fieldInfo is null || !typeof(IList).IsAssignableFrom(_fieldInfo.PropertyType))
System\Windows\Forms\FeatureSupport.cs (2)
37if (featureId is null || !typeof(IFeatureSupport).IsAssignableFrom(c)) 61if (featureId is null || !typeof(IFeatureSupport).IsAssignableFrom(c))
System\Windows\Forms\Form.cs (2)
6150if (t.IsAssignableFrom(type)) 6188thisToolstrip.GetType().IsAssignableFrom(sourceToolStrip.GetType()))
System\Windows\Forms\ImageIndexConverter.cs (1)
112if (typeof(ImageList).IsAssignableFrom(prop.PropertyType))
System\Windows\Forms\ImageKeyConverter.cs (1)
118if (typeof(ImageList).IsAssignableFrom(prop.PropertyType))
System\Windows\Forms\Internal\Formatter.cs (2)
191if (targetType.IsAssignableFrom(sourceType)) 339else if (value is not null && targetType.IsAssignableFrom(value.GetType()))
System\Windows\Forms\Internal\TypedControlCollection.cs (1)
46if (!_typeOfControl.IsAssignableFrom(value.GetType()))
System.Windows.Forms.Design (79)
System\ComponentModel\Design\CollectionEditor.CollectionForm.cs (1)
52bool editable = typeof(IList).IsAssignableFrom(_editor.CollectionType);
System\ComponentModel\Design\CollectionEditor.cs (1)
95if (Context.TryGetService(out IDesignerHost? host) && typeof(IComponent).IsAssignableFrom(itemType))
System\ComponentModel\Design\DesignerActionPanel.PropertyLine.cs (1)
52if (!PropertyDescriptor.PropertyType.IsAssignableFrom(valueType))
System\ComponentModel\Design\DesignSurface.cs (1)
284if (typeof(IComponent).IsAssignableFrom(type))
System\ComponentModel\Design\InheritanceService.cs (2)
64if (type is null || !typeof(IComponent).IsAssignableFrom(type)) 95if (!GetReflectionTypeFromTypeHelper(typeof(IComponent)).IsAssignableFrom(reflectionType))
System\ComponentModel\Design\InheritedPropertyDescriptor.cs (2)
36if (typeof(ICollection).IsAssignableFrom(propertyDescriptor.PropertyType) && 64if (!typeof(IComponent).IsAssignableFrom(collectionType))
System\ComponentModel\Design\MenuCommandService.cs (1)
461if (_verbSourceType is not null && _verbSourceType.IsAssignableFrom(e.TypeChanged))
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.LocalDesignerSerializationManager.cs (1)
36if (typeof(ResourceManager).IsAssignableFrom(type))
System\ComponentModel\Design\Serialization\CodeDomLocalizationProvider.cs (2)
94if (typeof(ResourceManager).IsAssignableFrom(objectType)) 144if (!typeof(PropertyDescriptor).IsAssignableFrom(objectType))
System\ComponentModel\Design\Serialization\CodeDomSerializationProvider.cs (8)
60if (typeof(IComponent).IsAssignableFrom(objectType)) 68if (typeof(Enum).IsAssignableFrom(objectType)) 80if (typeof(ICollection).IsAssignableFrom(objectType)) 86if (typeof(IContainer).IsAssignableFrom(objectType)) 92if (typeof(ResourceManager).IsAssignableFrom(objectType)) 106if (typeof(PropertyDescriptor).IsAssignableFrom(objectType)) 111if (typeof(EventDescriptor).IsAssignableFrom(objectType)) 124if (typeof(IComponent).IsAssignableFrom(objectType))
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (4)
717if (typeof(Delegate).IsAssignableFrom(type) && parameters is [CodeMethodReferenceExpression methodRef]) 1816if (serializerType is not null && desiredSerializerType.IsAssignableFrom(serializerType)) 1981if (arg is not null && !parameters[i].ParameterType.IsAssignableFrom(arg.GetType())) 2038if (!targetType.IsAssignableFrom(expressionType))
System\ComponentModel\Design\Serialization\CollectionCodeDomSerializer.cs (10)
168bool isArray = typeof(Array).IsAssignableFrom(collectionType); 240if (final is null || (finalType is not null && !finalType.IsAssignableFrom(objType))) 253if (type.IsAssignableFrom(objType)) 257if (type.IsAssignableFrom(finalType)) 272Debug.Assert(candidateType!.IsAssignableFrom(type) || type.IsAssignableFrom(candidateType), "These two types are not related, how were they chosen based on the base type"); 273bool assignable = candidateType.IsAssignableFrom(type); 305if (typeof(Array).IsAssignableFrom(targetType)) 534if (o is not null && !elementType.IsAssignableFrom(o.GetType()) && o.GetType().IsPrimitive) 613if (o is not null && !elementType.IsAssignableFrom(o.GetType()))
System\ComponentModel\Design\Serialization\ComponentCodeDomSerializer.cs (3)
67if (typeof(IComponent).IsAssignableFrom(property.PropertyType) && 330supportInitialize = GetReflectionTypeFromTypeHelper(manager, typeof(ISupportInitialize)).IsAssignableFrom(reflectionType); 343persistSettings = GetReflectionTypeFromTypeHelper(manager, typeof(IPersistComponentSettings)).IsAssignableFrom(reflectionType);
System\ComponentModel\Design\Serialization\ContainerCodeDomSerializer.cs (1)
27if (typeof(IContainer).IsAssignableFrom(type))
System\ComponentModel\Design\Serialization\DesignerSerializationManager.cs (4)
259if (instance is null && addToContainer && typeof(IComponent).IsAssignableFrom(type) && (argArray is null || argArray.Length == 0 || (argArray.Length == 1 && argArray[0] == Container))) 315if (types[t] is null || parameters[t].ParameterType.IsAssignableFrom(types[t])) 435if (_serializers.TryGetValue(objectType, out serializer) && !serializerType.IsAssignableFrom(serializer.GetType())) 493if (defaultSerializerType is not null && typeof(IDesignerSerializationProvider).IsAssignableFrom(defaultSerializerType))
System\ComponentModel\Design\Serialization\ResourceCodeDomSerializer.cs (1)
140if (name is not null && name.Equals(ResourceManagerName) && typeof(ResourceManager).IsAssignableFrom(type))
System\Drawing\Design\ImageEditor.cs (2)
77if (extender is null || !typeof(ImageEditor).IsAssignableFrom(extender)) 132if (extender is null || !typeof(ImageEditor).IsAssignableFrom(extender))
System\Drawing\Design\ToolboxItem.cs (1)
265else if (typeof(IComponent).IsAssignableFrom(createType))
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (4)
524if (propWidth is not null && !typeof(int).IsAssignableFrom(propWidth.PropertyType)) 529if (propHeight is not null && !typeof(int).IsAssignableFrom(propHeight.PropertyType)) 534if (propTop is not null && !typeof(int).IsAssignableFrom(propTop.PropertyType)) 539if (propLeft is not null && !typeof(int).IsAssignableFrom(propLeft.PropertyType))
System\Windows\Forms\Design\CollectionEditVerbManager.cs (1)
35if (prop is not null && typeof(ICollection).IsAssignableFrom(prop.PropertyType))
System\Windows\Forms\Design\ComponentTray.cs (1)
766return !(typeof(ControlDesigner).IsAssignableFrom(designerType));
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (3)
226if (designerType is not null && typeof(ComponentDesigner).IsAssignableFrom(designerType)) 728if (typeof(IList<object>).IsAssignableFrom(propertyDescriptor.PropertyType)) 823else if (typeof(Image).IsAssignableFrom(type) || imageTypeConverter.CanConvertFrom(type))
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (3)
111Debug.Assert(typeof(DataGridViewColumn).IsAssignableFrom(newType), "we should only have types that can be assigned to a DataGridViewColumn"); 344if (srcType.IsAssignableFrom(destType) || destType.IsAssignableFrom(srcType))
System\Windows\Forms\Design\DataGridViewDesigner.cs (4)
429else if (typeof(IList).IsAssignableFrom(dataFieldProperty.PropertyType)) 490else if (typeof(IList).IsAssignableFrom(dataFieldProperty.PropertyType)) 631if (typeof(IList).IsAssignableFrom(propType)) 646else if (typeof(Image).IsAssignableFrom(propType) || imageTypeConverter.CanConvertFrom(propType))
System\Windows\Forms\Design\DesignBindingPicker.cs (3)
1503if (typeof(byte[]).IsAssignableFrom(property.PropertyType)) 1524if (typeof(byte[]).IsAssignableFrom(property.PropertyType)) 1530if (typeof(IList).IsAssignableFrom(property.PropertyType))
System\Windows\Forms\Design\DocumentDesigner.AxToolboxItem.cs (1)
194if (!(typeof(AxHost).IsAssignableFrom(t)))
System\Windows\Forms\Design\DocumentDesigner.DocumentInheritanceService.cs (1)
56if (typeof(Control).IsAssignableFrom(memberType))
System\Windows\Forms\Design\EditorServiceContext.cs (1)
28if (prop is not null && typeof(ICollection).IsAssignableFrom(prop.PropertyType))
System\Windows\Forms\Design\ImageIndexEditor.cs (2)
67if (typeof(ImageList).IsAssignableFrom(property.PropertyType)) 172if (typeof(ImageList).IsAssignableFrom(property.PropertyType))
System\Windows\Forms\Design\StyleCollectionEditor.cs (1)
20_isRowCollection = type.IsAssignableFrom(typeof(TableLayoutRowStyleCollection));
System\Windows\Forms\Design\TableLayoutControlCollectionCodeDomSerializer.cs (1)
66if (serializedObj is not null && !typeof(Control).IsAssignableFrom(o.GetType()))
System\Windows\Forms\Design\ToolStripContainerDesigner.cs (4)
172if (typeof(StatusStrip).IsAssignableFrom(toolType)) 176else if (typeof(ToolStrip).IsAssignableFrom(toolType)) 345if (typeof(StatusStrip).IsAssignableFrom(toolType)) 349else if (typeof(ToolStrip).IsAssignableFrom(toolType))
System\Windows\Forms\Design\ToolStripItemDesigner.cs (1)
767if (dropDownItem is not null && typeof(ToolStripDropDownItem).IsAssignableFrom(t))
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (2)
174if (!typeof(ToolStrip).IsAssignableFrom(toolType)) 307if (typeof(ToolStrip).IsAssignableFrom(toolType))
System.Windows.Forms.Primitives (2)
System\ComponentModel\PropertyDescriptorExtensions.cs (2)
10if (typeof(T).IsAssignableFrom(descriptor.PropertyType)) 24if (typeof(T).IsAssignableFrom(descriptor.PropertyType))
System.Windows.Forms.Primitives.TestUtilities (1)
Extensions\AssertExtensions.cs (1)
156if (typeof(ArgumentException).IsAssignableFrom(typeof(TNetFxExceptionType)))
System.Xaml (45)
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\TypeConverterHelper.cs (19)
340else if (typeof(int).IsAssignableFrom(type)) 344else if (typeof(short).IsAssignableFrom(type)) 348else if (typeof(long).IsAssignableFrom(type)) 352else if (typeof(uint).IsAssignableFrom(type)) 356else if (typeof(ushort).IsAssignableFrom(type)) 360else if (typeof(ulong).IsAssignableFrom(type)) 364else if (typeof(bool).IsAssignableFrom(type)) 368else if (typeof(double).IsAssignableFrom(type)) 372else if (typeof(float).IsAssignableFrom(type)) 376else if (typeof(byte).IsAssignableFrom(type)) 380else if (typeof(sbyte).IsAssignableFrom(type)) 384else if (typeof(char).IsAssignableFrom(type)) 388else if (typeof(decimal).IsAssignableFrom(type)) 392else if (typeof(TimeSpan).IsAssignableFrom(type)) 396else if (typeof(Guid).IsAssignableFrom(type)) 400else if (typeof(string).IsAssignableFrom(type)) 404else if (typeof(CultureInfo).IsAssignableFrom(type)) 419else if (typeof(DateTime).IsAssignableFrom(type)) 423else if (typeof(Uri).IsAssignableFrom(type))
System\Xaml\InfosetObjects\XamlObjectWriter.cs (2)
1442typeof(IDictionary).IsAssignableFrom(dictionaryType.UnderlyingType) && 1863if (itemType.UnderlyingType.IsAssignableFrom(type))
System\Xaml\Runtime\ClrObjectRuntime.cs (1)
395if (genericIEnumerator.IsAssignableFrom(enumerator.GetType()))
System\Xaml\Runtime\DynamicMethodRuntime.cs (1)
477if (_localType is not null && _localType != declaringType && declaringType.IsAssignableFrom(_localType))
System\Xaml\Schema\BuiltInValueConverter.cs (5)
157if (typeof(Type).IsAssignableFrom(targetType)) 162if (typeof(Type[]).IsAssignableFrom(targetType)) 177if (typeof(CultureInfo).IsAssignableFrom(targetType)) 182if (typeof(Delegate).IsAssignableFrom(targetType)) 187if (typeof(Uri).IsAssignableFrom(targetType))
System\Xaml\Schema\CollectionReflector.cs (8)
41bool isIEnumerable = typeof(IEnumerable).IsAssignableFrom(type); 48if (typeof(IDictionary).IsAssignableFrom(type)) 58if (typeof(IList).IsAssignableFrom(type)) 151if (addMethod is null && typeof(IList).IsAssignableFrom(type)) 216if (addMethod is null && typeof(IDictionary).IsAssignableFrom(type)) 245if (typeof(IEnumerable).IsAssignableFrom(type)) 258if (genericICollection.IsAssignableFrom(collectionType)) 270if ((result is not null) && !typeof(IEnumerator).IsAssignableFrom(result.ReturnType))
System\Xaml\Schema\TypeReflector.cs (4)
514if (shadowedProp.DeclaringType.IsAssignableFrom(currentProp.DeclaringType)) 568if (shadowedEvent.DeclaringType.IsAssignableFrom(currentEvent.DeclaringType)) 611if (mostDerived is null || mostDerived.DeclaringType.IsAssignableFrom(pi.DeclaringType)) 979return (pmi.Length == 2) && typeof(Delegate).IsAssignableFrom(pmi[1].ParameterType);
System\Xaml\Schema\XamlValueConverter.cs (1)
79if (!typeof(TConverterBase).IsAssignableFrom(ConverterType))
System\Xaml\XamlObjectReader.cs (2)
1292else if (!parameterInfo.ParameterType.IsAssignableFrom(argument.GetType())) 2652if (!result.IsVisibleTo(LocalAssembly) && !typeof(Type).IsAssignableFrom(clrType))
System\Xaml\XamlSchemaContext.cs (1)
1009typeof(object).Assembly.GetType().IsAssignableFrom(assembly.GetType());
System\Xaml\XamlType.cs (1)
454return baseUnderlyingType.IsAssignableFrom(curUnderlyingType);
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\Shared\E2ETesting\CaptureSeleniumLogsAttribute.cs (1)
19if (!typeof(BrowserTestBase).IsAssignableFrom(methodUnderTest.DeclaringType))
Templates.Blazor.WebAssembly.Tests (1)
src\Shared\E2ETesting\CaptureSeleniumLogsAttribute.cs (1)
19if (!typeof(BrowserTestBase).IsAssignableFrom(methodUnderTest.DeclaringType))
Templates.Mvc.Tests (1)
src\Shared\E2ETesting\CaptureSeleniumLogsAttribute.cs (1)
19if (!typeof(BrowserTestBase).IsAssignableFrom(methodUnderTest.DeclaringType))
Templates.Tests (1)
src\Shared\E2ETesting\CaptureSeleniumLogsAttribute.cs (1)
19if (!typeof(BrowserTestBase).IsAssignableFrom(methodUnderTest.DeclaringType))
UIAutomationClient (2)
System\Windows\Automation\ItemContainerPattern.cs (1)
138|| (value != null && !expectedType.IsAssignableFrom(value.GetType()))))
System\Windows\Automation\PropertyCondition.cs (1)
136|| (val != null && !expectedType.IsAssignableFrom(val.GetType()))))
WinFormsControlsTest (1)
UserControls\UserControlWithObjectCollectionEditor.cs (1)
35if (destinationType is not null && destinationType.IsAssignableFrom(typeof(string)) && value is IList<int> list)