884 references to IsValueType
Aspire.Confluent.Kafka (1)
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\Shared\PropertyFetcher.AOT.cs (1)
113if (declaringType!.IsValueType)
Aspire.Hosting.RemoteHost (6)
Ats\AtsCallbackProxyFactory.cs (1)
397if (argTypes[i].IsValueType)
Ats\CapabilityDispatcher.cs (1)
721if (paramType.IsValueType && Nullable.GetUnderlyingType(paramType) is null)
Ats\PolyglotCapabilityInvocationException.cs (3)
394if (specialConstraints.HasFlag(GenericParameterAttributes.ReferenceTypeConstraint) && actualResourceType.IsValueType) 400(!actualResourceType.IsValueType || Nullable.GetUnderlyingType(actualResourceType) is not null)) 406!actualResourceType.IsValueType &&
AtsCapabilityScanner.cs (1)
3093if (!constraint.IsInterface && !constraint.IsValueType)
Aspire.Hosting.Tests (3)
Backchannel\BackchannelContractTests.cs (2)
146bool isNullable = prop.PropertyType.IsValueType 158if (!prop.PropertyType.IsValueType)
ResourceNotificationTests.cs (1)
1728(!type.IsValueType && new NullabilityInfoContext().Create(property).WriteState == NullabilityState.Nullable))
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Shared\PropertyFetcher.cs (1)
118return declaringType.IsValueType
dotnet-svcutil-lib (56)
FrameworkFork\Microsoft.Xml\Xml\schema\GenerateConverter.cs (2)
671if (!typeSrc.GetTypeInfo().IsValueType) 832if (info.IsValueType || info.IsSealed)
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeGenerator.cs (8)
637if (methodInfo.IsVirtual && !methodInfo.DeclaringType.GetTypeInfo().IsValueType) 722return info.IsValueType && !info.IsPrimitive; 727if (GetVariableType(obj).GetTypeInfo().IsValueType) 1275if (localBuilder.LocalType.GetTypeInfo().IsValueType) 1384if (argBuilder.ArgType.GetTypeInfo().IsValueType) 1793if (targetInfo.IsValueType) 1795if (sourceInfo.IsValueType) 1822if (sourceInfo.IsValueType)
FrameworkFork\Microsoft.Xml\Xml\Serialization\SourceInfo.cs (2)
84if (eType.GetTypeInfo().IsValueType) 147if (varType.GetTypeInfo().IsValueType)
FrameworkFork\Microsoft.Xml\Xml\Serialization\TypeExtensions.cs (1)
26return !targetType.GetTypeInfo().IsValueType;
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (2)
809if (!info.IsValueType) 874else if (info.IsValueType)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationReader.cs (2)
1762if (elementType.GetTypeInfo().IsValueType) 1828if (currItemType.GetTypeInfo().IsValueType)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriterILGen.cs (2)
2316Debug.Assert(!local.LocalType.GetTypeInfo().IsValueType); 2516Debug.Assert(type.GetTypeInfo().IsValueType);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ClassDataContract.cs (6)
442if (type.GetTypeInfo().IsValueType) 799this.IsValueType = type.GetTypeInfo().IsValueType; 911if (isReference && type.GetTypeInfo().IsValueType) 1094if (CollectionDataContract.IsCollection(memberContract.MemberType, false /*isConstructorRequired*/) && !memberContract.MemberType.GetTypeInfo().IsValueType) 1396if (type.GetTypeInfo().IsValueType) 1514if (type.GetTypeInfo().IsValueType && !IsNonAttributedType)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeExporter.cs (1)
555xmlContract.IsValueType = info.IsValueType;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeGenerator.cs (10)
419if ((typeCode == TypeCode.Object && type.GetTypeInfo().IsValueType) || 594if (methodInfo.IsVirtual && !methodInfo.DeclaringType.GetTypeInfo().IsValueType) 683return objType.GetTypeInfo().IsValueType && !objType.GetTypeInfo().IsPrimitive; 768if (type.GetTypeInfo().IsValueType) 1118if (localBuilder.LocalType.GetTypeInfo().IsValueType) 1151if (argBuilder.ArgType.GetTypeInfo().IsValueType) 1508if (target.GetTypeInfo().IsValueType) 1510if (source.GetTypeInfo().IsValueType) 1533if (source.GetTypeInfo().IsValueType) 1707if (type.GetTypeInfo().IsValueType)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CollectionDataContract.cs (1)
1084if (!type.GetTypeInfo().IsValueType)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (2)
1118_isValueType = type.GetTypeInfo().IsValueType; 2053return !type.GetTypeInfo().IsValueType ||
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ExceptionDataContract.cs (1)
155this.IsValueType = type.GetTypeInfo().IsValueType;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\PrimitiveDataContract.cs (2)
99if (UnderlyingType.GetTypeInfo().IsValueType) 119if (UnderlyingType.GetTypeInfo().IsValueType)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlDataContract.cs (2)
359if (type.GetTypeInfo().IsValueType) 408if (type.GetTypeInfo().IsValueType)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlFormatReaderGenerator.cs (8)
204if (type.GetTypeInfo().IsValueType && !classContract.IsNonAttributedType) 216if (type.GetTypeInfo().IsValueType) 391if ((primitiveContract != null && primitiveContract.UnderlyingType != Globals.TypeOfObject) || nullables != 0 || type.GetTypeInfo().IsValueType) 404else if (type.GetTypeInfo().IsValueType) 418if (type.GetTypeInfo().IsValueType) 434if (!type.GetTypeInfo().IsValueType) 443if (type.GetTypeInfo().IsValueType) 535if (type.GetTypeInfo().IsValueType)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlFormatWriterGenerator.cs (2)
467if (type.GetTypeInfo().IsValueType) 556if (memberType.GetTypeInfo().IsValueType && !isNullableOfT)
FrameworkFork\System.ServiceModel\Extensions\ReflectionExtensions.cs (1)
88return type.GetTypeInfo().IsValueType;
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedCollection.cs (1)
304if (typeof(T).GetTypeInfo().IsValueType)
GenerateDocumentationAndConfigFiles (17)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (12)
102if (!typeof(TKey).IsValueType) 329else if (SupportsComparerDevirtualization && typeof(TValue).IsValueType) 411&& typeof(TKey).IsValueType // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 524Debug.Assert(comparer is not null || (SupportsComparerDevirtualization && typeof(TKey).IsValueType)); 525var hashCode = (uint)((SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null) ? key.GetHashCode() : comparer!.GetHashCode(key)); 532&& typeof(TKey).IsValueType // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 711Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null); 712var hashCode = (uint)(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? key.GetHashCode() : comparer!.GetHashCode(key)); 723(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? EqualityComparer<TKey>.Default.Equals(entry._key, key) : comparer!.Equals(entry._key, key))) 788Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null); 789var hashCode = (uint)(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? key.GetHashCode() : comparer!.GetHashCode(key)); 800(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? EqualityComparer<TKey>.Default.Equals(entry._key, key) : comparer!.Equals(entry._key, key)))
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (5)
85if (!typeof(T).IsValueType) 233typeof(T).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 302Debug.Assert((SupportsComparerDevirtualization && typeof(T).IsValueType) || comparer is not null); 304SupportsComparerDevirtualization && typeof(T).IsValueType && comparer == null ? item!.GetHashCode() : 1035typeof(T).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types
Microsoft.AspNetCore.Components.Endpoints (6)
FormMapping\Factories\ComplexType\ComplexTypeExpressionConverterFactoryOfT.cs (3)
119if (model.Constructor == null && !model.Type.IsValueType) 173var clause = model.Type.IsValueType ? failedAndHasHandler : 188if (!model.Type.IsValueType)
FormMapping\Metadata\FormDataMetadataFactory.cs (1)
141else if (!type.IsValueType)
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (2)
218if (getMethod.DeclaringType!.IsValueType) 275Debug.Assert(!propertyInfo.DeclaringType!.IsValueType);
Microsoft.AspNetCore.Components.Forms (1)
FieldIdentifier.cs (1)
51if (model.GetType().IsValueType)
Microsoft.AspNetCore.Components.Server (1)
BlazorPack\SequenceOfT.cs (1)
299private static readonly bool IsValueTypeElement = typeof(T).IsValueType;
Microsoft.AspNetCore.Connections.Abstractions (1)
src\aspnetcore\src\Shared\ParameterDefaultValue\ParameterDefaultValue.cs (1)
38if (defaultValue == null && parameter.ParameterType.IsValueType
Microsoft.AspNetCore.Hosting (2)
GenericHost\GenericWebHostBuilder.cs (1)
290if (containerType.IsValueType && !RuntimeFeature.IsDynamicCodeSupported)
Internal\StartupLoader.cs (1)
72if (type.IsValueType && !RuntimeFeature.IsDynamicCodeSupported)
Microsoft.AspNetCore.Http.Abstractions (3)
src\aspnetcore\src\Shared\ParameterDefaultValue\ParameterDefaultValue.cs (1)
38if (defaultValue == null && parameter.ParameterType.IsValueType
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (2)
218if (getMethod.DeclaringType!.IsValueType) 275Debug.Assert(!propertyInfo.DeclaringType!.IsValueType);
Microsoft.AspNetCore.Http.Extensions (10)
RequestDelegateFactory.cs (4)
555if (returnType.IsValueType) 1226if (returnType.IsValueType) 1389if (allowEmptyRequestBody && bodyType.IsValueType) 2015if (parameterType.IsValueType && Nullable.GetUnderlyingType(parameterType) is null)
src\aspnetcore\src\Components\Endpoints\src\FormMapping\Factories\ComplexType\ComplexTypeExpressionConverterFactoryOfT.cs (3)
119if (model.Constructor == null && !model.Type.IsValueType) 173var clause = model.Type.IsValueType ? failedAndHasHandler : 188if (!model.Type.IsValueType)
src\aspnetcore\src\Components\Endpoints\src\FormMapping\Metadata\FormDataMetadataFactory.cs (1)
141else if (!type.IsValueType)
src\aspnetcore\src\Shared\Json\JsonSerializerExtensions.cs (1)
14=> jsonTypeInfo.Type.IsSealed || jsonTypeInfo.Type.IsValueType || jsonTypeInfo.PolymorphismOptions is not null;
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (1)
386if (type.IsValueType)
Microsoft.AspNetCore.Http.Results (1)
src\aspnetcore\src\Shared\Json\JsonSerializerExtensions.cs (1)
14=> jsonTypeInfo.Type.IsSealed || jsonTypeInfo.Type.IsValueType || jsonTypeInfo.PolymorphismOptions is not null;
Microsoft.AspNetCore.Identity (1)
_generated\0\GeneratedRouteBuilderExtensions.g.cs (1)
1391=> jsonTypeInfo.Type.IsSealed || jsonTypeInfo.Type.IsValueType || jsonTypeInfo.PolymorphismOptions is not null;
Microsoft.AspNetCore.JsonPatch (3)
Internal\ConversionResultProvider.cs (1)
83if (type.IsValueType)
Internal\DynamicObjectAdapter.cs (1)
68if (property.GetType().IsValueType
Internal\PocoAdapter.cs (1)
96if (jsonProperty.PropertyType.IsValueType
Microsoft.AspNetCore.JsonPatch.SystemTextJson (2)
Internal\ConversionResultProvider.cs (1)
65if (type.IsValueType)
Internal\PocoAdapter.cs (1)
93if (jsonProperty.PropertyType.IsValueType
Microsoft.AspNetCore.Mvc.Abstractions (2)
ModelBinding\ModelMetadata.cs (1)
752IsReferenceOrNullableType = !ModelType.IsValueType || IsNullableValueType;
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (1)
386if (type.IsValueType)
Microsoft.AspNetCore.Mvc.Core (13)
Formatters\InputFormatter.cs (1)
30if (modelType.IsValueType)
Infrastructure\ParameterDefaultValues.cs (1)
30if (defaultValue == null && parameterInfo.ParameterType.IsValueType)
ModelBinding\Binders\ComplexObjectModelBinder.cs (1)
662if (propertyType.IsValueType)
ModelBinding\Binders\ComplexTypeModelBinder.cs (1)
432if (propertyType.IsValueType)
ModelBinding\Binders\ServicesModelBinderProvider.cs (1)
31!context.Metadata.ModelType.IsValueType &&
ModelBinding\Metadata\DefaultBindingMetadataProvider.cs (1)
82if (type.IsAbstract || type.IsValueType || type.IsInterface)
ModelBinding\Metadata\DefaultModelMetadataProvider.cs (2)
281else if (parameterType.IsValueType) 375!containerType.IsValueType)
ModelBinding\ModelBindingHelper.cs (1)
618return type.IsValueType ? Activator.CreateInstance(type) : null;
src\aspnetcore\src\Shared\Json\JsonSerializerExtensions.cs (1)
14=> jsonTypeInfo.Type.IsSealed || jsonTypeInfo.Type.IsValueType || jsonTypeInfo.PolymorphismOptions is not null;
src\aspnetcore\src\Shared\ParameterDefaultValue\ParameterDefaultValue.cs (1)
38if (defaultValue == null && parameter.ParameterType.IsValueType
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (2)
218if (getMethod.DeclaringType!.IsValueType) 275Debug.Assert(!propertyInfo.DeclaringType!.IsValueType);
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
DataAnnotationsMetadataProvider.cs (1)
329!context.Key.ModelType.IsValueType &&
Microsoft.AspNetCore.Mvc.RazorPages (1)
Infrastructure\PageActionInvoker.cs (1)
239parameter.ParameterInfo.ParameterType.IsValueType)
Microsoft.AspNetCore.Mvc.ViewFeatures (4)
CachedExpressionCompiler.cs (3)
216if (body.Type.IsValueType) 237var isNullableValueType = type.IsValueType && Nullable.GetUnderlyingType(type) != null; 238if (type.IsValueType && !isNullableValueType)
Filters\LifecycleProperty.cs (1)
21_isReferenceTypeOrNullable = !propertyType.IsValueType || Nullable.GetUnderlyingType(propertyType) != null;
Microsoft.AspNetCore.OpenApi (3)
_generated\0\GeneratedRouteBuilderExtensions.g.cs (1)
229=> jsonTypeInfo.Type.IsSealed || jsonTypeInfo.Type.IsValueType || jsonTypeInfo.PolymorphismOptions is not null;
Extensions\TypeExtensions.cs (1)
83if (parameterType.IsValueType)
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (1)
386if (type.IsValueType)
Microsoft.AspNetCore.Routing (3)
src\aspnetcore\src\Shared\Json\JsonSerializerExtensions.cs (1)
14=> jsonTypeInfo.Type.IsSealed || jsonTypeInfo.Type.IsValueType || jsonTypeInfo.PolymorphismOptions is not null;
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (2)
218if (getMethod.DeclaringType!.IsValueType) 275Debug.Assert(!propertyInfo.DeclaringType!.IsValueType);
Microsoft.AspNetCore.Routing.Abstractions (2)
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (2)
218if (getMethod.DeclaringType!.IsValueType) 275Debug.Assert(!propertyInfo.DeclaringType!.IsValueType);
Microsoft.AspNetCore.SignalR.Client.Core (1)
HubConnection.cs (1)
1144if (!RuntimeFeature.IsDynamicCodeSupported && genericTypes[0].IsValueType)
Microsoft.AspNetCore.SignalR.Core (3)
Internal\HubMethodDescriptor.cs (2)
260if (streamReturnType.IsValueType) 301if (!RuntimeFeature.IsDynamicCodeSupported && streamType.IsValueType)
StreamTracker.cs (1)
41Debug.Assert(RuntimeFeature.IsDynamicCodeSupported || !itemType.IsValueType, "HubMethodDescriptor ensures itemType is not a ValueType when PublishAot=true.");
Microsoft.Build (21)
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupLoggingHelper.cs (1)
246else if (parameterValue.GetType().IsValueType)
src\5057ed6cf5d6323b\SegmentedDictionary`2.cs (12)
102if (!typeof(TKey).IsValueType) 329else if (SupportsComparerDevirtualization && typeof(TValue).IsValueType) 411&& typeof(TKey).IsValueType // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 524Debug.Assert(comparer is not null || (SupportsComparerDevirtualization && typeof(TKey).IsValueType)); 525var hashCode = (uint)((SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null) ? key.GetHashCode() : comparer!.GetHashCode(key)); 532&& typeof(TKey).IsValueType // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 711Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null); 712var hashCode = (uint)(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? key.GetHashCode() : comparer!.GetHashCode(key)); 723(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? EqualityComparer<TKey>.Default.Equals(entry._key, key) : comparer!.Equals(entry._key, key))) 788Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null); 789var hashCode = (uint)(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? key.GetHashCode() : comparer!.GetHashCode(key)); 800(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? EqualityComparer<TKey>.Default.Equals(entry._key, key) : comparer!.Equals(entry._key, key)))
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\Segmented\SegmentedHashSet`1.cs (5)
85if (!typeof(T).IsValueType) 233typeof(T).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 302Debug.Assert((SupportsComparerDevirtualization && typeof(T).IsValueType) || comparer is not null); 304SupportsComparerDevirtualization && typeof(T).IsValueType && comparer == null ? item!.GetHashCode() : 1035typeof(T).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types
src\msbuild\src\Shared\TaskParameter.cs (2)
146else if (wrappedParameterType.GetElementType().IsValueType 184else if (wrappedParameterType.IsValueType
src\msbuild\src\Shared\TaskParameterTypeVerifier.cs (1)
27=> parameterType.IsValueType || ValueTypeParser.IsSupportedType(parameterType);
Microsoft.Build.Framework (2)
TaskPropertyInfo.cs (1)
30IsValueTypeOutputParameter = elementType.IsValueType || elementType.FullName.Equals("System.String");
Utilities\TypeExtensions.cs (1)
50=> type.IsValueType ? Activator.CreateInstance(type) : null;
Microsoft.Build.Tasks.Core (3)
src\msbuild\src\Shared\TaskParameter.cs (2)
146else if (wrappedParameterType.GetElementType().IsValueType 184else if (wrappedParameterType.IsValueType
src\msbuild\src\Shared\TaskParameterTypeVerifier.cs (1)
27=> parameterType.IsValueType || ValueTypeParser.IsSupportedType(parameterType);
Microsoft.CodeAnalysis (19)
Binding\BindingDiagnosticBag.cs (1)
67Debug.Assert(diagnosticBag?.GetType().IsValueType != true);
Compilation\Compilation.cs (1)
562return !(info.IsValueType || info.IsPointer || info.IsByRef || info.ContainsGenericParameters);
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (12)
102if (!typeof(TKey).IsValueType) 329else if (SupportsComparerDevirtualization && typeof(TValue).IsValueType) 411&& typeof(TKey).IsValueType // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 524Debug.Assert(comparer is not null || (SupportsComparerDevirtualization && typeof(TKey).IsValueType)); 525var hashCode = (uint)((SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null) ? key.GetHashCode() : comparer!.GetHashCode(key)); 532&& typeof(TKey).IsValueType // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 711Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null); 712var hashCode = (uint)(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? key.GetHashCode() : comparer!.GetHashCode(key)); 723(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? EqualityComparer<TKey>.Default.Equals(entry._key, key) : comparer!.Equals(entry._key, key))) 788Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null); 789var hashCode = (uint)(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? key.GetHashCode() : comparer!.GetHashCode(key)); 800(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? EqualityComparer<TKey>.Default.Equals(entry._key, key) : comparer!.Equals(entry._key, key)))
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (5)
85if (!typeof(T).IsValueType) 233typeof(T).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 302Debug.Assert((SupportsComparerDevirtualization && typeof(T).IsValueType) || comparer is not null); 304SupportsComparerDevirtualization && typeof(T).IsValueType && comparer == null ? item!.GetHashCode() : 1035typeof(T).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types
Microsoft.CodeAnalysis.Analyzers (17)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (12)
102if (!typeof(TKey).IsValueType) 329else if (SupportsComparerDevirtualization && typeof(TValue).IsValueType) 411&& typeof(TKey).IsValueType // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 524Debug.Assert(comparer is not null || (SupportsComparerDevirtualization && typeof(TKey).IsValueType)); 525var hashCode = (uint)((SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null) ? key.GetHashCode() : comparer!.GetHashCode(key)); 532&& typeof(TKey).IsValueType // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 711Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null); 712var hashCode = (uint)(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? key.GetHashCode() : comparer!.GetHashCode(key)); 723(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? EqualityComparer<TKey>.Default.Equals(entry._key, key) : comparer!.Equals(entry._key, key))) 788Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null); 789var hashCode = (uint)(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? key.GetHashCode() : comparer!.GetHashCode(key)); 800(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? EqualityComparer<TKey>.Default.Equals(entry._key, key) : comparer!.Equals(entry._key, key)))
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (5)
85if (!typeof(T).IsValueType) 233typeof(T).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 302Debug.Assert((SupportsComparerDevirtualization && typeof(T).IsValueType) || comparer is not null); 304SupportsComparerDevirtualization && typeof(T).IsValueType && comparer == null ? item!.GetHashCode() : 1035typeof(T).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types
Microsoft.CodeAnalysis.AnalyzerUtilities (17)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (12)
102if (!typeof(TKey).IsValueType) 329else if (SupportsComparerDevirtualization && typeof(TValue).IsValueType) 411&& typeof(TKey).IsValueType // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 524Debug.Assert(comparer is not null || (SupportsComparerDevirtualization && typeof(TKey).IsValueType)); 525var hashCode = (uint)((SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null) ? key.GetHashCode() : comparer!.GetHashCode(key)); 532&& typeof(TKey).IsValueType // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 711Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null); 712var hashCode = (uint)(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? key.GetHashCode() : comparer!.GetHashCode(key)); 723(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? EqualityComparer<TKey>.Default.Equals(entry._key, key) : comparer!.Equals(entry._key, key))) 788Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null); 789var hashCode = (uint)(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? key.GetHashCode() : comparer!.GetHashCode(key)); 800(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? EqualityComparer<TKey>.Default.Equals(entry._key, key) : comparer!.Equals(entry._key, key)))
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (5)
85if (!typeof(T).IsValueType) 233typeof(T).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 302Debug.Assert((SupportsComparerDevirtualization && typeof(T).IsValueType) || comparer is not null); 304SupportsComparerDevirtualization && typeof(T).IsValueType && comparer == null ? item!.GetHashCode() : 1035typeof(T).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types
Microsoft.CodeAnalysis.CodeStyle (17)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (12)
102if (!typeof(TKey).IsValueType) 329else if (SupportsComparerDevirtualization && typeof(TValue).IsValueType) 411&& typeof(TKey).IsValueType // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 524Debug.Assert(comparer is not null || (SupportsComparerDevirtualization && typeof(TKey).IsValueType)); 525var hashCode = (uint)((SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null) ? key.GetHashCode() : comparer!.GetHashCode(key)); 532&& typeof(TKey).IsValueType // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 711Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null); 712var hashCode = (uint)(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? key.GetHashCode() : comparer!.GetHashCode(key)); 723(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? EqualityComparer<TKey>.Default.Equals(entry._key, key) : comparer!.Equals(entry._key, key))) 788Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null); 789var hashCode = (uint)(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? key.GetHashCode() : comparer!.GetHashCode(key)); 800(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? EqualityComparer<TKey>.Default.Equals(entry._key, key) : comparer!.Equals(entry._key, key)))
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (5)
85if (!typeof(T).IsValueType) 233typeof(T).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 302Debug.Assert((SupportsComparerDevirtualization && typeof(T).IsValueType) || comparer is not null); 304SupportsComparerDevirtualization && typeof(T).IsValueType && comparer == null ? item!.GetHashCode() : 1035typeof(T).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types
Microsoft.CodeAnalysis.Extensions.Package (17)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (12)
102if (!typeof(TKey).IsValueType) 329else if (SupportsComparerDevirtualization && typeof(TValue).IsValueType) 411&& typeof(TKey).IsValueType // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 524Debug.Assert(comparer is not null || (SupportsComparerDevirtualization && typeof(TKey).IsValueType)); 525var hashCode = (uint)((SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null) ? key.GetHashCode() : comparer!.GetHashCode(key)); 532&& typeof(TKey).IsValueType // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 711Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null); 712var hashCode = (uint)(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? key.GetHashCode() : comparer!.GetHashCode(key)); 723(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? EqualityComparer<TKey>.Default.Equals(entry._key, key) : comparer!.Equals(entry._key, key))) 788Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null); 789var hashCode = (uint)(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? key.GetHashCode() : comparer!.GetHashCode(key)); 800(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? EqualityComparer<TKey>.Default.Equals(entry._key, key) : comparer!.Equals(entry._key, key)))
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (5)
85if (!typeof(T).IsValueType) 233typeof(T).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 302Debug.Assert((SupportsComparerDevirtualization && typeof(T).IsValueType) || comparer is not null); 304SupportsComparerDevirtualization && typeof(T).IsValueType && comparer == null ? item!.GetHashCode() : 1035typeof(T).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types
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.Razor.Compiler (1)
Language\CodeGeneration\CodeWriter.WriteInterpolatedStringHandler.cs (1)
81Debug.Assert(!typeof(T).IsValueType, $"Handle {typeof(T).FullName} to avoid boxing to {nameof(IWriteableValue)}");
Microsoft.CodeAnalysis.ResxSourceGenerator (17)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (12)
102if (!typeof(TKey).IsValueType) 329else if (SupportsComparerDevirtualization && typeof(TValue).IsValueType) 411&& typeof(TKey).IsValueType // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 524Debug.Assert(comparer is not null || (SupportsComparerDevirtualization && typeof(TKey).IsValueType)); 525var hashCode = (uint)((SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null) ? key.GetHashCode() : comparer!.GetHashCode(key)); 532&& typeof(TKey).IsValueType // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 711Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null); 712var hashCode = (uint)(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? key.GetHashCode() : comparer!.GetHashCode(key)); 723(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? EqualityComparer<TKey>.Default.Equals(entry._key, key) : comparer!.Equals(entry._key, key))) 788Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null); 789var hashCode = (uint)(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? key.GetHashCode() : comparer!.GetHashCode(key)); 800(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? EqualityComparer<TKey>.Default.Equals(entry._key, key) : comparer!.Equals(entry._key, key)))
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (5)
85if (!typeof(T).IsValueType) 233typeof(T).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 302Debug.Assert((SupportsComparerDevirtualization && typeof(T).IsValueType) || comparer is not null); 304SupportsComparerDevirtualization && typeof(T).IsValueType && comparer == null ? item!.GetHashCode() : 1035typeof(T).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types
Microsoft.CodeAnalysis.VisualBasic (1)
Preprocessor\ExpressionEvaluator.vb (1)
547If value.GetType().GetTypeInfo().IsValueType Then
Microsoft.CodeAnalysis.Workspaces (17)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (12)
102if (!typeof(TKey).IsValueType) 329else if (SupportsComparerDevirtualization && typeof(TValue).IsValueType) 411&& typeof(TKey).IsValueType // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 524Debug.Assert(comparer is not null || (SupportsComparerDevirtualization && typeof(TKey).IsValueType)); 525var hashCode = (uint)((SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null) ? key.GetHashCode() : comparer!.GetHashCode(key)); 532&& typeof(TKey).IsValueType // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 711Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null); 712var hashCode = (uint)(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? key.GetHashCode() : comparer!.GetHashCode(key)); 723(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? EqualityComparer<TKey>.Default.Equals(entry._key, key) : comparer!.Equals(entry._key, key))) 788Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null); 789var hashCode = (uint)(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? key.GetHashCode() : comparer!.GetHashCode(key)); 800(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? EqualityComparer<TKey>.Default.Equals(entry._key, key) : comparer!.Equals(entry._key, key)))
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (5)
85if (!typeof(T).IsValueType) 233typeof(T).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 302Debug.Assert((SupportsComparerDevirtualization && typeof(T).IsValueType) || comparer is not null); 304SupportsComparerDevirtualization && typeof(T).IsValueType && comparer == null ? item!.GetHashCode() : 1035typeof(T).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types
Microsoft.CSharp (11)
Microsoft\CSharp\RuntimeBinder\BinderHelper.cs (2)
272if (binding.Type.IsValueType && !action.ReturnType.IsValueType)
Microsoft\CSharp\RuntimeBinder\ComInterop\ComBinder.cs (1)
46if (result.Expression.Type.IsValueType)
Microsoft\CSharp\RuntimeBinder\ComInterop\ComBinderHelpers.cs (1)
22if (type.IsValueType
Microsoft\CSharp\RuntimeBinder\ComInterop\ComInvokeBinder.cs (1)
128Type marshalType = (mo.Value == null && mo.HasValue && !mo.LimitType.IsValueType) ? null : mo.LimitType;
Microsoft\CSharp\RuntimeBinder\ComInterop\TypeUtils.cs (3)
36if (!dest.IsValueType && !src.IsValueType && AreAssignable(dest, src)) 260if (source.IsValueType && (destination == typeof(object) || destination == typeof(System.ValueType)))
Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs (2)
730if (arguments[0].Type.IsValueType && callingObject is ExprCast) 1146if (argument.Type.IsValueType && callingObject is ExprCast)
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (1)
882else if (type.IsValueType)
Microsoft.Extensions.AI.Abstractions (6)
parent\parent\parent\eng\MSBuild\parent\parent\src\LegacySupport\NullabilityInfoContext\NullabilityInfoContext.cs (4)
348if (underlyingType.IsValueType) 573return type.IsValueType ? 0 : 1; 628type.IsValueType || ((type.IsByRef || type.IsPointer) && type.GetElementType()!.IsValueType);
Utilities\AIJsonUtilities.Schema.Create.cs (2)
360!ctx.TypeInfo.Type.IsValueType && 936return parameterType.IsValueType && Nullable.GetUnderlyingType(parameterType) is null
Microsoft.Extensions.Caching.Hybrid (3)
Internal\ImmutableTypeCache.cs (2)
54if (type.IsValueType) 63if (type.IsValueType || (type.IsClass & type.IsSealed))
Internal\ImmutableTypeCache.T.cs (1)
14public static readonly bool IsImmutable = (typeof(T).IsValueType && ImmutableTypeCache.IsBlittable<T>()) || ImmutableTypeCache.IsTypeImmutable(typeof(T));
Microsoft.Extensions.Configuration.Binder (5)
BindingPoint.cs (1)
48&& initialValueType.IsValueType
ConfigurationBinder.cs (3)
569type.IsValueType || constructors.Any(ctor => ctor.GetParameters().Length == 0); 571if (!type.IsValueType && constructors.Length == 0) 1072=> !type.IsValueType || (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>));
src\runtime\src\libraries\Common\src\Extensions\ParameterDefaultValue\ParameterDefaultValue.cs (1)
34if (defaultValue == null && parameter.ParameterType.IsValueType
Microsoft.Extensions.DependencyInjection (12)
ServiceLookup\CallSiteFactory.cs (2)
275if (!ServiceProvider.IsDynamicCodeSupported && itemType.IsValueType) 833if (typeArg.IsValueType)
ServiceLookup\CallSiteRuntimeResolver.cs (1)
203Debug.Assert(ServiceProvider.IsDynamicCodeSupported || !elementType.IsValueType, "When dynamic code isn't supported, building the IEnumerableCallSite will throw if elementType is a ValueType.");
ServiceLookup\Expressions\ExpressionResolverBuilder.cs (4)
118Debug.Assert(ServiceProvider.IsDynamicCodeSupported || !elementType.IsValueType, "When dynamic code isn't supported, building the IEnumerableCallSite will throw if elementType is a ValueType."); 127Debug.Assert(ServiceProvider.IsDynamicCodeSupported || !elementType.IsValueType, "When dynamic code isn't supported, building the IEnumerableCallSite will throw if elementType is a ValueType."); 184if (callSite.ImplementationType!.IsValueType) 195&& (!expression.Type.IsValueType || !forceValueTypeConversion))
ServiceLookup\IEnumerableCallSite.cs (1)
18Debug.Assert(ServiceProvider.IsDynamicCodeSupported || !itemType.IsValueType, "When dynamic code isn't supported, an IEnumerableCallSite should not be created with a ValueType.");
ServiceLookup\ILEmit\ILEmitResolverBuilder.cs (3)
152if (parameterCallSite.ServiceType.IsValueType) 159if (constructorCallSite.ImplementationType!.IsValueType) 229if (parameterCallSite.ServiceType.IsValueType)
src\runtime\src\libraries\Common\src\Extensions\ParameterDefaultValue\ParameterDefaultValue.cs (1)
34if (defaultValue == null && parameter.ParameterType.IsValueType
Microsoft.Extensions.DependencyInjection.Abstractions (2)
EmptyServiceProvider.cs (1)
135if (!IsDynamicCodeSupported && itemType.IsValueType)
src\runtime\src\libraries\Common\src\Extensions\ParameterDefaultValue\ParameterDefaultValue.cs (1)
34if (defaultValue == null && parameter.ParameterType.IsValueType
Microsoft.Extensions.Features (1)
FeatureCollection.cs (1)
123if (typeof(TFeature).IsValueType)
Microsoft.Extensions.Identity.Core (2)
IdentityBuilder.cs (2)
25if (user.IsValueType) 42if (role.IsValueType)
Microsoft.Extensions.Telemetry.Abstractions (2)
Logging\LoggerMessageHelper.cs (2)
101if (typeof(TKey).IsValueType || kvp.Key is not null) 114if (typeof(TValue).IsValueType || kvp.Value is not null)
Microsoft.Extensions.VectorData.Abstractions (1)
ProviderServices\PropertyModel.cs (1)
79if (Type.IsValueType)
Microsoft.Extensions.VectorData.ConformanceTests (2)
TypeTests\DataTypeTests.cs (2)
226if (property.PropertyType.IsValueType) 334var t when t.IsValueType => Activator.CreateInstance(t),
Microsoft.Maui.Controls (7)
BindableProperty.cs (2)
92 if (defaultValue == null && Nullable.GetUnderlyingType(returnType) == null && returnType.IsValueType) 213 return !returnType.IsValueType || returnType.IsGenericType && returnType.GetGenericTypeDefinition() == typeof(Nullable<>);
BindingExpression.cs (1)
420 if (part.NextPart != null && propertyType.IsGenericType && propertyType.IsValueType)
BindingExpressionHelper.cs (1)
15 return !convertTo.GetTypeInfo().IsValueType || Nullable.GetUnderlyingType(convertTo) != null;
Command.cs (1)
59 return !t.IsValueType;
PlatformBindingHelpers.cs (1)
66 defaultValue = defaultValue ?? (propertyType.IsValueType ? Activator.CreateInstance(propertyType) : null);
TypeConversionHelper.cs (1)
24 return !targetType.IsValueType || targetType.IsGenericType && targetType.GetGenericTypeDefinition() == typeof(Nullable<>);
Microsoft.Maui.Controls.Xaml (8)
ApplyPropertiesVisitor.cs (4)
406 if (value != null && !value.GetType().IsValueType && XamlFilePathAttribute.GetFilePathForObject(rootElement) is string path) 414 if (value != null && !value.GetType().IsValueType && XamlFilePathAttribute.GetFilePathForObject(rootElement) is string path) 422 if (value != null && !value.GetType().IsValueType && XamlFilePathAttribute.GetFilePathForObject(rootElement) is string path) 611 if ((convertedValue == null && (!property.ReturnType.IsValueType || nullable)) ||
CreateValuesVisitor.cs (2)
172 if (assemblyName != null && value != null && !value.GetType().IsValueType && XamlFilePathAttribute.GetFilePathForObject(Context.RootElement) is string path) 191 if (rnode.Root != null && !rnode.Root.GetType().IsValueType && XamlFilePathAttribute.GetFilePathForObject(Context.RootElement) is string path)
MarkupExtensions\OnIdiomExtension.cs (1)
63 if (value == null && propertyType.IsValueType)
MarkupExtensions\OnPlatformExtension.cs (1)
83 if (propertyType.IsValueType)
Microsoft.ML.Core (1)
EntryPoints\EntryPointUtils.cs (1)
78equalToDefault = fieldType.IsValueType ? Activator.CreateInstance(fieldType).Equals(fieldVal) : fieldVal == null;
Microsoft.ML.EntryPoints (2)
JsonUtils\ExecuteGraphCommand.cs (2)
171if (ipmArray != null && !ipmArray.GetType().IsValueType) 178if (idvArray != null && !idvArray.GetType().IsValueType)
Microsoft.ML.Transforms (1)
MissingValueReplacing.cs (1)
384if (rawType.IsValueType)
Microsoft.Private.Windows.Core (1)
System\Value.cs (1)
742else if (typeof(T).IsValueType)
Microsoft.VisualBasic.Core (6)
Microsoft\VisualBasic\CompilerServices\LateBinding.vb (2)
228If RValueBase AndAlso objType.IsValueType Then 722If RValueBase AndAlso o.GetType().IsValueType Then
Microsoft\VisualBasic\CompilerServices\NewLateBinding.vb (1)
948If RValueBase And Type.IsValueType Then
Microsoft\VisualBasic\CompilerServices\ObjectFlowControl.vb (1)
25If Expression IsNot Nothing AndAlso Expression.GetType.IsValueType() Then
Microsoft\VisualBasic\CompilerServices\VB6RandomFile.vb (2)
499ElseIf typ.IsValueType() AndAlso Not ContainedInVariant Then 502ElseIf ContainedInVariant AndAlso typ.IsValueType Then
Microsoft.VisualStudio.TestPlatform.ObjectModel (2)
TestObject.cs (1)
110if (valueType != null && valueType.IsValueType)
TestProperty\TestProperty.cs (1)
64else if (valueType.IsValueType)
Mono.Cecil (1)
Mono.Cecil\Import.cs (1)
190 type.IsValueType);
MSBuild (3)
src\msbuild\src\Shared\TaskParameter.cs (2)
146else if (wrappedParameterType.GetElementType().IsValueType 184else if (wrappedParameterType.IsValueType
src\msbuild\src\Shared\TaskParameterTypeVerifier.cs (1)
27=> parameterType.IsValueType || ValueTypeParser.IsSupportedType(parameterType);
PresentationBuildTasks (2)
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (2)
3007parentType.IsValueType)) 3284parentType.IsValueType))
PresentationCore (7)
MS\Internal\Ink\ExtendedProperty.cs (4)
56elementType1.IsValueType && 58elementType2.IsValueType && 180if (type.IsValueType || type == typeof(string)) 190if (elementType.IsValueType && type.GetArrayRank() == 1)
System\Windows\Diagnostics\XamlSourceInfoHelper.cs (1)
113if (obj is string || obj.GetType().IsValueType)
System\Windows\Media\Imaging\WriteableBitmap.cs (2)
390if (elementType == null || !elementType.IsValueType) 486if (elementType == null || !elementType.IsValueType)
PresentationFramework (14)
MS\Internal\Data\DefaultValueConverter.cs (3)
323(o == null && !destinationType.IsValueType))) 576if (o == null && !_sourceType.IsValueType) 618(o == null && !_targetType.IsValueType))
MS\Internal\Data\DynamicValueConverter.cs (2)
50if (!targetType.IsValueType) 75if (!sourceType.IsValueType)
MS\Internal\WeakHashtable.cs (2)
53Debug.Assert(!key.GetType().IsValueType, "WeakHashtable doesn't support value-type keys. Use WeakObjectHashtable instead."); 235if (tKey == typeof(Object) || tKey.IsValueType)
MS\Internal\WeakObjectHashtable.cs (1)
50if (key != null && !key.GetType().IsValueType)
MS\Internal\WindowsRuntime\Generated\WinRT\GuidGenerator.cs (1)
51if (type.IsValueType)
MS\Internal\WindowsRuntime\Generated\WinRT\Marshalers.cs (1)
1018else if (type.IsValueType || type == typeof(Type))
MS\Internal\WindowsRuntime\Generated\WinRT\Projections.cs (1)
159if (argumentCovariant && !genericArguments[i].IsValueType)
System\Windows\Automation\Peers\ItemAutomationPeer.cs (1)
653if (value != null && !value.GetType().IsValueType &&
System\Windows\Data\BindingExpressionBase.cs (1)
1603if (!type.IsValueType)
System\Windows\TemplateContent.cs (1)
1177(type != null && type.IsValueType))
Roslyn.Diagnostics.Analyzers (17)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (12)
102if (!typeof(TKey).IsValueType) 329else if (SupportsComparerDevirtualization && typeof(TValue).IsValueType) 411&& typeof(TKey).IsValueType // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 524Debug.Assert(comparer is not null || (SupportsComparerDevirtualization && typeof(TKey).IsValueType)); 525var hashCode = (uint)((SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null) ? key.GetHashCode() : comparer!.GetHashCode(key)); 532&& typeof(TKey).IsValueType // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 711Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null); 712var hashCode = (uint)(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? key.GetHashCode() : comparer!.GetHashCode(key)); 723(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? EqualityComparer<TKey>.Default.Equals(entry._key, key) : comparer!.Equals(entry._key, key))) 788Debug.Assert((SupportsComparerDevirtualization && typeof(TKey).IsValueType) || comparer is not null); 789var hashCode = (uint)(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? key.GetHashCode() : comparer!.GetHashCode(key)); 800(SupportsComparerDevirtualization && typeof(TKey).IsValueType && comparer == null ? EqualityComparer<TKey>.Default.Equals(entry._key, key) : comparer!.Equals(entry._key, key)))
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (5)
85if (!typeof(T).IsValueType) 233typeof(T).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 302Debug.Assert((SupportsComparerDevirtualization && typeof(T).IsValueType) || comparer is not null); 304SupportsComparerDevirtualization && typeof(T).IsValueType && comparer == null ? item!.GetHashCode() : 1035typeof(T).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types
System.Collections (9)
System\Collections\Generic\OrderedDictionary.cs (7)
115if (!typeof(TKey).IsValueType) 560if (typeof(TValue).IsValueType) 635if (typeof(TKey).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 825if (typeof(TKey).IsValueType && _comparer is null) 1066if (!typeof(TKey).IsValueType && 1081Debug.Assert(!forceNewHashCodes || !typeof(TKey).IsValueType, "Value types never rehash."); 1104if (!typeof(TKey).IsValueType && forceNewHashCodes)
System\Collections\Generic\PriorityQueue.cs (2)
885if (typeof(TElement).IsValueType && equalityComparer == EqualityComparer<TElement>.Default) 914if (typeof(TPriority).IsValueType)
System.Collections.Concurrent (1)
System\Collections\Concurrent\PartitionerStatic.cs (1)
1647if (typeof(TSource).IsValueType)
System.Collections.Immutable (9)
System\Collections\Frozen\FrozenDictionary.cs (1)
168if (typeof(TKey).IsValueType && ReferenceEquals(comparer, EqualityComparer<TKey>.Default))
System\Collections\Frozen\FrozenSet.cs (1)
104if (typeof(T).IsValueType && ReferenceEquals(comparer, EqualityComparer<T>.Default))
System\Collections\Frozen\SmallValueTypeComparableFrozenDictionary.cs (1)
28Debug.Assert(typeof(TKey).IsValueType);
System\Collections\Frozen\SmallValueTypeComparableFrozenSet.cs (1)
27Debug.Assert(typeof(T).IsValueType);
System\Collections\Frozen\SmallValueTypeDefaultComparerFrozenDictionary.cs (1)
21Debug.Assert(typeof(TKey).IsValueType);
System\Collections\Frozen\SmallValueTypeDefaultComparerFrozenSet.cs (1)
19Debug.Assert(typeof(T).IsValueType);
System\Collections\Frozen\ValueTypeDefaultComparerFrozenDictionary.cs (1)
18Debug.Assert(typeof(TKey).IsValueType);
System\Collections\Frozen\ValueTypeDefaultComparerFrozenSet.cs (1)
15Debug.Assert(typeof(T).IsValueType);
System\Collections\Immutable\ImmutableExtensions.cs (1)
20return typeof(T).IsValueType;
System.ComponentModel.Annotations (3)
System\ComponentModel\DataAnnotations\CustomValidationAttribute.cs (1)
310if (expectedValueType.IsValueType
System\ComponentModel\DataAnnotations\EnumDataTypeAttribute.cs (1)
50if (!valueType.IsValueType && valueType != typeof(string))
System\ComponentModel\DataAnnotations\Validator.cs (1)
969return !destinationType.IsValueType ||
System.ComponentModel.Composition (9)
Microsoft\Internal\GenerationServices.cs (2)
250if (GenerationServices.IsBoxingRequiredForValue(value) && !elementType.IsValueType) 269return value.GetType().IsValueType;
System\ComponentModel\Composition\Hosting\CompositionServices.cs (1)
431else if (_containsNulls && _arrayType.IsValueType)
System\ComponentModel\Composition\MetadataViewGenerator.cs (2)
158if ((defaultAttribute.Value != null) && (defaultAttribute.Value.GetType().IsValueType)) 170IL.Emit(field.FieldType.IsValueType ? OpCodes.Unbox_Any : OpCodes.Castclass, field.FieldType);
System\ComponentModel\Composition\Primitives\ContractBasedImportDefinition.cs (1)
342if (metadataValueType.IsValueType)
System\ComponentModel\Composition\ReflectionModel\GenericServices.cs (3)
171if (type.IsValueType) 181if (!type.IsValueType && ((type.GetConstructor(Type.EmptyTypes) == null) || type.IsAbstract)) 191if (!type.IsValueType)
System.Configuration.ConfigurationManager (3)
System\Configuration\ConfigurationProperty.cs (2)
30else if (type.IsValueType) 317else if (Type.IsValueType)
System\Configuration\SettingsPropertyValue.cs (1)
128if (Property.PropertyType.IsValueType)
System.Data.Common (3)
System\Data\Common\DataStorage.cs (2)
462result = dataType.IsValueType; 465Debug.Assert(result == dataType.IsValueType, "typeCode mismatches dataType");
System\Data\DataRowExtensions.cs (1)
149if (typeof(T).IsValueType && default(T) == null)
System.Diagnostics.DiagnosticSource (4)
System\Diagnostics\DsesFilterAndTransform.cs (4)
798if (!RuntimeFeature.IsDynamicCodeSupported && elemType.IsValueType) 813if (!RuntimeFeature.IsDynamicCodeSupported && (propertyInfo.DeclaringType!.IsValueType || propertyInfo.PropertyType.IsValueType)) 818Type typedPropertyFetcher = type.IsValueType ?
System.Drawing.Common (1)
System\Drawing\Font.cs (1)
287if (!type.IsValueType)
System.Linq (6)
System\Linq\Contains.cs (1)
53if (typeof(TSource).IsValueType)
System\Linq\OfType.SpeedOpt.cs (1)
151if (!typeof(TResult).IsValueType && _source is IEnumerable<object> objectSource)
System\Linq\OrderedEnumerable.cs (3)
446Debug.Assert(typeof(TKey).IsValueType); 462Debug.Assert(typeof(TKey).IsValueType); 482if (typeof(TKey).IsValueType && _next is null && _comparer == Comparer<TKey>.Default)
System\Linq\Select.cs (1)
33if (IsSizeOptimized && typeof(TResult).IsValueType)
System.Linq.AsyncEnumerable (3)
System\Linq\OrderBy.cs (3)
379if (typeof(TKey).IsValueType && _next is null && _comparer == Comparer<TKey>.Default) 389Debug.Assert(typeof(TKey).IsValueType); 405Debug.Assert(typeof(TKey).IsValueType);
System.Linq.Expressions (110)
System\Dynamic\DynamicMetaObject.cs (1)
82if (ct.IsValueType)
System\Dynamic\DynamicObject.cs (1)
595if (binder.ReturnType.IsValueType && Nullable.GetUnderlyingType(binder.ReturnType) == null)
System\Dynamic\Utils\TypeUtils.cs (18)
28if (type.IsValueType && !IsNullableType(type)) 46if (!type.IsValueType || IsNullableType(type)) 102public static bool IsNullableOrReferenceType(this Type type) => !type.IsValueType || IsNullableType(type); 247if (instanceType.IsValueType) 378if (source.IsValueType | dest.IsValueType) 582else if (IsContravariant(genericParameter) && (sourceArgument.IsValueType || destArgument.IsValueType)) 622if (left.IsValueType || right.IsValueType) 641if (left.IsInterface && !right.IsValueType) 646if (right.IsInterface && !left.IsValueType) 653if (!left.IsValueType && !right.IsValueType) 670Debug.Assert(left.IsValueType); 860source.IsValueType && (destination == typeof(object) || destination == typeof(ValueType)) || source.IsEnum && destination == typeof(Enum); 924return !dest.IsValueType && !src.IsValueType && dest.IsAssignableFrom(src);
System\Linq\Expressions\BinaryExpression.cs (6)
360method == null && !left.IsValueType && !right.IsValueType; 616if (method != null && method.ReturnType.IsValueType && !method.ReturnType.IsNullableType()) 648method.ReturnType.IsValueType && !method.ReturnType.IsNullableType()) 1387if (left.Type.IsValueType && !left.Type.IsNullableType()) 1426if (left.IsValueType && !left.IsNullableType())
System\Linq\Expressions\Common\ConstantCheck.cs (1)
84if (operandType.IsValueType && !operandType.IsNullableType())
System\Linq\Expressions\Compiler\BoundConstants.cs (1)
192if (type.IsValueType)
System\Linq\Expressions\Compiler\ILGen.cs (13)
100if (type.IsValueType) 147if (type.IsValueType) 165if (!type.IsValueType) 244if (type.IsValueType) 601if (typeFrom.IsValueType) 603Debug.Assert(!typeTo.IsValueType); 612il.Emit(typeTo.IsValueType ? OpCodes.Unbox_Any : OpCodes.Castclass, typeTo); 835if (typeTo.IsValueType) 846Debug.Assert(typeTo.IsValueType); 884Debug.Assert(nullableType.IsValueType); 893Debug.Assert(nullableType.IsValueType); 902Debug.Assert(nullableType.IsValueType); 1065if (type.IsValueType)
System\Linq\Expressions\Compiler\LambdaCompiler.Address.cs (2)
210Debug.Assert(type.IsValueType); 379Type instanceLocalType = type.IsValueType ? type.MakeByRefType() : type;
System\Linq\Expressions\Compiler\LambdaCompiler.Binary.cs (1)
152Debug.Assert(leftType.IsPrimitive || (op == ExpressionType.Equal || op == ExpressionType.NotEqual) && (!leftType.IsValueType || leftType.IsEnum));
System\Linq\Expressions\Compiler\LambdaCompiler.Expressions.cs (18)
381if (obj != null && obj.Type.IsValueType) 405if (callOp == OpCodes.Callvirt && objectType!.IsValueType) 459if (callOp == OpCodes.Callvirt && objectType!.IsValueType) 492if (mi.DeclaringType!.IsValueType) 636Debug.Assert(node.Type.IsValueType, "Only value type may have constructor not set."); 681Debug.Assert(!type.IsValueType); 692if (type.IsValueType) 882Debug.Assert(type!.IsValueType); 886else if (type.IsValueType) 974if (binding.Member is PropertyInfo && type.IsValueType) 978if (type.IsValueType) 992if (binding.Member is PropertyInfo && type.IsValueType) 996if (type.IsValueType) 1011if (init.NewExpression.Type.IsValueType && init.Bindings.Count > 0) 1055if (init.NewExpression.Type.IsValueType) 1149if (!arg.Type.IsValueType) 1171if (resultType.IsValueType) 1239if (!arg.Type.IsValueType)
System\Linq\Expressions\Compiler\LambdaCompiler.Logical.cs (5)
97Debug.Assert(!b.Left.Type.IsValueType); 216if (b.Right.Type.IsValueType) 226Debug.Assert(!b.Left.Type.IsValueType); 544Debug.Assert(!node.Right.Type.IsValueType); 558Debug.Assert(!node.Left.Type.IsValueType);
System\Linq\Expressions\Compiler\LambdaCompiler.Unary.cs (4)
222if (operandType.IsValueType) 274Debug.Assert(node.Type.IsValueType); 306if (node.IsLifted && (!node.Type.IsValueType || !node.Operand.Type.IsValueType))
System\Linq\Expressions\Compiler\StackSpiller.Bindings.cs (3)
49if (_binding.Member is PropertyInfo property && property.PropertyType.IsValueType) 113if (memberTemp.Type.IsValueType) 199if (memberTemp.Type.IsValueType)
System\Linq\Expressions\Compiler\StackSpiller.cs (1)
1089return instance != null && instance.Type.IsValueType && instance.Type.GetTypeCode() == TypeCode.Object;
System\Linq\Expressions\ConstantExpression.cs (1)
106if (!type.IsValueType || type.IsNullableType())
System\Linq\Expressions\ExpressionVisitor.cs (2)
688if (before.IsValueType) 696else if (!after.IsValueType)
System\Linq\Expressions\Interpreter\CallInstruction.cs (1)
54if (!info.IsStatic && info.DeclaringType!.IsValueType)
System\Linq\Expressions\Interpreter\CallInstruction.Generated.cs (3)
49if (t != typeof(object) && (IndexIsNotReturnType(0, target, pi) || t.IsValueType)) 93if (t != typeof(object) && (IndexIsNotReturnType(1, target, pi) || t.IsValueType)) 138if (t.IsValueType) goto default;
System\Linq\Expressions\Interpreter\DefaultValueInstruction.cs (1)
17Debug.Assert(type.IsValueType);
System\Linq\Expressions\Interpreter\InstructionList.cs (2)
352if (type == null || type.IsValueType) 582else if (type.IsValueType)
System\Linq\Expressions\Interpreter\LightCompiler.cs (14)
448return type.IsValueType && !type.IsEnum && !type.IsPrimitive; 979Debug.Assert(IsNullComparison(left, right) || left.Type == right.Type || !left.Type.IsValueType && !right.Type.IsValueType); 989Debug.Assert(IsNullComparison(left, right) || left.Type == right.Type || !left.Type.IsValueType && !right.Type.IsValueType); 1069if (!operandType.IsValueType || operandType.IsNullableType() && node.IsLiftedToNull) 1122if (typeFrom.IsValueType && 1130if (typeTo.IsValueType && 2245if (node.Type.IsValueType) 2445Debug.Assert(type.IsValueType); 2650else if (node.Right.Type.IsValueType && !TypeUtils.AreEquivalent(node.Type, node.Right.Type)) 2765if (memberMember.Member is PropertyInfo && type.IsValueType) 2911if (node.Type.IsValueType && !node.Type.IsNullableType()) 2971if (node.TypeOperand.IsValueType)
System\Linq\Expressions\Interpreter\LocalAccess.cs (2)
377Debug.Assert(type.IsValueType, "MutableValue only supports value types."); 416Debug.Assert(type.IsValueType, "MutableBox only supports value types.");
System\Linq\Expressions\Interpreter\TypeOperations.cs (2)
153Debug.Assert(mi.ReturnType.IsValueType, "Nullable is only allowed on value types."); 288if (t.IsValueType && !t.IsNullableType())
System\Linq\Expressions\NewExpression.cs (1)
212if (!type.IsValueType)
System\Linq\Expressions\TypeBinaryExpression.cs (1)
53if (cType.IsValueType || TypeOperand.IsPointer)
System\Linq\Expressions\UnaryExpression.cs (5)
372if (method != null && method.ReturnType.IsValueType && !method.ReturnType.IsNullableType()) 395method.ReturnType.IsValueType && !method.ReturnType.IsNullableType()) 695if (type.IsValueType && !type.IsNullableType()) 717if (!type.IsValueType) throw Error.InvalidUnboxType(nameof(type)); 887if (value.Type.IsValueType) throw Error.ArgumentMustNotHaveValueType(nameof(value));
System.Linq.Parallel (1)
System\Linq\Parallel\Scheduling\Scheduling.cs (1)
76if (typeof(T).IsValueType)
System.Numerics.Tensors (2)
System\Numerics\Tensors\netcore\TensorPrimitives.HammingDistance.cs (1)
176else if (typeof(T).IsValueType)
System\ThrowHelper.cs (1)
40if ((array is not null) && !typeof(T).IsValueType && (array.GetType() != typeof(T[])))
System.Private.CoreLib (109)
Internal\Reflection\Augments\ReflectionAugments.cs (1)
423if (i < (flds.Length - 1) && !fieldType.IsValueType)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Array.cs (2)
1478if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 1508if (!typeof(T).IsValueType && array.GetType() != typeof(T[]))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentDictionary.cs (14)
200if (typeof(TKey).IsValueType) 303if (typeof(TKey).IsValueType) 323if (typeof(TKey).IsValueType) 527if (typeof(TKey).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 562if (typeof(TKey).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 675if (!typeof(TValue).IsValueType || ConcurrentDictionaryTypeProps<TValue>.IsWriteAtomic) 973if (!typeof(TValue).IsValueType || ConcurrentDictionaryTypeProps<TValue>.IsWriteAtomic) 998if (!typeof(TKey).IsValueType) // this is only relevant to strings, and we can avoid this code for all value types 1022if (!typeof(TKey).IsValueType && 2273Debug.Assert(typeof(TKey).IsValueType || comparer is not null); 2433if (!typeof(TValue).IsValueType || ConcurrentDictionaryTypeProps<TValue>.IsWriteAtomic) 2458if (!typeof(TKey).IsValueType) // this is only relevant to strings, and we can avoid this code for all value types 2488if (!typeof(TKey).IsValueType && 2663if (!typeof(T).IsValueType ||
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (20)
65if (!typeof(TKey).IsValueType) 313else if (typeof(TValue).IsValueType) 409if (typeof(TKey).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 526Debug.Assert(comparer is not null || typeof(TKey).IsValueType); 527uint hashCode = (uint)((typeof(TKey).IsValueType && comparer == null) ? key.GetHashCode() : comparer!.GetHashCode(key)); 533if (typeof(TKey).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 629if (!typeof(TKey).IsValueType && collisionCount > HashHelpers.HashCollisionThreshold && comparer is NonRandomizedStringEqualityComparer) 1039if (!typeof(TKey).IsValueType && collisionCount > HashHelpers.HashCollisionThreshold && comparer is NonRandomizedStringEqualityComparer) 1091Debug.Assert(comparer is not null || typeof(TKey).IsValueType); 1092uint hashCode = (uint)((typeof(TKey).IsValueType && comparer == null) ? key.GetHashCode() : comparer!.GetHashCode(key)); 1098if (typeof(TKey).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 1176if (!typeof(TKey).IsValueType && collisionCount > HashHelpers.HashCollisionThreshold && comparer is NonRandomizedStringEqualityComparer) 1251Debug.Assert(!forceNewHashCodes || !typeof(TKey).IsValueType); 1260if (!typeof(TKey).IsValueType && forceNewHashCodes) 1310Debug.Assert(typeof(TKey).IsValueType || comparer is not null); 1311uint hashCode = (uint)(typeof(TKey).IsValueType && comparer == null ? key.GetHashCode() : comparer!.GetHashCode(key)); 1318if (typeof(TKey).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 1436Debug.Assert(typeof(TKey).IsValueType || comparer is not null); 1437uint hashCode = (uint)(typeof(TKey).IsValueType && comparer == null ? key.GetHashCode() : comparer!.GetHashCode(key)); 1444if (typeof(TKey).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\HashSet.cs (9)
64if (!typeof(T).IsValueType) 230if (typeof(T).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 303Debug.Assert(typeof(T).IsValueType || comparer is not null); 305typeof(T).IsValueType && comparer == null ? item!.GetHashCode() : 528if (!typeof(T).IsValueType && collisionCount > HashHelpers.HashCollisionThreshold && comparer is NonRandomizedStringEqualityComparer) 1297Debug.Assert(!forceNewHashCodes || !typeof(T).IsValueType); 1306if (!typeof(T).IsValueType && forceNewHashCodes) 1436if (typeof(T).IsValueType && // comparer can only be null for value types; enable JIT to eliminate entire if block for ref types 1519if (!typeof(T).IsValueType && collisionCount > HashHelpers.HashCollisionThreshold && comparer is NonRandomizedStringEqualityComparer)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Convert.cs (1)
234if (conversionType.IsValueType)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (1)
2139|| (arg == null && (pType.IsValueType && !(pType.IsGenericType && pType.GetGenericTypeDefinition() == typeof(Nullable<>))))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\PropertyValue.cs (2)
181if (property.DeclaringType!.IsValueType) 241if (!type.IsValueType)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Memory.cs (3)
44if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 62if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 94if (!typeof(T).IsValueType && array.GetType() != typeof(T[]))
src\runtime\src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (22)
34if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 56if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 83if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 860if (typeof(T).IsValueType && (comparer is null || comparer == EqualityComparer<T>.Default)) 976if (typeof(T).IsValueType && (comparer is null || comparer == EqualityComparer<T>.Default)) 1086if (typeof(T).IsValueType && (comparer is null || comparer == EqualityComparer<T>.Default)) 1438if (typeof(T).IsValueType && (comparer is null || comparer == EqualityComparer<T>.Default)) 1554if (typeof(T).IsValueType && (comparer is null || comparer == EqualityComparer<T>.Default)) 1664if (typeof(T).IsValueType && (comparer is null || comparer == EqualityComparer<T>.Default)) 2251if (typeof(T).IsValueType && (comparer is null || comparer == EqualityComparer<T>.Default)) 2451if (typeof(T).IsValueType && (comparer is null || comparer == EqualityComparer<T>.Default)) 2703if (typeof(T).IsValueType && (comparer is null || comparer == EqualityComparer<T>.Default)) 2806if (typeof(T).IsValueType && (comparer is null || comparer == EqualityComparer<T>.Default)) 3123if (typeof(T).IsValueType && (comparer is null || comparer == EqualityComparer<T>.Default)) 3227if (typeof(T).IsValueType && (comparer is null || comparer == EqualityComparer<T>.Default)) 3490if (typeof(T).IsValueType) 4348if (typeof(TComparer).IsValueType) 4424if (typeof(TComparer).IsValueType) 4539if (typeof(T).IsValueType && (comparer is null || comparer == EqualityComparer<T>.Default)) 4738if (typeof(T).IsValueType && (comparer is null || comparer == EqualityComparer<T>.Default)) 4987if (typeof(T).IsValueType && (comparer is null || comparer == EqualityComparer<T>.Default)) 5475if (typeof(T).IsValueType && (comparer is null || comparer == EqualityComparer<T>.Default))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\IBinaryInteger.cs (4)
270if (!typeof(TSelf).IsValueType) 297if (!typeof(TSelf).IsValueType) 409if (!typeof(TSelf).IsValueType) 424if (!typeof(TSelf).IsValueType)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilderInstantiation.cs (1)
236protected override bool IsValueTypeImpl() { return _genericType.IsValueType; }
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\ModifiedType.cs (1)
181protected override bool IsValueTypeImpl() => _unmodifiedType.IsValueType;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\NullabilityInfoContext.cs (4)
350if (underlyingType.IsValueType) 581return type.IsValueType ? 0 : 1; 634type.IsValueType || ((type.IsByRef || type.IsPointer) && type.GetElementType()!.IsValueType);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureConstructedGenericType.cs (1)
56protected sealed override bool IsValueTypeImpl() => _genericTypeDefinition.IsValueType;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureModifiedType.cs (1)
60protected override bool IsValueTypeImpl() => _unmodifiedType.IsValueType;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\TypeDelegator.cs (1)
152protected override bool IsValueTypeImpl() => typeImpl.IsValueType;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\Unsafe.cs (2)
271if (sizeof(TFrom) != sizeof(TTo) || !typeof(TFrom).IsValueType || !typeof(TTo).IsValueType)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\MemoryMarshal.cs (1)
651if (!typeof(T).IsValueType && array.GetType() != typeof(T[]))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Span.cs (2)
49if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 78if (!typeof(T).IsValueType && array.GetType() != typeof(T[]))
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.T.cs (2)
686if (typeof(T).IsValueType) 1132if (typeof(T).IsValueType)
src\runtime\src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (1)
995else if (typeof(T).IsValueType && default(T) is ISpanFormattable)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\AsyncLocal.cs (1)
36if (typeof(T).IsValueType && value is null)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Interlocked.cs (2)
242if (!typeof(T).IsValueType) 492if (!typeof(T).IsValueType)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Type.cs (1)
102public bool IsClass => (GetAttributeFlagsImpl() & TypeAttributes.ClassSemanticsMask) == TypeAttributes.Class && !IsValueType;
System\Activator.NativeAot.cs (1)
52if (!typeof(T).IsValueType)
System\ActivatorImplementation.cs (2)
33if (type.IsValueType) 86if (numArgs == 0 && type.IsValueType)
System\Reflection\DynamicInvokeInfo.cs (2)
88Debug.Assert(argumentType.IsValueType); 134Debug.Assert(returnType.IsValueType);
System\Reflection\Runtime\General\Helpers.cs (1)
153if (actualElementType.ContainsGenericParameters || actualElementType.IsValueType)
System\Reflection\Runtime\MethodInfos\RuntimeMethodInfo.cs (3)
319if (expectedReturnType.IsValueType && !actualReturnType.IsValueType) 374if (firstParameterOfMethodType.IsValueType)
System.Private.DataContractSerialization (57)
System\Runtime\Serialization\AccessorBuilder.cs (6)
69if (RuntimeFeature.IsDynamicCodeSupported || (!declaringType.IsValueType && !propertyType.IsValueType)) 126if (RuntimeFeature.IsDynamicCodeSupported || (!declaringType.IsValueType && !propertyType.IsValueType)) 167if (typeof(DeclaringType).IsValueType) 190if (typeof(DeclaringType).IsValueType)
System\Runtime\Serialization\ClassDataContract.cs (6)
345if (type.IsValueType) 647IsValueType = type.IsValueType; 783if (isReference && type.IsValueType) 967if (CollectionDataContract.IsCollection(memberContract.MemberType, false /*isConstructorRequired*/, skipIfReadOnlyContract) && !memberContract.MemberType.IsValueType) 1264if (type.IsValueType) 1507if (type.IsValueType && !IsNonAttributedType)
System\Runtime\Serialization\CodeGenerator.cs (10)
318if ((typeCode == TypeCode.Object && type.IsValueType) || 493if (methodInfo.IsVirtual && !methodInfo.DeclaringType!.IsValueType) 567return objType.IsValueType && !objType.IsPrimitive; 632if (type.IsValueType) 896if (localBuilder.LocalType.IsValueType) 919if (argBuilder.ArgType.IsValueType) 1153if (target.IsValueType) 1155if (source.IsValueType) 1176if (source.IsValueType) 1308if (type.IsValueType)
System\Runtime\Serialization\CollectionDataContract.cs (1)
1106if (!type.IsValueType)
System\Runtime\Serialization\DataContract.cs (2)
971_isValueType = type.IsValueType; 1950return !type.IsValueType ||
System\Runtime\Serialization\Json\JsonFormatReaderGenerator.cs (9)
213if (type.IsValueType) 479if ((primitiveContract != null && primitiveContract.UnderlyingType != Globals.TypeOfObject) || nullables != 0 || type.IsValueType) 492else if (type.IsValueType) 506if (type.IsValueType) 522if (!type.IsValueType) 531if (type.IsValueType) 632if (type.IsValueType) 841if (!type.IsValueType) 859if (!type.IsValueType)
System\Runtime\Serialization\Json\JsonFormatWriterGenerator.cs (2)
515if (type.IsValueType) 637if (memberType.IsValueType && !isNullableOfT)
System\Runtime\Serialization\PrimitiveDataContract.cs (2)
69if (UnderlyingType.IsValueType) 85if (UnderlyingType.IsValueType)
System\Runtime\Serialization\ReflectionClassWriter.cs (2)
51if (memberType.IsValueType && !originValueIsNullableOfT) 96|| (originValueIsNullableOfT && memberType.IsValueType)))
System\Runtime\Serialization\ReflectionReader.cs (4)
263if ((primitiveContract != null && primitiveContract.UnderlyingType != Globals.TypeOfObject) || nullables != 0 || type.IsValueType) 282bool typeIsValueType = type.IsValueType; 355if ((primitiveContract != null && primitiveContract.UnderlyingType != Globals.TypeOfObject) || nullables != 0 || type.IsValueType) 496if (collectionContract.UnderlyingType.IsValueType)
System\Runtime\Serialization\XmlDataContract.cs (3)
249if (UnderlyingType.IsValueType) 291if (type.IsValueType) 364if (type.IsValueType)
System\Runtime\Serialization\XmlFormatReaderGenerator.cs (8)
257if (type.IsValueType && !classContract.IsNonAttributedType) 269if (type.IsValueType) 516if ((primitiveContract != null && primitiveContract.UnderlyingType != Globals.TypeOfObject) || nullables != 0 || type.IsValueType) 529else if (type.IsValueType) 543if (type.IsValueType) 559if (!type.IsValueType) 568if (type.IsValueType) 670if (type.IsValueType)
System\Runtime\Serialization\XmlFormatWriterGenerator.cs (2)
548if (type.IsValueType) 650if (memberType.IsValueType && !isNullableOfT)
System.Private.Reflection.Execution (8)
Internal\Reflection\Execution\MethodInvokers\InstanceMethodInvoker.cs (1)
129if (methodInfo.DeclaringType.IsValueType && !methodInfo.IsStatic)
Internal\Reflection\Execution\TypeLoader\ConstraintValidator.cs (2)
20if (!typeArg.IsValueType) 35if (typeArg.IsValueType)
Internal\Reflection\Execution\TypeLoader\ConstraintValidatorSupport.cs (2)
123return _underlyingType.IsValueType; 285if (type.IsValueType)
Internal\Reflection\Execution\TypeLoader\TypeCast.cs (3)
231if (!fBoxedSource && pSourceType.IsValueType) 318if (pSourceType.IsValueType) 324if (fAllowSizeEquivalence && pTargetType.IsValueType)
System.Private.Windows.Core (2)
System\Value.cs (1)
742else if (typeof(T).IsValueType)
Windows\Win32\System\Variant\VARIANT.cs (1)
247if (t is null || !t.IsValueType)
System.Private.Xml (28)
System\Xml\Serialization\CodeGenerator.cs (10)
308Debug.Assert(ICollection_get_Count.IsVirtual && !ICollection_get_Count.DeclaringType!.IsValueType); 309if (varType.IsValueType) 403if (methodInfo.IsVirtual && !methodInfo.DeclaringType!.IsValueType) 482return objType.IsValueType && !objType.IsPrimitive; 488if (GetVariableType(obj).IsValueType) 945if (localBuilder.LocalType.IsValueType) 994if (argBuilder.ArgType.IsValueType) 1222if (target.IsValueType) 1224if (source.IsValueType) 1249if (source.IsValueType)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (3)
624if (type.IsValueType || !RuntimeFeature.IsDynamicCodeSupported) 1432type.IsValueType ? null : 2260Debug.Assert(!typeof(TObj).IsValueType);
System\Xml\Serialization\SourceInfo.cs (2)
88if (eType.IsValueType) 149if (varType.IsValueType)
System\Xml\Serialization\TypeExtensions.cs (1)
25return !targetType.IsValueType;
System\Xml\Serialization\Types.cs (2)
840if (!type.IsValueType) 895else if (type.IsValueType)
System\Xml\Serialization\XmlSerializationReader.cs (2)
1697if (elementType.IsValueType) 1757if (currItemType.IsValueType)
System\Xml\Serialization\XmlSerializationReaderILGen.cs (2)
2854if (CodeGenerator.IsNullableGenericType(arrayElementType) || arrayElementType.IsValueType) 2920if (CodeGenerator.IsNullableGenericType(arrayElementType) || arrayElementType.IsValueType)
System\Xml\Serialization\XmlSerializationWriterILGen.cs (2)
2227Debug.Assert(!local.LocalType.IsValueType); 2409Debug.Assert(type.IsValueType);
System\Xml\Xsl\IlGen\GenerateHelper.cs (2)
893if (clrTypeSrc.IsValueType) 899else if (clrTypeDst.IsValueType)
System\Xml\Xsl\IlGen\XmlIlVisitor.cs (1)
3722else if (ndName.NamespaceUri.Length != 0 && !clrTypeRetSrc.IsValueType)
System\Xml\Xsl\ListBase.cs (1)
196if ((value == null && !typeof(T).IsValueType) || (value is T))
System.Reflection.Context (2)
System\Reflection\Context\CollectionServices.cs (1)
41if (arrayType.HasElementType || arrayType.IsValueType || arrayType.ContainsGenericParameters)
System\Reflection\Context\Delegation\DelegatingType.cs (1)
295return _typeInfo.IsValueType;
System.Reflection.DispatchProxy (3)
System\Reflection\DispatchProxyGenerator.cs (3)
641if (target.IsValueType) 643if (source.IsValueType) 659if (source.IsValueType || source.IsGenericParameter)
System.Reflection.Emit (3)
System\Reflection\Emit\SignatureHelper.cs (2)
191module.GetTypeHandle(type.GetGenericTypeDefinition()), genericArguments.Length, type.IsValueType); 352signature.Type(typeHandle, type.IsValueType);
System\Reflection\Emit\TypeBuilderImpl.cs (1)
114if (_constructorDefinitions.Count == 0 && (_attributes & TypeAttributes.Interface) == 0 && !IsValueType &&
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\Types\RoModifiedType.cs (1)
122protected sealed override bool IsValueTypeImpl() => _unmodifiedType.IsValueType;
System.Resources.Extensions (3)
System\Resources\Extensions\BinaryFormat\Deserializer\ClassRecordFieldInfoDeserializer.cs (1)
38_isValueType = type.IsValueType;
System\Resources\Extensions\BinaryFormat\Deserializer\ObjectRecordDeserializer.cs (1)
93|| (Deserializer.IncompleteObjects.Contains(valueRecord) && value.GetType().IsValueType));
System\Resources\Extensions\BinaryFormat\Deserializer\PendingSerializationInfo.cs (1)
53if (!type.IsValueType && !ReferenceEquals(populated, @object))
System.Runtime.Serialization.Formatters (4)
System\Runtime\Serialization\Formatter.cs (1)
160else if (varType.IsValueType)
System\Runtime\Serialization\ObjectManager.cs (2)
1064if (idOfContainingObj != 0 && ((field != null && field.FieldType.IsValueType) || arrayIndex != null)) 1211if (idOfContainer != 0 && ((field != null && field.FieldType.IsValueType) || arrayIndex != null))
System\Runtime\Serialization\ValueTypeFixupInfo.cs (1)
56if (member.FieldType.IsValueType && containerID == 0)
System.Runtime.Serialization.Schema (2)
System\Runtime\Serialization\Schema\CodeExporter.cs (1)
565xmlContract.IsValueType = type.IsValueType;
System\Runtime\Serialization\Schema\SchemaImportHelper.cs (1)
93return !type.IsValueType ||
System.ServiceModel.Primitives (4)
Extensions\ReflectionExtensions.cs (1)
93return type.GetTypeInfo().IsValueType;
System\ServiceModel\Dispatcher\InvokerUtil.cs (2)
112bool returnsValueType = method.ReturnType.IsValueType; 171if (outputVariable.ParameterType.IsValueType)
System\ServiceModel\SynchronizedCollection.cs (1)
307if (typeof(T).GetTypeInfo().IsValueType)
System.Text.Json (49)
src\runtime\src\libraries\System.Text.Json\Common\ReflectionExtensions.cs (1)
278if (useDefaultCtorInAnnotatedStructs && type.IsValueType && ctorWithAttribute == null)
System\ReflectionExtensions.cs (1)
25public static bool IsNullableType(this Type type) => !type.IsValueType || IsNullableOfT(type);
System\Text\Json\Schema\JsonSchemaExporter.cs (1)
458return !typeInfo.Type.IsValueType && !parentPolymorphicTypeIsNonNullable && !options.TreatNullObliviousAsNonNullable;
System\Text\Json\Serialization\Converters\Collection\MemoryConverterFactory.cs (1)
15if (!typeToConvert.IsGenericType || !typeToConvert.IsValueType)
System\Text\Json\Serialization\Converters\FSharp\FSharpUnionConverter.cs (2)
103defaultFieldValues[i] = fieldType.IsValueType ? 203bool preserveReferences = !typeof(T).IsValueType &&
System\Text\Json\Serialization\Converters\Value\NullableConverterFactory.cs (3)
27if (!valueConverter.Type!.IsValueType && valueTypeToConvert.IsValueType) 37Debug.Assert(valueTypeToConvert.IsValueType && !valueTypeToConvert.IsNullableOfT());
System\Text\Json\Serialization\JsonConverterOfT.cs (3)
22IsValueType = typeof(T).IsValueType; 214!typeof(T).IsValueType && 368!typeof(T).IsValueType &&
System\Text\Json\Serialization\JsonSerializer.Read.HandleMetadata.cs (1)
564Debug.Assert(!typeof(T).IsValueType);
System\Text\Json\Serialization\JsonSerializerOptions.Converters.cs (1)
138if (propertyType.IsValueType && converter.IsValueType &&
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Union.cs (1)
227if (!typeof(TUnion).IsValueType && (object?)union is null)
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (3)
475this is { DeclaringType.IsValueType: false, IsIgnored: false, IsExtensionData: false } && 634(!PropertyType.IsValueType || Set is not null) && 652if (PropertyType.IsValueType && Set is null)
System\Text\Json\Serialization\Metadata\JsonPropertyInfoOfT.cs (2)
177!typeof(T).IsValueType && // treated as a constant by recent versions of the JIT. 340if (typeof(T).IsValueType || !populatedValue)
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.WriteHelpers.cs (3)
41!typeof(T).IsValueType && 137!typeof(T).IsValueType && 281!typeof(T).IsValueType &&
System\Text\Json\Serialization\Metadata\ReflectionEmitMemberAccessor.cs (22)
31if (constructorInfo is null && !type.IsValueType) 47Debug.Assert(type.IsValueType); 59if (type.IsValueType) 127if (elementType.IsValueType) 240generator.Emit(parameterType.IsValueType ? OpCodes.Unbox_Any : OpCodes.Castclass, parameterType); 276if (elementType.IsValueType) 430if (declaringType.IsValueType) 444if (declaredPropertyType != runtimePropertyType && declaredPropertyType.IsValueType) 448Debug.Assert(!runtimePropertyType.IsValueType); 472if (declaringType.IsValueType) 497if (declaredPropertyType != runtimePropertyType && declaredPropertyType.IsValueType) 499Debug.Assert(!runtimePropertyType.IsValueType); 526generator.Emit(declaringType.IsValueType ? OpCodes.Unbox : OpCodes.Castclass, declaringType); 532if (declaredPropertyType != runtimePropertyType && declaredPropertyType.IsValueType) 536Debug.Assert(!runtimePropertyType.IsValueType); 541generator.Emit(declaringType.IsValueType ? OpCodes.Call : OpCodes.Callvirt, realMethod); 562declaringType.IsValueType 571if (declaredFieldType.IsValueType && declaredFieldType != runtimeFieldType) 595generator.Emit(declaringType.IsValueType ? OpCodes.Unbox : OpCodes.Castclass, declaringType); 601if (declaredFieldType != runtimeFieldType && declaredFieldType.IsValueType) 633bool unionIsValueType = unionType.IsValueType; 667if (caseType.IsValueType)
System\Text\Json\Serialization\Metadata\ReflectionMemberAccessor.cs (3)
32return type.IsValueType 199if (typeof(TDeclaringType).IsValueType) 277if (typeof(TUnion).IsValueType)
System\Text\Json\Serialization\WriteStack.cs (1)
161rootValueBoxed is not null && jsonTypeInfo.Type.IsValueType)
System.Windows.Forms (11)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
423if (!isImmutable && !(PropertyType?.IsValueType ?? false))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MergePropertyDescriptor.cs (1)
119if (type.IsValueType)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MultiPropertyDescriptorGridEntry.cs (2)
119if (_mergedDescriptor.PropertyType.IsValueType || EntryFlags.HasFlag(Flags.Immutable)) 153=> _mergedDescriptor.PropertyType.IsValueType || EntryFlags.HasFlag(Flags.Immutable)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (4)
85|| (owner.GetType().IsValueType && owner.GetType() == entry.PropertyValue?.GetType())) 254if (propertyType is not null && (propertyType.IsArray || propertyType.IsValueType || propertyType.IsPrimitive)) 367bool isValueType = owner?.GetType().IsValueType ?? false; 743treatAsValueType = propertyType.IsValueType || propertyType.IsArray;
System\Windows\Forms\DataBinding\BindingSource.cs (1)
1477if (value is null && _itemType!.IsValueType)
System\Windows\Forms\Internal\Formatter.cs (2)
70if (oldTargetType.IsValueType && result is null && !isNullableTargetType) 540return (type is not null && !type.IsValueType)
System.Windows.Forms.Design (3)
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (2)
113if (!type.IsValueType) 304if (type.IsValueType)
System\ComponentModel\Design\Serialization\PropertyMemberCodeDomSerializer.cs (1)
60if (propertyValue is not null and not Type && (!propertyValue.GetType().IsValueType))
System.Windows.Forms.Primitives (1)
System\Windows\Forms\Automation\UiaTextRange.cs (1)
702if (value?.GetType() is { } type && type.IsValueType && !type.IsPrimitive && !type.IsEnum)
System.Xaml (10)
System\Xaml\Runtime\DynamicMethodRuntime.cs (3)
503OpCode callType = (method.IsStatic || method.DeclaringType.IsValueType) ? OpCodes.Call : OpCodes.Callvirt; 509if (toType.IsValueType) 521if (type.IsValueType)
System\Xaml\Schema\XamlTypeInvoker.cs (1)
128if (!_xamlType.UnderlyingType.IsValueType && (arguments is null || arguments.Length == 0))
System\Xaml\XamlObjectReader.cs (3)
1256else if (valueType.IsValueType) 1283if (parameterInfo.ParameterType.IsValueType) 1697if (member is null && !valueXamlType.UnderlyingType.IsValueType)
System\Xaml\XamlType.cs (3)
788if (underlyingType.IsValueType) 896if (underlyingType.IsValueType) 935return !UnderlyingType.IsValueType || IsNullableGeneric();
UIAutomationClient (2)
System\Windows\Automation\ItemContainerPattern.cs (1)
137((value == null && expectedType.IsValueType)
System\Windows\Automation\PropertyCondition.cs (1)
135((val == null && expectedType.IsValueType)