7 overrides of IsGenericType
System.Private.CoreLib (4)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilderInstantiation.cs (1)
232public override bool IsGenericType => true;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\ModifiedType.cs (1)
80public override bool IsGenericType => _unmodifiedType.IsGenericType;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureType.cs (1)
33public sealed override bool IsGenericType => IsGenericTypeDefinition || IsConstructedGenericType;
System\RuntimeType.NativeAot.cs (1)
389public override bool IsGenericType
System.Private.Reflection.Execution (1)
Internal\Reflection\Execution\TypeLoader\ConstraintValidatorSupport.cs (1)
75public override bool IsGenericType
System.Reflection.Context (1)
System\Reflection\Context\Delegation\DelegatingType.cs (1)
87public override bool IsGenericType
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\Types\RoType.cs (1)
100public sealed override bool IsGenericType => IsConstructedGenericType || IsGenericTypeDefinition;
526 references to IsGenericType
aspire (1)
Commands\SettingsSchemaBuilder.cs (1)
140.Where(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IDictionary<,>))
Aspire.Hosting (5)
Ats\CollectionExports.cs (3)
186if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(IDictionary<,>)) 191if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Dictionary<,>)) 197.FirstOrDefault(static iface => iface.IsGenericType && iface.GetGenericTypeDefinition() == typeof(IDictionary<,>))
ResourceBuilderExtensions.cs (2)
1059.FirstOrDefault(i => i.IsGenericType 4879=> type == typeof(ValueTask) || (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(ValueTask<>));
Aspire.Hosting.CodeGeneration.Python (6)
AtsPythonCodeGenerator.cs (6)
1396if (builder.TargetType?.ClrType!.IsGenericType == true) 1478if (i.ClrType!.IsGenericType) 1954var typeIdReference = typeRef.ClrType!.IsGenericType ? typeId.Split('`')[0] + "T" : typeId; 2176if (clrType.IsGenericType) 2261if (clrType.IsGenericType) 2351if (typeRef.ClrType?.IsGenericType == true)
Aspire.Hosting.RemoteHost (31)
Ats\AtsCallbackProxyFactory.cs (2)
78var hasResult = returnType != typeof(void) && (!isAsync || returnType.IsGenericType); 79var resultType = isAsync && returnType.IsGenericType
Ats\AtsMarshaller.cs (5)
384if (declaredType.IsGenericType) 465if (type.IsGenericType) 480if (type.IsGenericType) 600if (targetType.IsGenericType) 626if (targetType.IsGenericType)
Ats\CapabilityDispatcher.cs (2)
657if (returnType.IsGenericType && returnType.GetGenericTypeDefinition() == typeof(ValueTask<>)) 679if (!taskType.IsGenericType)
Ats\GenericMethodResolver.cs (3)
58if (paramType.IsGenericType) 68if (argType.IsGenericType) 75.FirstOrDefault(i => i.IsGenericType &&
Ats\PolyglotCapabilityInvocationException.cs (5)
307if (HostingTypeHelpers.IsResourceBuilderType(type) && type.IsGenericType) 357if (valueType.IsGenericType && HostingTypeHelpers.IsResourceBuilderType(valueType)) 368if (builderType.IsGenericType && HostingTypeHelpers.IsResourceBuilderType(builderType)) 374type.IsGenericType && 467var name = type.IsGenericType
AtsCapabilityScanner.cs (14)
1149if (!type.IsGenericType) 1603var propGenericDef = propType.IsGenericType ? propType.GetGenericTypeDefinition().FullName : null; 2213else if (returnType.IsGenericType && returnType.GetGenericTypeDefinition() == typeof(Task<>)) 2240if (!delegateType.IsGenericType) 2305else if (funcReturnType.IsGenericType && funcReturnType.GetGenericTypeDefinition() == typeof(Task<>)) 2351if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Task<>)) 2361if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(ValueTask<>)) 2406if (type.IsGenericType) 2650if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Task<>)) 2661if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(ValueTask<>)) 2730if (type.IsGenericType) 2928if (!type.IsGenericType) 3111if (!type.IsGenericType) 3863if (type.IsGenericType && !type.IsGenericTypeDefinition)
Aspire.Hosting.Tests (3)
Backchannel\BackchannelContractTests.cs (1)
162(prop.PropertyType.IsGenericType && IsAllowedCollectionType(prop.PropertyType));
ResourceNotificationTests.cs (1)
1711if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(ImmutableArray<>))
WithEndpointTests.cs (1)
194return parameterType.IsGenericType && parameterType.GetGenericTypeDefinition() == typeof(IResourceBuilder<>)
Aspire.TypeSystem (7)
AtsConstants.cs (4)
502if (!type.IsGenericType) 517if (!type.IsGenericType) 533if (!type.IsGenericType) 549if (!type.IsGenericType)
AtsContext.cs (1)
128if (type.IsGenericType)
HostingTypeHelpers.cs (2)
91if (type.IsGenericType && 104if (implementedInterface.IsGenericType &&
dotnet-svcutil-lib (35)
FrameworkFork\Microsoft.CodeDom\System\CodeTypeReference.cs (1)
117if (info.IsGenericType && !info.ContainsGenericParameters)
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeIdentifier.cs (1)
231Type[] arguments = info.IsGenericType || info.ContainsGenericParameters ? t.GetGenericArguments() : new Type[0];
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapReflectionImporter.cs (1)
800if (type.GetTypeInfo().IsGenericType && typeName.IndexOf('{') >= 0)
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (3)
999return t.GetTypeInfo().IsGenericType && (t.GetGenericTypeDefinition() == typeof(ArraySegment<>)); 1004if (type.GetTypeInfo().IsGenericType) 1027else if (t.GetTypeInfo().IsGenericType)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (1)
968if (type.GetTypeInfo().IsGenericType && typeName.IndexOf('{') >= 0)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationGeneratedCode.cs (1)
200if (info.IsGenericType || info.ContainsGenericParameters && DynamicAssemblies.IsTypeDynamic(type.GetGenericArguments()))
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationILGen.cs (2)
246if (info.IsGenericType || info.ContainsGenericParameters) 453if (info.IsGenericType || info.ContainsGenericParameters)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (1)
3732else if (info.IsGenericType)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ClassDataContract.cs (3)
398return t.GetTypeInfo().IsGenericType && (t.GetGenericTypeDefinition() == typeof(ArraySegment<>)); 479if (type.GetTypeInfo().IsGenericType && !type.GetTypeInfo().IsGenericTypeDefinition) 1350if (type.GetTypeInfo().IsGenericType && type.GetGenericTypeDefinition() == Globals.TypeOfKeyValuePairAdapter)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CollectionDataContract.cs (7)
900if (type.GetTypeInfo().IsGenericType) 990return t.GetTypeInfo().IsGenericType && (t.GetGenericTypeDefinition() == typeof(ArraySegment<>)); 1027Type interfaceTypeToCheck = type.GetTypeInfo().IsGenericType ? type.GetGenericTypeDefinition() : type; 1034if (type.GetTypeInfo().IsGenericType) 1100Type interfaceTypeToCheck = interfaceType.GetTypeInfo().IsGenericType ? interfaceType.GetGenericTypeDefinition() : interfaceType; 1130itemType = knownInterfaceType.GetTypeInfo().IsGenericType ? knownInterfaceType.GetGenericArguments()[0] : Globals.TypeOfObject; 1278Type typeToCheck = type.GetTypeInfo().IsGenericType ? type.GetGenericTypeDefinition() : type;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (7)
791if (type.GetTypeInfo().IsGenericType && type.GetGenericTypeDefinition() == Globals.TypeOfKeyValuePair) 1329while (type.GetTypeInfo().IsGenericType && type.GetGenericTypeDefinition() == Globals.TypeOfNullable) 1339while (type.GetTypeInfo().IsGenericType && type.GetGenericTypeDefinition() == Globals.TypeOfNullable) 1453if (type.GetTypeInfo().IsGenericType && !type.GetTypeInfo().IsGenericTypeDefinition) 1593if (type.GetTypeInfo().IsGenericType && !type.GetTypeInfo().IsGenericTypeDefinition) 1680if (type.GetTypeInfo().IsGenericType) 2054(type.GetTypeInfo().IsGenericType &&
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlFormatReaderGenerator.cs (1)
384while (type.GetTypeInfo().IsGenericType && type.GetGenericTypeDefinition() == Globals.TypeOfNullable)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlFormatWriterGenerator.cs (4)
148else if (objType.GetTypeInfo().IsGenericType && objType.GetGenericTypeDefinition() == Globals.TypeOfKeyValuePairAdapter) 398if (interfaceType.GetTypeInfo().IsGenericType 554bool isNullableOfT = (memberType.GetTypeInfo().IsGenericType && 640while (memberType.GetTypeInfo().IsGenericType && memberType.GetGenericTypeDefinition() == Globals.TypeOfNullable)
FrameworkFork\System.ServiceModel\Extensions\ReflectionExtensions.cs (1)
64return type.GetTypeInfo().IsGenericType;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceReflector.cs (1)
52if (t.GetTypeInfo().IsGenericType)
Microsoft.AspNetCore.Components.Endpoints (9)
Forms\ClientValidationCache.cs (1)
189if (interfaceType.IsGenericType && interfaceType.GetGenericTypeDefinition() == typeof(IEnumerable<>))
Rendering\CacheViewTextWriter.cs (1)
171=> value is RenderFragment || (value is Delegate d && d.GetType().IsGenericType && d.GetType().GetGenericTypeDefinition() == typeof(RenderFragment<>));
Rendering\SSRRenderModeBoundary.cs (1)
175if (valueType.IsGenericType && valueType.GetGenericTypeDefinition() == typeof(RenderFragment<>))
Serialization\JsonStoredDataSerializer.cs (3)
40if (type.IsGenericType) 132if (type.IsGenericType) 155return type.IsGenericType && Array.Exists(type.GetGenericArguments(), ContainsEnum);
src\aspnetcore\src\Components\Shared\src\RenderFragmentSerializer.cs (2)
206if (d.GetType().IsGenericType && d.GetType().GetGenericTypeDefinition() == typeof(RenderFragment<>)) 391return type.IsGenericType && type.GetGenericTypeDefinition() == typeof(EventCallback<>);
src\aspnetcore\src\Shared\ClosedGenericMatcher\ClosedGenericMatcher.cs (1)
62candidate.IsGenericType &&
Microsoft.AspNetCore.Components.Server (2)
src\aspnetcore\src\Components\Shared\src\RenderFragmentSerializer.cs (2)
206if (d.GetType().IsGenericType && d.GetType().GetGenericTypeDefinition() == typeof(RenderFragment<>)) 391return type.IsGenericType && type.GetGenericTypeDefinition() == typeof(EventCallback<>);
Microsoft.AspNetCore.Components.Web (1)
JSComponents\JSComponentInterop.cs (1)
170var x when x.IsGenericType && x.GetGenericTypeDefinition() == typeof(EventCallback<>) => ParameterKind.EventCallbackWithSingleParameter,
Microsoft.AspNetCore.Components.WebAssembly (2)
src\aspnetcore\src\Components\Shared\src\RenderFragmentSerializer.cs (2)
206if (d.GetType().IsGenericType && d.GetType().GetGenericTypeDefinition() == typeof(RenderFragment<>)) 391return type.IsGenericType && type.GetGenericTypeDefinition() == typeof(EventCallback<>);
Microsoft.AspNetCore.Connections.Abstractions (1)
src\aspnetcore\src\Shared\ParameterDefaultValue\ParameterDefaultValue.cs (1)
34bool isNullableParameterType = parameter.ParameterType.IsGenericType &&
Microsoft.AspNetCore.Diagnostics (1)
src\aspnetcore\src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
61if (type.IsGenericType)
Microsoft.AspNetCore.Hosting (1)
src\aspnetcore\src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
61if (type.IsGenericType)
Microsoft.AspNetCore.Http.Abstractions (1)
src\aspnetcore\src\Shared\ParameterDefaultValue\ParameterDefaultValue.cs (1)
34bool isNullableParameterType = parameter.ParameterType.IsGenericType &&
Microsoft.AspNetCore.Http.Extensions (15)
RequestDelegateFactory.cs (5)
541else if (returnType.IsGenericType && 547else if (returnType.IsGenericType && 631if (constructorType.IsGenericType) 1122else if (returnType.IsGenericType && 1170else if (returnType.IsGenericType &&
src\aspnetcore\src\Shared\ClosedGenericMatcher\ClosedGenericMatcher.cs (1)
62candidate.IsGenericType &&
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (3)
406if (methodReturnType.IsGenericType && methodReturnType.GetGenericTypeDefinition() == typeof(ValueTask<>)) 421if (currentType.IsGenericType && currentType.GetGenericTypeDefinition() == typeof(Task<>)) 489if (methodReturnType.IsGenericType && methodReturnType.GetGenericTypeDefinition() == typeof(ValueTask<>))
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (2)
63var methodReturnGenericType = possibleFSharpAsyncType.IsGenericType 136if (!genericAwaitableType.IsGenericType)
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (3)
262else if (valueTaskResultType.IsGenericType && 308return methodInfo.ReturnType.IsGenericType && 415if (i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IBindableFromHttpContext<>) && i.GetGenericArguments()[0] == type)
src\aspnetcore\src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
61if (type.IsGenericType)
Microsoft.AspNetCore.Identity.EntityFrameworkCore (1)
IdentityEntityFrameworkBuilderExtensions.cs (1)
100var genericType = type.IsGenericType ? type.GetGenericTypeDefinition() : null;
Microsoft.AspNetCore.JsonPatch (2)
Internal\ConversionResultProvider.cs (1)
86return type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>);
src\aspnetcore\src\Shared\ClosedGenericMatcher\ClosedGenericMatcher.cs (1)
62candidate.IsGenericType &&
Microsoft.AspNetCore.JsonPatch.SystemTextJson (4)
Adapters\AdapterFactory.cs (1)
26if (typeToConvert.IsGenericType && typeToConvert.GetGenericTypeDefinition() == typeof(Dictionary<,>))
Converters\JsonPatchDocumentConverterFactory.cs (1)
15(typeToConvert.IsGenericType && typeToConvert.GetGenericTypeDefinition() == typeof(JsonPatchDocument<>));
Internal\ConversionResultProvider.cs (1)
68return type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>);
src\aspnetcore\src\Shared\ClosedGenericMatcher\ClosedGenericMatcher.cs (1)
62candidate.IsGenericType &&
Microsoft.AspNetCore.Mvc.Abstractions (5)
src\aspnetcore\src\Shared\ClosedGenericMatcher\ClosedGenericMatcher.cs (1)
62candidate.IsGenericType &&
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (3)
262else if (valueTaskResultType.IsGenericType && 308return methodInfo.ReturnType.IsGenericType && 415if (i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IBindableFromHttpContext<>) && i.GetGenericArguments()[0] == type)
src\aspnetcore\src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
61if (type.IsGenericType)
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
ApiResponseTypeProvider.cs (1)
453if (declaredReturnType.IsGenericType &&
Microsoft.AspNetCore.Mvc.Core (9)
Infrastructure\ActionResultTypeMapper.cs (1)
16if (returnType.IsGenericType &&
ModelBinding\Binders\CollectionModelBinder.cs (1)
505if (elementType.IsGenericType && elementType.GetGenericTypeDefinition() == typeof(KeyValuePair<,>))
ModelBinding\Binders\KeyValuePairModelBinderProvider.cs (1)
22if (modelType.IsGenericType &&
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (3)
406if (methodReturnType.IsGenericType && methodReturnType.GetGenericTypeDefinition() == typeof(ValueTask<>)) 421if (currentType.IsGenericType && currentType.GetGenericTypeDefinition() == typeof(Task<>)) 489if (methodReturnType.IsGenericType && methodReturnType.GetGenericTypeDefinition() == typeof(ValueTask<>))
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (2)
63var methodReturnGenericType = possibleFSharpAsyncType.IsGenericType 136if (!genericAwaitableType.IsGenericType)
src\aspnetcore\src\Shared\ParameterDefaultValue\ParameterDefaultValue.cs (1)
34bool isNullableParameterType = parameter.ParameterType.IsGenericType &&
Microsoft.AspNetCore.Mvc.Formatters.Xml (1)
EnumerableWrapperProviderFactory.cs (1)
45if (declaredType != null && declaredType.IsInterface && declaredType.IsGenericType)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (3)
BsonTempDataSerializer.cs (1)
177else if (typeToSerialize.IsGenericType)
NewtonsoftJsonPatchInputFormatter.cs (1)
87!modelType.IsGenericType)
src\aspnetcore\src\Shared\ClosedGenericMatcher\ClosedGenericMatcher.cs (1)
62candidate.IsGenericType &&
Microsoft.AspNetCore.Mvc.Razor (1)
TagHelpers\TagHelperFeatureProvider.cs (1)
52!type.IsGenericType;
Microsoft.AspNetCore.Mvc.Testing (1)
WebApplicationFactory.cs (1)
256if (declaringType!.IsGenericType)
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
ViewComponents\DefaultViewComponentDescriptorProvider.cs (1)
86if (!selectedMethod.ReturnType.IsGenericType ||
Microsoft.AspNetCore.OpenApi (13)
Extensions\JsonTypeInfoExtensions.cs (2)
112if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>)) 127if (type.IsGenericType)
Extensions\TypeExtensions.cs (2)
30(modelType.IsGenericType && modelType.GenericTypeArguments.Length == 1 && modelType.Name == JsonPatchDocumentNameOfT))) 61if (returnType.IsGenericType &&
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (3)
406if (methodReturnType.IsGenericType && methodReturnType.GetGenericTypeDefinition() == typeof(ValueTask<>)) 421if (currentType.IsGenericType && currentType.GetGenericTypeDefinition() == typeof(Task<>)) 489if (methodReturnType.IsGenericType && methodReturnType.GetGenericTypeDefinition() == typeof(ValueTask<>))
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (2)
63var methodReturnGenericType = possibleFSharpAsyncType.IsGenericType 136if (!genericAwaitableType.IsGenericType)
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (3)
262else if (valueTaskResultType.IsGenericType && 308return methodInfo.ReturnType.IsGenericType && 415if (i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IBindableFromHttpContext<>) && i.GetGenericArguments()[0] == type)
src\aspnetcore\src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
61if (type.IsGenericType)
Microsoft.AspNetCore.Server.IIS (1)
src\aspnetcore\src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
61if (type.IsGenericType)
Microsoft.AspNetCore.SignalR.Client.Core (5)
src\aspnetcore\src\SignalR\common\Shared\ReflectionHelper.cs (5)
33if (nullableType.IsGenericType && nullableType.GetGenericTypeDefinition() == typeof(ChannelReader<>)) 57if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(IAsyncEnumerable<>)) 64if (typeToCheck.IsGenericType && typeToCheck.GetGenericTypeDefinition() == typeof(IAsyncEnumerable<>)) 80if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(IAsyncEnumerator<>)) 87if (typeToCheck.IsGenericType && typeToCheck.GetGenericTypeDefinition() == typeof(IAsyncEnumerator<>))
Microsoft.AspNetCore.SignalR.Core (13)
Internal\HubMethodDescriptor.cs (1)
51if (returnType.IsGenericType && returnType.GetGenericTypeDefinition() == typeof(ChannelReader<>))
Internal\HubReflectionHelper.cs (1)
28var baseType = baseDefinition.IsGenericType ? baseDefinition.GetGenericTypeDefinition() : baseDefinition;
src\aspnetcore\src\Shared\ClosedGenericMatcher\ClosedGenericMatcher.cs (1)
62candidate.IsGenericType &&
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (3)
406if (methodReturnType.IsGenericType && methodReturnType.GetGenericTypeDefinition() == typeof(ValueTask<>)) 421if (currentType.IsGenericType && currentType.GetGenericTypeDefinition() == typeof(Task<>)) 489if (methodReturnType.IsGenericType && methodReturnType.GetGenericTypeDefinition() == typeof(ValueTask<>))
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (2)
63var methodReturnGenericType = possibleFSharpAsyncType.IsGenericType 136if (!genericAwaitableType.IsGenericType)
src\aspnetcore\src\SignalR\common\Shared\ReflectionHelper.cs (5)
33if (nullableType.IsGenericType && nullableType.GetGenericTypeDefinition() == typeof(ChannelReader<>)) 57if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(IAsyncEnumerable<>)) 64if (typeToCheck.IsGenericType && typeToCheck.GetGenericTypeDefinition() == typeof(IAsyncEnumerable<>)) 80if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(IAsyncEnumerator<>)) 87if (typeToCheck.IsGenericType && typeToCheck.GetGenericTypeDefinition() == typeof(IAsyncEnumerator<>))
Microsoft.Build.Framework (1)
TaskItemTypeDetector.cs (1)
30if (!parameterType.IsGenericType)
Microsoft.CodeAnalysis (1)
TreeDumper.cs (1)
197if (ti.IsGenericType && ti.GetGenericTypeDefinition() == typeof(ImmutableArray<>))
Microsoft.CodeAnalysis.CSharp (2)
Symbols\AssemblySymbol.cs (2)
814var currentTypeInfo = typeInfo.IsGenericType ? typeInfo.GetGenericTypeDefinition().GetTypeInfo() : typeInfo; 818Debug.Assert(currentTypeInfo.IsGenericTypeDefinition || !currentTypeInfo.IsGenericType);
Microsoft.CodeAnalysis.ExternalAccess.Extensions (2)
Internal\ExtensionMessageHandlerFactory.cs (2)
48if (candidateType.IsAbstract || candidateType.IsGenericType) 54if (interfaceType.IsGenericType &&
Microsoft.CodeAnalysis.Scripting (3)
Hosting\CommonMemberFilter.cs (1)
86if (type?.GetTypeInfo().IsGenericType == true)
Hosting\ObjectFormatter\CommonObjectFormatter.Visitor.cs (1)
106if (typeInfo.IsGenericType && typeInfo.GetGenericTypeDefinition() == typeof(KeyValuePair<,>))
Hosting\ObjectFormatter\CommonTypeNameFormatter.cs (1)
56if (typeInfo.IsGenericType)
Microsoft.CSharp (27)
Microsoft\CSharp\RuntimeBinder\ComInterop\ComBinderHelpers.cs (1)
45return t.IsGenericType && t.GetGenericTypeDefinition() == typeof(StrongBox<>);
Microsoft\CSharp\RuntimeBinder\ComInterop\TypeUtils.cs (2)
25return type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>); 57if (src.IsArray && dest.IsGenericType &&
Microsoft\CSharp\RuntimeBinder\ComInterop\VarEnumSelector.cs (1)
363if (argumentType.IsGenericType)
Microsoft\CSharp\RuntimeBinder\ExpressionTreeCallRewriter.cs (2)
435if (!t.IsGenericType && !t.IsNested) 441if (t.IsGenericType)
Microsoft\CSharp\RuntimeBinder\RuntimeBinderExtensions.cs (2)
182if (t1.IsGenericType && t2.IsGenericType)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\MethodInfo.cs (2)
43if (!type.IsGenericType && !type.IsNested) 114if (!type.IsGenericType && !type.IsNested)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\PropertyInfo.cs (1)
42if (!type.IsGenericType && !type.IsNested)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\AggregateType.cs (2)
164if (sysType.IsGenericType) 313if (uninstantiatedType.IsGenericType)
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (14)
56if (callingType.IsGenericType) 162if (type.IsGenericType) 287if (type.IsGenericType) 337if (type.IsGenericType) 471if (parentType != null && parentType.IsGenericType) 487if (nextParent != null && nextParent.IsGenericType) 683if (type.IsGenericType) 802if (agg.AssociatedSystemType.IsEquivalentTo(t.IsGenericType ? t.GetGenericTypeDefinition() : t)) 867agg.AssociatedSystemType = type.IsGenericType ? type.GetGenericTypeDefinition() : type; 952if (type.IsGenericType) 972if (type.IsGenericType) 991if (t.IsGenericType) 1018if (type.IsGenericType) 1789if (type.IsGenericType)
Microsoft.DotNet.Cli.Utils (1)
Extensions\TypeExtensions.cs (1)
18if (!type.IsGenericType)
Microsoft.Extensions.AI.Abstractions (11)
Functions\AIFunctionFactory.cs (3)
892if (t.IsGenericType) 1088if (returnType.IsGenericType) 1213Debug.Assert(specializedType.IsGenericType && specializedType.GetGenericTypeDefinition() == genericMethodDefinition.DeclaringType, "generic member definition doesn't match type.");
parent\parent\parent\eng\MSBuild\parent\parent\src\LegacySupport\NullabilityInfoContext\NullabilityInfoContext.cs (7)
360if (underlyingType.IsGenericType) 379if (underlyingType.IsGenericType) 430if ((type != null) && type.IsGenericType && !type.IsGenericTypeDefinition) 520Type contextTypeDefinition = context.IsGenericType && !context.IsGenericTypeDefinition ? context.GetGenericTypeDefinition() : context; 532if (!baseType.IsGenericType 557if (underlyingType.IsGenericType) 594if (!isValueType || (Nullable.GetUnderlyingType(nullability.Type) ?? nullability.Type).IsGenericType)
Utilities\AIJsonUtilities.Schema.Create.cs (1)
909if (!paramType.IsGenericType ||
Microsoft.Extensions.Caching.Hybrid (1)
Internal\DefaultJsonSerializerFactory.cs (1)
83if (iType.IsGenericType && iType.GetGenericTypeDefinition() == typeof(IEnumerable<>))
Microsoft.Extensions.Configuration.Binder (6)
ConfigurationBinder.cs (5)
748Debug.Assert(dictionaryType.IsGenericType && 991if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>)) 1072=> !type.IsValueType || (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>)); 1091if (actual.IsGenericType && 1100if (interfaceType.IsGenericType &&
src\runtime\src\libraries\Common\src\Extensions\ParameterDefaultValue\ParameterDefaultValue.cs (1)
30bool isNullableParameterType = parameter.ParameterType.IsGenericType &&
Microsoft.Extensions.DependencyInjection (6)
DependencyInjectionEventSource.cs (1)
230if (descriptor.ServiceType.IsGenericType)
ServiceProvider.cs (3)
121if (!serviceType.IsGenericType || serviceType.GetGenericTypeDefinition() != typeof(IEnumerable<>)) 143if (!serviceType.IsGenericType || serviceType.GetGenericTypeDefinition() != typeof(IEnumerable<>)) 238if (descriptor.ServiceType.IsGenericType && !descriptor.ServiceType.IsConstructedGenericType)
src\runtime\src\libraries\Common\src\Extensions\ParameterDefaultValue\ParameterDefaultValue.cs (1)
30bool isNullableParameterType = parameter.ParameterType.IsGenericType &&
src\runtime\src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
59if (type.IsGenericType)
Microsoft.Extensions.DependencyInjection.Abstractions (2)
EmptyServiceProvider.cs (1)
100(!serviceType.IsGenericType || serviceType.GetGenericTypeDefinition() != typeof(IEnumerable<>)))
src\runtime\src\libraries\Common\src\Extensions\ParameterDefaultValue\ParameterDefaultValue.cs (1)
30bool isNullableParameterType = parameter.ParameterType.IsGenericType &&
Microsoft.Extensions.Diagnostics.Abstractions (1)
src\runtime\src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
59if (type.IsGenericType)
Microsoft.Extensions.Http (1)
src\runtime\src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
59if (type.IsGenericType)
Microsoft.Extensions.Logging.Abstractions (1)
src\runtime\src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
59if (type.IsGenericType)
Microsoft.Extensions.Options (2)
OptionsServiceCollectionExtensions.cs (2)
177if (t.IsGenericType) 202type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Action<>) ?
Microsoft.Extensions.VectorData.Abstractions (4)
ProviderServices\Filter\FilterTranslatorBase.cs (4)
51DeclaringType: { IsGenericType: true } declaringType 93Method: { Name: "op_Implicit", DeclaringType: { IsGenericType: true } implicitCastDeclaringType }, 99Method: { Name: "op_Implicit", DeclaringType: { IsGenericType: true } implicitCastDeclaringType }, 110Type: { IsGenericType: true } targetType,
Microsoft.Extensions.VectorData.ConformanceTests (2)
TestSuiteImplementationTests.cs (2)
58if (baseType.IsGenericType 65if (type.IsGenericType
Microsoft.JSInterop (6)
Infrastructure\DotNetDispatcher.cs (2)
125else if (syncResult?.GetType() is { IsGenericType: true } syncResultType 275return !parameterType.IsGenericType || parameterType.GetGenericTypeDefinition() != typeof(DotNetObjectReference<>);
Infrastructure\DotNetObjectReferenceJsonConverterFactory.cs (1)
21return typeToConvert.IsGenericType && typeToConvert.GetGenericTypeDefinition() == typeof(DotNetObjectReference<>);
Infrastructure\TaskGenericsUtil.cs (3)
44(!taskType.IsGenericType || taskType.GetGenericTypeDefinition() != typeof(Task<>))) 50return taskType.IsGenericType 92: result == null && typeof(T).IsGenericType && typeof(T).GetGenericTypeDefinition() == typeof(Nullable<>) // ChangeType can't convert null to value types
Microsoft.Maui (2)
Handlers\HybridWebView\HybridWebViewHandler.cs (1)
278 if (dotnetMethod.ReturnType.IsGenericType)
HotReload\HotReloadHelper.cs (1)
182 if (pair.Value.IsGenericType)
Microsoft.Maui.Controls (4)
BindableProperty.cs (1)
213 return !returnType.IsValueType || returnType.IsGenericType && returnType.GetGenericTypeDefinition() == typeof(Nullable<>);
BindingExpression.cs (1)
420 if (part.NextPart != null && propertyType.IsGenericType && propertyType.IsValueType)
TypeConversionHelper.cs (1)
24 return !targetType.IsValueType || targetType.IsGenericType && targetType.GetGenericTypeDefinition() == typeof(Nullable<>);
Xaml\TypeConversionExtensions.cs (1)
166 if (toType.IsGenericType && toType.GetGenericTypeDefinition() == typeof(Nullable<>))
Microsoft.Maui.Controls.Xaml (1)
ApplyPropertiesVisitor.cs (1)
609 var nullable = property.ReturnType.IsGenericType &&
Microsoft.ML.Core (7)
CommandLine\CmdParser.cs (2)
1267bool isGeneric = type.IsGenericType; 2308!factoryType.IsGenericType)
EntryPoints\EntryPointUtils.cs (2)
69if (fieldType.IsGenericType && fieldType.GetGenericTypeDefinition() == typeof(Optional<>) && fieldVal == null) 75if (fieldType.IsGenericType && fieldType.GetGenericTypeDefinition() == typeof(Optional<>))
EntryPoints\ModuleArgs.cs (2)
606if (type.IsGenericType && (type.GetGenericTypeDefinition() == typeof(Optional<>) || type.GetGenericTypeDefinition() == typeof(Nullable<>))) 633if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Dictionary<,>)
Utilities\PlatformUtils.cs (1)
30return info.IsGenericType && info.GetGenericTypeDefinition() == typeDef;
Microsoft.ML.Data (27)
DataView\DataViewConstructionUtils.cs (6)
253if (outputType.GetElementType().IsGenericType && outputType.GetElementType().GetGenericTypeDefinition() == typeof(Nullable<>)) 264Host.Assert(outputType.IsGenericType); 280if (outputType.IsGenericType && outputType.GetGenericTypeDefinition() == typeof(Nullable<>)) 918Contracts.Check(typeof(TDst).IsGenericType && typeof(TDst).GetGenericTypeDefinition() == typeof(VBuffer<>)); 941Contracts.Assert(typeT.IsGenericType); 942Contracts.Check(typeof(TDst).IsGenericType);
DataView\InternalSchemaDefinition.cs (1)
169else if (rawType.IsGenericType && rawType.GetGenericTypeDefinition() == typeof(VBuffer<>))
DataView\TypedCursor.cs (3)
373if (fieldType.GetElementType().IsGenericType && fieldType.GetElementType().GetGenericTypeDefinition() == typeof(Nullable<>)) 384Ch.Assert(fieldType.IsGenericType); 401if (fieldType.IsGenericType && fieldType.GetGenericTypeDefinition() == typeof(Nullable<>))
EntryPoints\EntryPointNode.cs (3)
72if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Dictionary<,>) 184if (variableType.IsGenericType && variableType.GetGenericTypeDefinition() == typeof(Optional<>)) 205Contracts.Assert(variableType.IsGenericType && variableType.GetGenericTypeDefinition() == typeof(Dictionary<,>)
EntryPoints\InputBuilder.cs (11)
128if (type.IsGenericType && 277if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Optional<>)) 286else if (type.IsGenericType && 338else if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Dictionary<,>) && 357if (deftype.IsGenericType && deftype.GetGenericTypeDefinition() == typeof(Optional<>)) 393Contracts.Assert(type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Optional<>)); 413if (type.IsGenericType && (type.GetGenericTypeDefinition() == typeof(Optional<>) || type.GetGenericTypeDefinition() == typeof(Nullable<>))) 420if (type.IsGenericType && (type.GetGenericTypeDefinition() == typeof(Var<>))) 620if (!outerType.IsGenericType) 670if (outputType.IsGenericType && outputType.GetGenericTypeDefinition() == typeof(CommonOutputs.MacroOutput<>)) 708if (type != null && type.IsGenericType && (type.GetGenericTypeDefinition() == typeof(Var<>)))
Scorers\PredictionTransformer.cs (1)
830if (att.LoadType.IsGenericType && att.LoadType.GetGenericArguments().Length == modelType.GetGenericArguments().Length)
Utils\ApiUtils.cs (2)
39(t.IsGenericType && t.GetGenericTypeDefinition() == typeof(VBuffer<>)) || 40(t.IsGenericType && t.GetGenericTypeDefinition() == typeof(Nullable<>)) ||
Microsoft.ML.EntryPoints (8)
JsonUtils\JsonManifestUtils.cs (8)
73if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Var<>)) 92if (type.IsGenericType && (type.GetGenericTypeDefinition() == typeof(Optional<>) || type.GetGenericTypeDefinition() == typeof(Nullable<>))) 181jo[FieldNames.IsNullable] = fieldInfo.FieldType.IsGenericType && (fieldInfo.FieldType.GetGenericTypeDefinition() == typeof(Nullable<>)); 188if (fieldInfo.FieldType.IsGenericType && 287if (outputType.IsGenericType && outputType.GetGenericTypeDefinition() == typeof(CommonOutputs.MacroOutput<>)) 327if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Var<>)) 404if (valueType.IsGenericType && valueType.GetGenericTypeDefinition() == typeof(Nullable<>)) 408if (valueType.IsGenericType && valueType.GetGenericTypeDefinition() == typeof(Optional<>))
Microsoft.ML.Parquet (1)
ParquetLoader.cs (1)
763if (enu.Current is IList && enu.Current.GetType().IsGenericType)
Microsoft.ML.Transforms (1)
PermutationFeatureImportanceExtensions.cs (1)
728if (iType.IsGenericType && iType.GetGenericTypeDefinition() == typeof(IPredictionTransformer<>))
Microsoft.Private.Windows.Core (4)
System\DisposalTracking.cs (1)
64if (type.IsGenericType)
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (2)
403return type.IsGenericType 716return type.IsGenericType
System\TypeExtensions.cs (1)
233type.IsGenericType && !type.IsGenericTypeDefinition && type.GetGenericTypeDefinition() == typeof(Nullable<>)
Microsoft.TestPlatform.AdapterUtilities (2)
Helpers\ReflectionHelpers.Type.cs (1)
13return type.IsGenericType;
ManagedNameUtilities\ManagedNameHelper.Reflection.cs (1)
525var arity = !info.IsGenericType
Microsoft.VisualBasic.Core (7)
Microsoft\VisualBasic\CompilerServices\Conversions.vb (1)
2635(TargetType.IsGenericType AndAlso
Microsoft\VisualBasic\CompilerServices\Symbols.vb (2)
482Return type.IsGenericType 486Return type.IsGenericType AndAlso (Not type.IsGenericTypeDefinition)
Microsoft\VisualBasic\CompilerServices\Utils.LateBinder.vb (2)
467If Not typ.IsGenericType Then 475If typ.DeclaringType IsNot Nothing AndAlso typ.DeclaringType.IsGenericType Then
Microsoft\VisualBasic\CompilerServices\Utils.vb (2)
294If t1.IsGenericType AndAlso t2.IsGenericType Then
Mono.Cecil (4)
Mono.Cecil\Import.cs (4)
199 if (type.IsGenericType) 212 return type.IsGenericType && type.IsGenericTypeDefinition && import_kind == ImportGenericKind.Open; 236 if (type.IsGenericType) 299 return type.IsGenericType && !type.IsGenericTypeDefinition;
PresentationBuildTasks (7)
MS\Internal\MarkupCompiler\MarkupCompiler.cs (5)
2288if (genericName.Length > 0 || t.IsGenericType) 2333if (t.IsGenericType) 2362if (refType == null || !refType.IsGenericType || !refType.IsGenericTypeDefinition || typeArgsList == null) 2447Debug.Assert(_typeArgsList == null || (baseClass.IsGenericType && baseClass.IsGenericTypeDefinition)); 2448Debug.Assert(_typeArgsList != null || !baseClass.IsGenericType);
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (1)
775string fullName = owner.IsGenericType ? $"{owner.Namespace}.{owner.Name}" : owner.FullName;
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\ReflectionHelper.cs (1)
122return (type.IsGenericType && (type.GetGenericTypeDefinition() == typeof(Nullable<>)));
PresentationFramework (15)
MS\Internal\Data\PropertyPathWorker.cs (1)
1439if (type.IsGenericType)
MS\Internal\WindowsRuntime\Generated\WinRT\GuidGenerator.cs (3)
21if (!type.IsGenericType) 45if (type.IsGenericType) 133if (!type.IsGenericType)
MS\Internal\WindowsRuntime\Generated\WinRT\Marshalers.cs (1)
1006else if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(System.Collections.Generic.KeyValuePair<,>))
MS\Internal\WindowsRuntime\Generated\WinRT\ObjectReference.cs (1)
209if (typeof(T).IsGenericType)
MS\Internal\WindowsRuntime\Generated\WinRT\Projections.cs (2)
42if (publicType.IsGenericType) 61if (abiType.IsGenericType)
MS\Internal\WindowsRuntime\Generated\WinRT\TypeExtensions.cs (1)
51if (helperType.IsGenericType && vftblType is not null)
System\Windows\Data\BindingExpression.cs (1)
1365if (targetType.IsGenericType && targetType.GetGenericTypeDefinition() == typeof(Nullable<>))
System\Windows\Data\BindingExpressionBase.cs (1)
1606if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>))
System\Windows\Markup\BamlRecordReader.cs (1)
3734return t.IsGenericType && t.GetGenericTypeDefinition() == NullableType;
System\Windows\Markup\Primitives\ElementMarkupObject.cs (1)
693if (interfaceType.IsGenericType)
System\Windows\Markup\Primitives\MarkupWriter.cs (1)
149if (type.IsGenericType)
System\Windows\Markup\XamlTypeMapper.cs (1)
775string fullName = owner.IsGenericType ? $"{owner.Namespace}.{owner.Name}" : owner.FullName;
System.CodeDom (1)
src\runtime\src\libraries\Common\src\System\CodeDom\CodeTypeReference.cs (1)
97if (type.IsGenericType && !type.ContainsGenericParameters)
System.CommandLine (1)
Binding\ArgumentConverter.DefaultValues.cs (1)
46if (type.IsGenericType)
System.ComponentModel.Annotations (2)
System\ComponentModel\DataAnnotations\CustomValidationAttribute.cs (1)
311&& (!expectedValueType.IsGenericType
System\ComponentModel\DataAnnotations\Validator.cs (1)
970(destinationType.IsGenericType &&
System.ComponentModel.Composition (13)
Microsoft\Internal\Collections\CollectionServices.cs (1)
22if (type.IsGenericType)
Microsoft\Internal\ReflectionServices.cs (1)
94instanceType.IsGenericType &&
System\ComponentModel\Composition\ContractNameServices.cs (3)
114if (type.IsGenericType) 220if (type.DeclaringType.IsGenericType) 238if (!type.IsGenericType)
System\ComponentModel\Composition\Hosting\CompositionServices.cs (3)
65if ((memberType != null) && memberType.IsGenericType && specifiedContractType.IsGenericType) 500if (type.IsGenericType)
System\ComponentModel\Composition\ReflectionModel\GenericServices.cs (3)
18if (type.IsGenericType && type.ContainsGenericParameters) 41if (type.IsGenericType && type.ContainsGenericParameters) 56if (type.IsGenericType)
System\ComponentModel\Composition\ReflectionModel\ImportType.cs (2)
92if (type.IsGenericType && type.GetGenericTypeDefinition() == baseGenericTypeDefinition) 116if (!type.IsGenericType)
System.ComponentModel.TypeConverter (2)
System\ComponentModel\ReflectTypeDescriptionProvider.cs (2)
1506if (callingType.IsGenericType && callingType.GetGenericTypeDefinition() == typeof(Nullable<>)) 1567else if (callingType.IsGenericType && callingType.GetGenericTypeDefinition() == typeof(Nullable<>))
System.Composition.TypedParts (2)
System\Composition\TypedParts\Discovery\DiscoveredPart.cs (1)
101if (_constructor == null && _partType.IsGenericType)
System\Composition\TypedParts\Discovery\TypeInspector.cs (1)
190if (ifce == contractType || (ifce.IsGenericType && ifce.GetGenericTypeDefinition() == contractType.AsType()))
System.Data.Common (2)
System\Data\Common\DataStorage.cs (1)
525return ((StorageType.Empty == typeCode) && dataType.IsGenericType && (dataType.GetGenericTypeDefinition() == typeof(System.Nullable<>)));
System\Data\TypeLimiter.cs (1)
292if (type.IsGenericType && !type.IsGenericTypeDefinition && type.GetGenericTypeDefinition() == typeof(List<>))
System.Diagnostics.DiagnosticSource (2)
System\Diagnostics\DsesFilterAndTransform.cs (1)
748if (!iFaceTypeInfo.IsGenericType ||
System\Diagnostics\Metrics\AggregationManager.cs (1)
383genericDefType = type.IsGenericType ? type.GetGenericTypeDefinition() : null;
System.Linq.Expressions (8)
System\Dynamic\Utils\TypeUtils.cs (5)
16.Where(i => i.IsGenericType) 442if (!source.IsSZArray || !dest.IsInterface || !dest.IsGenericType) 469if (!dest.IsSZArray || !source.IsInterface || !source.IsGenericType) 531if (!IsDelegate(source) || !IsDelegate(dest) || !source.IsGenericType || !dest.IsGenericType)
System\Linq\Expressions\Compiler\ILGen.cs (1)
442if (dt != null && dt.IsGenericType)
System\Linq\Expressions\Compiler\LambdaCompiler.Expressions.cs (1)
616Debug.Assert(siteType.IsGenericType && siteType.GetGenericTypeDefinition() == typeof(CallSite<>));
System\Runtime\CompilerServices\CallSite.cs (1)
290&& target.IsGenericType && IsSimpleSignature(invoke, out Type[] args))
System.Linq.Queryable (5)
System\Linq\EnumerableRewriter.cs (4)
129if (t.IsGenericType && t.GetGenericTypeDefinition().GetInterfaces().Contains(typeof(IGrouping<,>))) 135if (iType.IsGenericType && iType.GetGenericTypeDefinition() == typeof(IEnumerable<>)) 160if (pubType.IsInterface && pubType.IsGenericType) 176.Where(i => i.IsGenericType && i.GenericTypeArguments.Length == 1)
System\Linq\TypeHelper.cs (1)
21if (type.IsGenericType && type.GetGenericTypeDefinition() == definition)
System.Private.CoreLib (21)
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\Statics.cs (1)
387return type.IsGenericType && type.GetGenericTypeDefinition() == (Type?)openType;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodOnTypeBuilderInstantiation.cs (1)
44if (!t.IsGenericType || t.IsGenericTypeDefinition)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeNameBuilder.cs (1)
290if (rootType.IsGenericType && (!rootType.IsGenericTypeDefinition || format == Format.ToString))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\ModifiedGenericType.cs (1)
16Debug.Assert(unmodifiedType.IsGenericType);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\ModifiedType.cs (2)
40else if (unmodifiedType.IsGenericType) 80public override bool IsGenericType => _unmodifiedType.IsGenericType;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\NullabilityInfoContext.cs (7)
362if (underlyingType.IsGenericType) 381if (underlyingType.IsGenericType) 432if ((type != null) && type.IsGenericType && !type.IsGenericTypeDefinition) 530Type contextTypeDefinition = context.IsGenericType && !context.IsGenericTypeDefinition ? context.GetGenericTypeDefinition() : context; 542if (!baseType.IsGenericType 566if (underlyingType.IsGenericType) 600if (!isValueType || (Nullable.GetUnderlyingType(nullability.Type) ?? nullability.Type).IsGenericType)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (3)
563if (structureType.IsGenericType) 611if (structureType.IsGenericType) 1177if (type.IsGenericType)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Type.cs (1)
79public virtual Type[] GenericTypeArguments => (IsGenericType && !IsGenericTypeDefinition) ? GetGenericArguments() : [];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Type.Helpers.cs (2)
66if (!IsGenericType) 133if (IsGenericType && !IsGenericTypeDefinition)
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.cs (1)
211if (IsSZArray && interfaceType.IsGenericType)
System.Private.DataContractSerialization (41)
src\runtime\src\libraries\Common\src\System\CodeDom\CodeTypeReference.cs (1)
97if (type.IsGenericType && !type.ContainsGenericParameters)
System\Runtime\Serialization\AccessorBuilder.cs (2)
49if (declaringType.IsGenericType && declaringType.GetGenericTypeDefinition() == typeof(KeyValue<,>)) 106if (declaringType.IsGenericType && declaringType.GetGenericTypeDefinition() == typeof(KeyValue<,>))
System\Runtime\Serialization\ClassDataContract.cs (2)
290return t.IsGenericType && (t.GetGenericTypeDefinition() == typeof(ArraySegment<>)); 1319if (!type.IsGenericType || !type.ContainsGenericParameters)
System\Runtime\Serialization\CollectionDataContract.cs (8)
876if (interfaceType.IsGenericType 927if (type.IsGenericType) 1004return t.IsGenericType && (t.GetGenericTypeDefinition() == typeof(ArraySegment<>)); 1053Type interfaceTypeToCheck = type.IsGenericType ? type.GetGenericTypeDefinition() : type; 1060if (type.IsGenericType) 1135Type interfaceTypeToCheck = interfaceType.IsGenericType ? interfaceType.GetGenericTypeDefinition() : interfaceType; 1166itemType = knownInterfaceType.IsGenericType ? knownInterfaceType.GetGenericArguments()[0] : Globals.TypeOfObject; 1369Type typeToCheck = type.IsGenericType ? type.GetGenericTypeDefinition() : type;
System\Runtime\Serialization\DataContract.cs (7)
1172if (itemType.IsGenericType) 1189while (type.IsGenericType && type.GetGenericTypeDefinition() == Globals.TypeOfNullable) 1199while (type.IsGenericType && type.GetGenericTypeDefinition() == Globals.TypeOfNullable) 1293if (type.IsGenericType && !type.IsGenericTypeDefinition) 1405if (type.IsGenericType && !type.IsGenericTypeDefinition) 1502if (type.IsGenericType) 1951(type.IsGenericType &&
System\Runtime\Serialization\Json\DataContractJsonSerializer.cs (1)
573if (itemType.IsGenericType && (itemType.GetGenericTypeDefinition() == Globals.TypeOfKeyValue))
System\Runtime\Serialization\Json\JsonDataContract.cs (1)
295if (collectionDataContract.ItemType.IsGenericType
System\Runtime\Serialization\Json\JsonFormatReaderGenerator.cs (2)
472while (type.IsGenericType && type.GetGenericTypeDefinition() == Globals.TypeOfNullable) 734while (keyType.IsGenericType && keyType.GetGenericTypeDefinition() == Globals.TypeOfNullable)
System\Runtime\Serialization\Json\JsonFormatWriterGenerator.cs (3)
399if (interfaceType.IsGenericType 635bool isNullableOfT = (memberType.IsGenericType && 725while (memberType.IsGenericType && memberType.GetGenericTypeDefinition() == Globals.TypeOfNullable)
System\Runtime\Serialization\Json\ReflectionJsonFormatReader.cs (1)
154while (keyType.IsGenericType && keyType.GetGenericTypeDefinition() == Globals.TypeOfNullable)
System\Runtime\Serialization\Json\XmlObjectSerializerWriteContextComplexJson.cs (2)
359oldItemContract.UnderlyingType.IsGenericType && 412if (collectionContract.ItemType.IsGenericType
System\Runtime\Serialization\ReflectionClassWriter.cs (1)
50bool originValueIsNullableOfT = (memberType.IsGenericType && memberType.GetGenericTypeDefinition() == Globals.TypeOfNullable);
System\Runtime\Serialization\ReflectionReader.cs (2)
253while (type.IsGenericType && type.GetGenericTypeDefinition() == Globals.TypeOfNullable) 348while (type.IsGenericType && type.GetGenericTypeDefinition() == Globals.TypeOfNullable)
System\Runtime\Serialization\SchemaExporter.cs (4)
125if (classDataContract.UnderlyingType.IsGenericType) 267if (clrType.IsGenericType) 367if (collectionDataContract.UnderlyingType.IsGenericType && CollectionDataContract.IsCollectionDataContract(collectionDataContract.UnderlyingType)) 470if (dataContract.UnderlyingType.IsGenericType)
System\Runtime\Serialization\XmlFormatReaderGenerator.cs (1)
509while (type.IsGenericType && type.GetGenericTypeDefinition() == Globals.TypeOfNullable)
System\Runtime\Serialization\XmlFormatWriterGenerator.cs (3)
478if (interfaceType.IsGenericType 648bool isNullableOfT = (memberType.IsGenericType && 738while (memberType.IsGenericType && memberType.GetGenericTypeDefinition() == Globals.TypeOfNullable)
System.Private.Reflection.Execution (10)
Internal\Reflection\Execution\TypeLoader\ConstraintValidatorSupport.cs (2)
79return _underlyingType.IsGenericType; 248return type.IsGenericType && typeof(Nullable<>) == type.GetGenericTypeDefinition();
Internal\Reflection\Execution\TypeLoader\TypeCast.cs (8)
50if (pTargetType.IsGenericType) 65if (!pInterfaceType.IsGenericType) 239if (pTargetType.IsGenericType && pSourceType.IsGenericType) 347if (pTargetType.IsGenericType && pSourceType.IsGenericType) 385if (pType1.IsGenericType && pType2.IsGenericType)
System.Private.Windows.Core (4)
System\DisposalTracking.cs (1)
64if (type.IsGenericType)
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (2)
403return type.IsGenericType 716return type.IsGenericType
System\TypeExtensions.cs (1)
233type.IsGenericType && !type.IsGenericTypeDefinition && type.GetGenericTypeDefinition() == typeof(Nullable<>)
System.Private.Windows.Core.TestUtilities (1)
ReflectionHelper.cs (1)
73if (parentType.IsGenericType)
System.Private.Xml (14)
System\Xml\Serialization\CodeIdentifier.cs (1)
240Type[] arguments = t.IsGenericType || t.ContainsGenericParameters ? t.GetGenericArguments() : Type.EmptyTypes;
System\Xml\Serialization\Compilation.cs (1)
446if (t.IsGenericType && !t.IsGenericTypeDefinition)
System\Xml\Serialization\Compiler.cs (1)
54if (type.IsGenericType)
System\Xml\Serialization\SoapReflectionImporter.cs (1)
778if (type.IsGenericType && typeName.Contains('{'))
System\Xml\Serialization\Types.cs (3)
1014return t.IsGenericType && (t.GetGenericTypeDefinition() == typeof(ArraySegment<>)); 1019if (type.IsGenericType) 1041else if (t.IsGenericType)
System\Xml\Serialization\XmlReflectionImporter.cs (1)
978if (type.IsGenericType && typeName.Contains('{'))
System\Xml\Serialization\XmlSerializationGeneratedCode.cs (2)
188if (type.IsGenericType || type.ContainsGenericParameters && DynamicAssemblies.IsTypeDynamic(type.GetGenericArguments())) 353if (type.IsGenericType || type.ContainsGenericParameters && DynamicAssemblies.IsTypeDynamic(type.GetGenericArguments()))
System\Xml\Serialization\XmlSerializationILGen.cs (2)
251if (type.IsGenericType || type.ContainsGenericParameters) 454if (type.IsGenericType || type.ContainsGenericParameters)
System\Xml\Serialization\XmlSerializationReaderILGen.cs (1)
2935Debug.Assert(!localA.LocalType.IsGenericType || (localA.LocalType.GetGenericArguments().Length == 1 && localA.LocalType.GetGenericArguments()[0].IsAssignableFrom(elementType)));
System\Xml\Serialization\XmlSerializationWriter.cs (1)
1553else if (type.IsGenericType)
System.Reflection.Context (1)
System\Reflection\Context\Delegation\DelegatingType.cs (1)
89get { return _typeInfo.IsGenericType; }
System.Reflection.DispatchProxy (1)
System\Reflection\DispatchProxyGenerator.cs (1)
250if (type.IsGenericType)
System.Reflection.Emit (4)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeNameBuilder.cs (1)
290if (rootType.IsGenericType && (!rootType.IsGenericTypeDefinition || format == Format.ToString))
System\Reflection\Emit\ConstructorBuilderImpl.cs (1)
55if (DeclaringType!.IsGenericType)
System\Reflection\Emit\ModuleBuilderImpl.cs (1)
699(type.IsGenericType && !type.IsGenericTypeDefinition)
System\Reflection\Emit\SignatureHelper.cs (1)
186else if (type.IsGenericType)
System.Runtime.InteropServices.JavaScript (2)
System\Runtime\InteropServices\JavaScript\Marshaling\JSMarshalerArgument.Object.cs (2)
328else if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(ArraySegment<>)) 332else if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Span<>))
System.Runtime.Serialization.Formatters (1)
System\Runtime\Serialization\FormatterServices.cs (1)
353if (!type.IsGenericType)
System.Runtime.Serialization.Schema (1)
System\Runtime\Serialization\Schema\SchemaImportHelper.cs (1)
94(type.IsGenericType &&
System.ServiceModel.Primitives (2)
Extensions\ReflectionExtensions.cs (1)
69return type.GetTypeInfo().IsGenericType;
System\ServiceModel\Description\ServiceReflector.cs (1)
53if (t.GetTypeInfo().IsGenericType)
System.Text.Json (20)
src\runtime\src\libraries\System.Text.Json\Common\ReflectionExtensions.cs (8)
49Debug.Assert(baseType.IsGenericType); 57if (baseTypeToCheck.IsGenericType) 86Debug.Assert(interfaceType.IsGenericType); 92if (interfaceToCheck.IsGenericType) 104if (typeToCheck.IsGenericType) 119if (!type.IsGenericType || !type.Assembly.FullName!.StartsWith("System.Collections.Immutable", StringComparison.Ordinal)) 137if (!type.IsGenericType || !type.Assembly.FullName!.StartsWith("System.Collections.Immutable", StringComparison.Ordinal)) 225=> type.IsGenericType && type.GetGenericTypeDefinition() == typeof(KeyValuePair<,>);
System\ReflectionExtensions.cs (6)
23type.IsGenericType && type.GetGenericTypeDefinition() == s_nullableType; 187if (iface.IsGenericType && iface.GetGenericTypeDefinition() == baseTypeDefinition) 202if (current.IsGenericType && current.GetGenericTypeDefinition() == baseTypeDefinition) 289if (pattern.IsGenericType) 291if (!target.IsGenericType || pattern.GetGenericTypeDefinition() != target.GetGenericTypeDefinition()) 581type.IsGenericType && !type.IsGenericTypeDefinition ? type.GetGenericTypeDefinition() : type;
System\Text\Json\Serialization\Converters\Collection\MemoryConverterFactory.cs (1)
15if (!typeToConvert.IsGenericType || !typeToConvert.IsValueType)
System\Text\Json\Serialization\JsonSerializer.Read.HandlePropertyName.cs (1)
128Debug.Assert(underlyingIDictionaryType.IsGenericType);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Converters.cs (1)
209if (typeToConvert.IsGenericType &&
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (2)
220if (!baseType.IsGenericType) 503if (pattern.IsGenericType)
System\Text\Json\Serialization\Metadata\FSharpCoreReflectionProxy.cs (1)
156if (type.IsGenericType)
System.Windows.Forms (3)
System\Windows\Forms\DataBinding\ListBindingHelper.cs (2)
502if (type.IsGenericType && !type.IsGenericTypeDefinition) 513if (curInterface.IsGenericType)
System\Windows\Forms\Internal\Formatter.cs (1)
504if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>))
System.Windows.Forms.Design (3)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
83if (collectionItemType is { IsGenericType: true, GenericTypeArguments: [Type innerType] }
System\ComponentModel\Design\EventBindingService.cs (2)
148if (evInfo is null || !evInfo.EventHandlerType!.IsGenericType) 159if (args[i].IsGenericType)
System.Xaml (7)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\ReflectionHelper.cs (1)
122return (type.IsGenericType && (type.GetGenericTypeDefinition() == typeof(Nullable<>)));
System\Xaml\InfosetObjects\XamlObjectWriter.cs (1)
1454if (type is null || !type.IsGenericType)
System\Xaml\Schema\CollectionReflector.cs (2)
282if (type.IsGenericType && type.GetGenericTypeDefinition() == interfaceType) 289if (currentInterface.IsGenericType && currentInterface.GetGenericTypeDefinition() == interfaceType)
System\Xaml\Schema\TypeReflector.cs (1)
139if (type.IsGenericType)
System\Xaml\XamlObjectReader.cs (1)
1285if (!(parameterInfo.ParameterType.IsGenericType &&
System\Xaml\XamlType.cs (1)
1602if (!genericType.IsGenericType)