3 overrides of IsInstanceOfType
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureType.cs (1)
193public sealed override bool IsInstanceOfType([NotNullWhen(true)] object? o) => throw new NotSupportedException(SR.NotSupported_SignatureType);
src\System\RuntimeType.CoreCLR.cs (1)
3292public override unsafe bool IsInstanceOfType([NotNullWhen(true)] object? o)
System.Reflection.Context (1)
System\Reflection\Context\Delegation\DelegatingType.cs (1)
275public override bool IsInstanceOfType([NotNullWhen(true)] object? o)
105 references to IsInstanceOfType
illink (2)
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\Semantics\ImplicitConversion.cs (1)
194&& _typeDest.AssociatedSystemType.IsInstanceOfType(srcRuntimeObject)
Microsoft.Extensions.AI (1)
Functions\AIFunctionFactory.cs (1)
380_ when parameterType.IsInstanceOfType(value) => value, // Do nothing if value is assignable to parameter type
Microsoft.Extensions.AI.Abstractions (2)
ChatCompletion\DelegatingChatClient.cs (1)
72serviceKey is null && serviceType.IsInstanceOfType(this) ? this :
Embeddings\DelegatingEmbeddingGenerator.cs (1)
68serviceKey is null && serviceType.IsInstanceOfType(this) ? this :
Microsoft.Extensions.AI.Abstractions.Tests (2)
TestChatClient.cs (1)
29serviceType is not null && serviceKey is null && serviceType.IsInstanceOfType(this) ? this : null;
TestEmbeddingGenerator.cs (1)
25serviceType is not null && serviceKey is null && serviceType.IsInstanceOfType(this) ? this : null;
Microsoft.Extensions.AI.AzureAIInference (2)
AzureAIInferenceChatClient.cs (1)
77serviceType.IsInstanceOfType(this) ? this :
AzureAIInferenceEmbeddingGenerator.cs (1)
80serviceType.IsInstanceOfType(this) ? this :
Microsoft.Extensions.AI.Integration.Tests (2)
QuantizationEmbeddingGenerator.cs (1)
33serviceKey is null && serviceType.IsInstanceOfType(this) ? this :
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestChatClient.cs (1)
29serviceType is not null && serviceKey is null && serviceType.IsInstanceOfType(this) ? this : null;
Microsoft.Extensions.AI.Ollama (2)
OllamaChatClient.cs (1)
198serviceKey is null && serviceType.IsInstanceOfType(this) ? this :
OllamaEmbeddingGenerator.cs (1)
65serviceKey is null && serviceType.IsInstanceOfType(this) ? this :
Microsoft.Extensions.AI.OpenAI (2)
OpenAIChatClient.cs (1)
96serviceType.IsInstanceOfType(this) ? this :
OpenAIEmbeddingGenerator.cs (1)
107serviceType.IsInstanceOfType(this) ? this :
Microsoft.Extensions.AI.Tests (2)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestChatClient.cs (1)
29serviceType is not null && serviceKey is null && serviceType.IsInstanceOfType(this) ? this : null;
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestEmbeddingGenerator.cs (1)
25serviceType is not null && serviceKey is null && serviceType.IsInstanceOfType(this) ? this : null;
Microsoft.Extensions.DependencyInjection (1)
ServiceLookup\ConstantCallSite.cs (1)
16if (defaultValue != null && !serviceType.IsInstanceOfType(defaultValue))
Microsoft.Maui.Controls (5)
BindableProperty.cs (1)
95 if (defaultValue != null && !returnType.IsInstanceOfType(defaultValue))
BindingExpressionHelper.cs (1)
18 if ((toTarget && targetProperty.TryConvert(ref value)) || (!toTarget && convertTo.IsInstanceOfType(value)))
DependencyResolver.cs (1)
33 if (!type.IsInstanceOfType(result))
Interactivity\Behavior.cs (1)
30 if (!AssociatedType.IsInstanceOfType(bindable))
Interactivity\TriggerBase.cs (1)
63 if (!TargetType.IsInstanceOfType(bindable))
Microsoft.Maui.Controls.Xaml (3)
ApplyPropertiesVisitor.cs (3)
612 (property.ReturnType.IsInstanceOfType(convertedValue))) 672 if (exception != null || (convertedValue != null && !propertyInfo.PropertyType.IsInstanceOfType(convertedValue))) 809 if (property.ReturnType.GenericTypeArguments.Length != 1 || !property.ReturnType.GenericTypeArguments[0].IsInstanceOfType(value))
Microsoft.ML.Core (1)
CommandLine\CmdParser.cs (1)
241env.Check(destinationType.IsInstanceOfType(destination));
Microsoft.ML.Data (1)
EntryPoints\InputBuilder.cs (1)
539if (value != null && !type.IsInstanceOfType(value))
Microsoft.VisualBasic.Core (9)
Microsoft\VisualBasic\CompilerServices\Conversions.vb (1)
2537If TargetType.IsInstanceOfType(Expression) Then
Microsoft\VisualBasic\CompilerServices\ObjectType.vb (1)
3553If toType Is GetType(Object) OrElse toType.IsInstanceOfType(obj) Then
Microsoft\VisualBasic\CompilerServices\VBBinder.vb (7)
596If (ParmType.IsInstanceOfType(args(ArgIndex)) AndAlso ParmIndex = LastParmIndexToCheck) Then 623If ParmType.IsInstanceOfType(args(ArgIndex)) Then 1192If ParamArrayLength = 1 AndAlso ParmType.IsArray AndAlso (args(ParamArrayIndex) Is Nothing OrElse ParmType.IsInstanceOfType(args(ParamArrayIndex))) Then 1294If (objTmp Is Nothing) OrElse (AmbigParams(LastNonSetValueIndex0).ParameterType.IsInstanceOfType(objTmp)) Then 1307If (objTmp Is Nothing) OrElse (Parameters(LastNonSetValueIndex1).ParameterType.IsInstanceOfType(objTmp)) Then 1812(m_state.m_OriginalArgs Is Nothing OrElse m_state.m_OriginalArgs(ArgIndex) Is Nothing OrElse ParmType.IsInstanceOfType(m_state.m_OriginalArgs(ArgIndex))) Then 1832(m_state.m_OriginalArgs Is Nothing OrElse m_state.m_OriginalArgs(ArgIndex) Is Nothing OrElse ParmType.IsInstanceOfType(m_state.m_OriginalArgs(ArgIndex))) Then
PresentationCore (1)
System\Windows\Media\VisualTreeHelper.cs (1)
233while ((current != null) && (current != ancestor) && !stopType.IsInstanceOfType(current))
PresentationFramework (9)
MS\Internal\Controls\ConnectionPointCookie.cs (1)
48else if (sink == null || !eventInterface.IsInstanceOfType(sink) && !Marshal.IsComObject(sink))
MS\Internal\Data\DefaultValueConverter.cs (1)
714return type.IsInstanceOfType(o) ? o : null;
MS\Internal\Data\ObjectRef.cs (1)
573if (type.IsInstanceOfType(fo.DO)) // found it!
System\Windows\AttachedPropertyBrowsableForChildrenAttribute.cs (1)
109if (walk != null && ownerType.IsInstanceOfType(walk))
System\Windows\Automation\Peers\GridViewAutomationPeer.cs (1)
290if (!type.IsInstanceOfType(visual))
System\Windows\Controls\GroupItem.cs (1)
189if (!style.TargetType.IsInstanceOfType(this))
System\Windows\Controls\ItemsControl.cs (1)
3477if (!style.TargetType.IsInstanceOfType(container))
System\Windows\ControlTemplate.cs (1)
66if (_targetType != null && !_targetType.IsInstanceOfType(templatedParent))
System\Windows\Data\BindingBase.cs (1)
453if (type.IsInstanceOfType(collection[i]))
System.ComponentModel.Annotations (2)
System\ComponentModel\DataAnnotations\CustomValidationAttribute.cs (1)
321if (expectedValueType.IsInstanceOfType(value))
System\ComponentModel\DataAnnotations\Validator.cs (1)
366return destinationType.IsInstanceOfType(value);
System.ComponentModel.Composition (2)
Microsoft\Internal\ContractServices.cs (1)
18if (contractType.IsInstanceOfType(value))
System\ComponentModel\Composition\Primitives\ContractBasedImportDefinition.cs (1)
332if (!metadataValueType.IsInstanceOfType(metadataValue))
System.ComponentModel.TypeConverter (19)
System\ComponentModel\AttributeCollection.cs (1)
188if (attributeType.IsInstanceOfType(attribute))
System\ComponentModel\BaseNumberConverter.cs (1)
94if (destinationType == typeof(string) && value != null && TargetType.IsInstanceOfType(value))
System\ComponentModel\ComponentResourceManager.cs (2)
174if (prop != null && !prop.IsReadOnly && (kvp.Value == null || prop.PropertyType.IsInstanceOfType(kvp.Value))) 199if (prop != null && prop.CanWrite && (kvp.Value == null || prop.PropertyType.IsInstanceOfType(kvp.Value)))
System\ComponentModel\Design\Serialization\ContextStack.cs (1)
78if (type.IsInstanceOfType(value))
System\ComponentModel\Design\ServiceContainer.cs (2)
83if (!(serviceInstance is ServiceCreatorCallback) && !serviceInstance.GetType().IsCOMObject && !serviceType.IsInstanceOfType(serviceInstance)) 193if (service != null && !service.GetType().IsCOMObject && !serviceType!.IsInstanceOfType(service))
System\ComponentModel\NullableConverter.cs (1)
104if (destinationType == UnderlyingType && value != null && NullableType.IsInstanceOfType(value))
System\ComponentModel\ReferenceConverter.cs (1)
156if (obj != null && _type != null && _type.IsInstanceOfType(obj) && IsValueAllowed(context, obj))
System\ComponentModel\ReflectPropertyDescriptor.cs (2)
506if (changedEvent != null && changedEvent.EventType.IsInstanceOfType(handler)) 983if (changedEvent != null && changedEvent.EventType.IsInstanceOfType(handler))
System\ComponentModel\ReflectTypeDescriptionProvider.ReflectedTypeData.cs (2)
129if (s_skipInterfaceAttributeList[ifaceSkipIdx].IsInstanceOfType(attr)) 374if (editor != null && !editorBaseType.IsInstanceOfType(editor))
System\ComponentModel\TypeDescriptor.cs (6)
614if (!type.IsInstanceOfType(primary)) 633else if (type.IsInstanceOfType(secondary)) 661if (designer != null && type.IsInstanceOfType(designer)) 2787if (!objectType.IsInstanceOfType(instance)) 3359if (instance != null && !objectType.IsInstanceOfType(instance)) 3375if (instance != null && !objectType.IsInstanceOfType(instance))
System.Configuration.ConfigurationManager (2)
System\Configuration\ConfigurationProperty.cs (1)
278if (!Type.IsInstanceOfType(value))
System\Configuration\SettingsBase.cs (1)
83if (propertyValue != null && !pp.PropertyType.IsInstanceOfType(propertyValue))
System.Data.Common (4)
System\Data\Common\DataColumnMappingCollection.cs (1)
394else if (!ItemType.IsInstanceOfType(value))
System\Data\Common\DataTableMappingCollection.cs (1)
330else if (!ItemType.IsInstanceOfType(value))
System\Data\Common\ObjectStorage.cs (1)
240else if (_dataType == typeof(object) || _dataType.IsInstanceOfType(value))
System\Data\Common\SqlUDTStorage.cs (1)
126else if (!_dataType.IsInstanceOfType(value))
System.Data.Odbc (1)
System\Data\Odbc\OdbcParameterCollectionHelper.cs (1)
346else if (!s_itemType.IsInstanceOfType(value))
System.Linq.Expressions (3)
System\Dynamic\Utils\ExpressionUtils.cs (1)
226if (TypeUtils.IsSameOrSubclass(quoteable, parameterType) && parameterType.IsInstanceOfType(argument))
System\Linq\Expressions\Interpreter\TypeOperations.cs (2)
64frame.Push(_type.IsInstanceOfType(frame.Pop())); 87frame.Push(_type.IsInstanceOfType(value) ? value : null);
System.Private.CoreLib (3)
src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (2)
235if (pCls.IsInstanceOfType(args[index])) 271if (paramArrayType.IsInstanceOfType(args[j]))
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvokerCommon.cs (1)
97if (!method.DeclaringType!.IsInstanceOfType(target))
System.Reflection.Context (6)
System\Reflection\Context\Custom\AttributeUtils.cs (2)
156Debug.Assert(attributeFilterType.IsInstanceOfType(newAttribute)); 204if (attributeFilterType.IsInstanceOfType(attr))
System\Reflection\Context\Delegation\DelegatingType.cs (1)
277return _typeInfo.IsInstanceOfType(o);
System\Reflection\Context\Virtual\VirtualPropertyInfo.PropertyGetter.cs (1)
34if (!ReflectedType!.IsInstanceOfType(obj))
System\Reflection\Context\Virtual\VirtualPropertyInfo.PropertySetter.cs (2)
46if (!ReflectedType!.IsInstanceOfType(obj)) 49if (ReturnType.IsInstanceOfType(value))
System.Reflection.TypeExtensions (1)
System\Reflection\TypeExtensions.cs (1)
353return type.IsInstanceOfType(o);
System.Windows.Controls.Ribbon (1)
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (1)
2020if (clone.GetType().IsInstanceOfType(original))
System.Windows.Forms (6)
System\Windows\Forms\ActiveX\AxHost.ConnectionPointCookie.cs (1)
35if (sink is null || !eventInterface.IsInstanceOfType(sink))
System\Windows\Forms\ComponentModel\COM2Interop\COM2ExtendedTypeConverter.cs (1)
35if (t.IsInstanceOfType(converter))
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
2657&& editControlType.IsInstanceOfType(_latestEditingControl)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (1)
348if (!createType.IsInstanceOfType(newValue))
System\Windows\Forms\DataBinding\Binding.cs (2)
653if (!(cevent.Value is DBNull) && cevent.Value is not null && cevent.DesiredType is not null && !cevent.DesiredType.IsInstanceOfType(cevent.Value) && (cevent.Value is IConvertible)) 666if (!(cevent.Value is DBNull) && cevent.DesiredType is not null && !cevent.DesiredType.IsInstanceOfType(cevent.Value) && (cevent.Value is IConvertible))
System.Windows.Forms.Design (7)
System\ComponentModel\Design\ReferenceService.cs (1)
291if (baseType.IsInstanceOfType(reference))
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (1)
974if (!arrayType.IsInstanceOfType(o))
System\ComponentModel\Design\UndoEngine.cs (1)
455if (prop.PropertyType.IsInstanceOfType(e.Component) &&
System\Drawing\Design\ImageEditor.cs (1)
93&& myClass.IsInstanceOfType(editor))
System\Drawing\Design\ToolboxItem.cs (1)
750if (value is not null && !expectedType.IsInstanceOfType(value))
System\Windows\Forms\Design\EventHandlerService.cs (1)
57object? handler = _handlers.FirstOrDefault(handlerType.IsInstanceOfType);
System\Windows\Forms\Design\ImageListImageEditor.cs (1)
58&& myClass.IsInstanceOfType(editor))