7 overrides of MakeGenericType
System.Private.CoreLib (5)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilder.cs (1)
319public override Type MakeGenericType(params Type[] typeArguments)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilderInstantiation.cs (1)
255public override Type MakeGenericType(params Type[] inst) { throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); }
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureType.cs (1)
54public sealed override Type MakeGenericType(params Type[] typeArguments) => throw new NotSupportedException(SR.NotSupported_SignatureType); // There is no SignatureType for type definition types so it would never be legal to call this.
src\System\Reflection\Emit\RuntimeGenericTypeParameterBuilder.cs (1)
200public override Type MakeGenericType(params Type[] typeArguments) { throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); }
src\System\RuntimeType.CoreCLR.cs (1)
3571public override Type MakeGenericType(Type[] instantiation)
System.Reflection.Context (1)
System\Reflection\Context\Delegation\DelegatingType.cs (1)
462public override Type MakeGenericType(params Type[] typeArguments)
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\Types\RoType.cs (1)
326public abstract override Type MakeGenericType(params Type[] typeArguments);
441 references to MakeGenericType
Aspire.Confluent.Kafka.Tests (2)
ReflectionHelpers.cs (2)
14public static readonly Lazy<Type> ProducerConnectionFactoryStringKeyStringValueType = new Lazy<Type>(() => ProducerConnectionFactoryType.Value.MakeGenericType(typeof(string), typeof(string))); 16public static readonly Lazy<Type> ConsumerConnectionFactoryStringKeyStringValueType = new Lazy<Type>(() => ConsumerConnectionFactoryType.Value.MakeGenericType(typeof(string), typeof(string)));
dotnet-svcutil.xmlserializer (1)
Microsoft\Tools\ServiceModel\SvcUtil\XmlSerializerGenerator.cs (1)
176keyedByTypeCollectionType = keyedByTypeCollectionType.MakeGenericType(new Type[] { iOperationBehaviorType });
dotnet-svcutil-lib (25)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriterILGen.cs (1)
1582Type typeIEnumerable = arrayTypeDesc.IsGenericInterface ? typeof(IEnumerable<>).MakeGenericType(arrayElementTypeDesc.Type) : typeof(IEnumerable);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ClassDataContract.cs (1)
1354_keyValuePairCtorInfo = type.GetConstructor(Globals.ScanAllMembers, new Type[] { Globals.TypeOfKeyValuePair.MakeGenericType(_keyValuePairGenericArguments) });
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CollectionDataContract.cs (7)
1039itemType = Globals.TypeOfKeyValue.MakeGenericType(genericArgs); 1041getEnumeratorMethod = Globals.TypeOfIEnumerableGeneric.MakeGenericType(Globals.TypeOfKeyValuePair.MakeGenericType(genericArgs)).GetMethod(Globals.GetEnumeratorMethodName); 1048var collectionType = Globals.TypeOfICollectionGeneric.MakeGenericType(itemType); 1054getEnumeratorMethod = Globals.TypeOfIEnumerableGeneric.MakeGenericType(itemType).GetMethod(Globals.GetEnumeratorMethodName); 1156itemType = isOpenGeneric ? Globals.TypeOfKeyValue : Globals.TypeOfKeyValue.MakeGenericType(addMethodTypeArray); 1160itemType = Globals.TypeOfKeyValue.MakeGenericType(addMethodTypeArray);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (2)
793return Globals.TypeOfKeyValuePairAdapter.MakeGenericType(type.GetGenericArguments()); 2144DataContract itemDataContract = DataContract.GetDataContract(Globals.TypeOfKeyValuePair.MakeGenericType(collectionDataContract.ItemType.GetGenericArguments()));
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\Globals.cs (1)
886s_typeOfHashtable = TypeOfDictionaryGeneric.MakeGenericType(TypeOfObject, TypeOfObject);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlFormatReaderGenerator.cs (3)
135_ilg.ConvertValue(Globals.TypeOfKeyValuePair.MakeGenericType(classContract.KeyValuePairGenericArguments), _ilg.CurrentMethod.ReturnType); 491Type type = Globals.TypeOfNullable.MakeGenericType(innerType); 511type = Globals.TypeOfDictionaryGeneric.MakeGenericType(itemType.GetGenericArguments());
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlFormatWriterGenerator.cs (5)
151_ilg.ConvertValue(objectArg.ArgType, Globals.TypeOfKeyValuePair.MakeGenericType(dc.KeyValuePairGenericArguments)); 351incrementCollectionCountMethod = XmlFormatGeneratorStatics.IncrementCollectionCountGenericMethod.MakeGenericMethod(Globals.TypeOfKeyValuePair.MakeGenericType(collectionContract.ItemType.GetGenericArguments())); 366enumeratorType = Globals.TypeOfGenericDictionaryEnumerator.MakeGenericType(keyValueTypes); 425Type ctorParam = Globals.TypeOfIEnumeratorGeneric.MakeGenericType(Globals.TypeOfKeyValuePair.MakeGenericType(keyValueTypes));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannelProxy.cs (1)
289GenericType = tcsType.MakeGenericType(new Type[] { resultType });
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DataContractSerializerOperationFormatter.cs (1)
463return s_typeOfIEnumerableGeneric.MakeGenericType(type.GetGenericArguments());
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\FaultFormatter.cs (2)
156Type knownFaultType = typeof(FaultException<>).MakeGenericType(detailType); 191Type operationFaultType = typeof(OperationFault<>).MakeGenericType(detailType);
FrameworkFork\System.ServiceModel\System\ServiceModel\MessageHeaderT.cs (1)
127result = (TypedHeaderManager)Activator.CreateInstance(s_GenericAdapterType.MakeGenericType(t));
illink (1)
ILLink.RoslynAnalyzer (1)
src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (1)
61 /// <see cref="System.Type.MakeGenericType(System.Type[])"/>
Microsoft.AspNetCore.Components (1)
Reflection\PropertySetter.cs (1)
35setMethod.CreateDelegate(typeof(Action<,>).MakeGenericType(targetType, property.PropertyType));
Microsoft.AspNetCore.Components.Endpoints (15)
FormMapping\Factories\CollectionConverterFactory.cs (2)
24.MakeGenericType(type, element!)) is not IFormDataConverterFactory factory) 62.MakeGenericType(type, elementType!)) as IFormDataConverterFactory;
FormMapping\Factories\Collections\ConcreteTypeCollectionConverterFactory.cs (1)
27.MakeGenericType(typeof(TCollection), typeof(TElement), typeof(TCollection))) as CustomCollectionConverterFactory;
FormMapping\Factories\ComplexType\ComplexTypeExpressionConverterFactoryOfT.cs (1)
537return Expression.Variable(typeof(ValueTuple<,>).MakeGenericType(typeof(bool), constructorParameter.Type), constructorParameter.Name);
FormMapping\Factories\ComplexTypeConverterFactory.cs (1)
101if (Activator.CreateInstance(typeof(ComplexTypeExpressionConverterFactory<>).MakeGenericType(type), MetadataFactory)
FormMapping\Factories\Dictionary\ConcreteTypeDictionaryConverterFactory.cs (1)
29.MakeGenericType(typeof(TDictionary), typeof(TKey), typeof(TValue), typeof(TDictionary))) as CustomDictionaryConverterFactory;
FormMapping\Factories\DictionaryConverterFactory.cs (2)
32.MakeGenericType(type, keyType, valueType)) is not IFormDataConverterFactory factory) 111.MakeGenericType(type, keyType, valueType)) as IFormDataConverterFactory;
FormMapping\Factories\EnumConverterFactory.cs (1)
23return (FormDataConverter)Activator.CreateInstance(typeof(EnumConverter<>).MakeGenericType(type))!;
FormMapping\Factories\FileConverterFactory.cs (1)
28return Activator.CreateInstance(typeof(FileConverter<>).MakeGenericType(type)) as FormDataConverter ??
FormMapping\Factories\NullableConverterFactory.cs (1)
31var expectedConverterType = typeof(NullableConverter<>).MakeGenericType(underlyingType);
FormMapping\Factories\ParsableConverterFactory.cs (1)
24return Activator.CreateInstance(typeof(ParsableConverter<>).MakeGenericType(type)) as FormDataConverter ??
FormMapping\HttpContextFormValueMapper.cs (1)
94.MakeGenericType(type))!;
src\Shared\PropertyHelper\PropertyHelper.cs (2)
251var delegateType = openGenericDelegateType.MakeGenericType(typeInput, typeOutput); 295setMethod.CreateDelegate(typeof(Action<,>).MakeGenericType(typeInput, parameterType));
Microsoft.AspNetCore.DataProtection (1)
AuthenticatedEncryption\ManagedAuthenticatedEncryptorFactory.cs (1)
118return ((IActivator<T>)Activator.CreateInstance(typeof(AlgorithmActivatorCore<>).MakeGenericType(implementation))!).Creator;
Microsoft.AspNetCore.Grpc.JsonTranscoding (11)
Internal\Json\JsonConverterFactoryForEnum.cs (1)
29typeof(EnumConverter<>).MakeGenericType(new Type[] { typeToConvert }),
Internal\Json\JsonConverterFactoryForWellKnownTypes.cs (1)
44converterType.MakeGenericType(new Type[] { typeToConvert }),
Internal\Json\JsonConverterFactoryForWrappers.cs (1)
42typeof(WrapperConverter<>).MakeGenericType(new Type[] { typeToConvert }),
Internal\Json\JsonConverterHelper.cs (5)
71return typeof(MapField<,>).MakeGenericType(GetFieldTypeCore(keyField), GetFieldTypeCore(valueField)); 77return typeof(RepeatedField<>).MakeGenericType(itemType); 103return nullableType ? typeof(Nullable<>).MakeGenericType(descriptor.EnumType.ClrType) : descriptor.EnumType.ClrType; 138var repeatedFieldType = typeof(Dictionary<,>).MakeGenericType(keyType, valueType); 152var repeatedFieldType = typeof(List<>).MakeGenericType(itemType);
Internal\JsonRequestHelpers.cs (2)
224type = typeof(Dictionary<,>).MakeGenericType(args[0], args[1]); 228type = typeof(List<>).MakeGenericType(args[0]);
src\Grpc\JsonTranscoding\src\Shared\Server\InterceptorPipelineBuilder.cs (1)
179var activatorType = typeof(IGrpcInterceptorActivator<>).MakeGenericType(Registration.Type);
Microsoft.AspNetCore.Grpc.Swagger (2)
Internal\MessageDescriptorHelpers.cs (2)
16return typeof(IDictionary<,>).MakeGenericType(typeof(string), valueType); 20return typeof(IList<>).MakeGenericType(GetTypeFromFieldType(field));
Microsoft.AspNetCore.Hosting (2)
GenericHost\GenericWebHostBuilder.cs (1)
291var actionType = typeof(Action<,>).MakeGenericType(typeof(HostBuilderContext), containerType);
Internal\StartupLoader.cs (1)
77return typeof(ConfigureServicesDelegateBuilder<>).MakeGenericType(type);
Microsoft.AspNetCore.Http.Abstractions (2)
src\Shared\PropertyHelper\PropertyHelper.cs (2)
251var delegateType = openGenericDelegateType.MakeGenericType(typeInput, typeOutput); 295setMethod.CreateDelegate(typeof(Action<,>).MakeGenericType(typeInput, parameterType));
Microsoft.AspNetCore.Http.Extensions (21)
RequestDelegateFactory.cs (6)
1148Expression.Constant(jsonTypeInfo, typeof(JsonTypeInfo<>).MakeGenericType(typeArg))); 1155Expression.Constant(jsonTypeInfo, typeof(JsonTypeInfo<>).MakeGenericType(typeArg))); 1196Expression.Constant(jsonTypeInfo, typeof(JsonTypeInfo<>).MakeGenericType(typeArg))); 1203Expression.Constant(jsonTypeInfo, typeof(JsonTypeInfo<>).MakeGenericType(typeArg))); 1239Expression.Constant(jsonTypeInfo, typeof(JsonTypeInfo<>).MakeGenericType(returnType))); 1247Expression.Constant(jsonTypeInfo, typeof(JsonTypeInfo<>).MakeGenericType(returnType)));
src\Components\Endpoints\src\FormMapping\Factories\CollectionConverterFactory.cs (2)
24.MakeGenericType(type, element!)) is not IFormDataConverterFactory factory) 62.MakeGenericType(type, elementType!)) as IFormDataConverterFactory;
src\Components\Endpoints\src\FormMapping\Factories\Collections\ConcreteTypeCollectionConverterFactory.cs (1)
27.MakeGenericType(typeof(TCollection), typeof(TElement), typeof(TCollection))) as CustomCollectionConverterFactory;
src\Components\Endpoints\src\FormMapping\Factories\ComplexType\ComplexTypeExpressionConverterFactoryOfT.cs (1)
537return Expression.Variable(typeof(ValueTuple<,>).MakeGenericType(typeof(bool), constructorParameter.Type), constructorParameter.Name);
src\Components\Endpoints\src\FormMapping\Factories\ComplexTypeConverterFactory.cs (1)
101if (Activator.CreateInstance(typeof(ComplexTypeExpressionConverterFactory<>).MakeGenericType(type), MetadataFactory)
src\Components\Endpoints\src\FormMapping\Factories\Dictionary\ConcreteTypeDictionaryConverterFactory.cs (1)
29.MakeGenericType(typeof(TDictionary), typeof(TKey), typeof(TValue), typeof(TDictionary))) as CustomDictionaryConverterFactory;
src\Components\Endpoints\src\FormMapping\Factories\DictionaryConverterFactory.cs (2)
32.MakeGenericType(type, keyType, valueType)) is not IFormDataConverterFactory factory) 111.MakeGenericType(type, keyType, valueType)) as IFormDataConverterFactory;
src\Components\Endpoints\src\FormMapping\Factories\EnumConverterFactory.cs (1)
23return (FormDataConverter)Activator.CreateInstance(typeof(EnumConverter<>).MakeGenericType(type))!;
src\Components\Endpoints\src\FormMapping\Factories\FileConverterFactory.cs (1)
28return Activator.CreateInstance(typeof(FileConverter<>).MakeGenericType(type)) as FormDataConverter ??
src\Components\Endpoints\src\FormMapping\Factories\NullableConverterFactory.cs (1)
31var expectedConverterType = typeof(NullableConverter<>).MakeGenericType(underlyingType);
src\Components\Endpoints\src\FormMapping\Factories\ParsableConverterFactory.cs (1)
24return Activator.CreateInstance(typeof(ParsableConverter<>).MakeGenericType(type)) as FormDataConverter ??
src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (3)
75awaitableType = typeof(Task<>).MakeGenericType(awaiterResultType); 220.MakeGenericType(typeof(TaskCreationOptions)); 226.MakeGenericType(typeof(CancellationToken));
Microsoft.AspNetCore.Identity (8)
IdentityBuilderExtensions.cs (8)
30var dataProtectionProviderType = typeof(DataProtectorTokenProvider<>).MakeGenericType(builder.UserType); 31var phoneNumberProviderType = typeof(PhoneNumberTokenProvider<>).MakeGenericType(builder.UserType); 32var emailTokenProviderType = typeof(EmailTokenProvider<>).MakeGenericType(builder.UserType); 33var authenticatorProviderType = typeof(AuthenticatorTokenProvider<>).MakeGenericType(builder.UserType); 44builder.Services.AddScoped(typeof(ISecurityStampValidator), typeof(SecurityStampValidator<>).MakeGenericType(builder.UserType)); 45builder.Services.AddScoped(typeof(ITwoFactorSecurityStampValidator), typeof(TwoFactorSecurityStampValidator<>).MakeGenericType(builder.UserType)); 58var managerType = typeof(SignInManager<>).MakeGenericType(builder.UserType); 73var managerType = typeof(SignInManager<>).MakeGenericType(builder.UserType);
Microsoft.AspNetCore.Identity.EntityFrameworkCore (9)
IdentityEntityFrameworkBuilderExtensions.cs (9)
53userStoreType = typeof(UserStore<,,,>).MakeGenericType(userType, roleType, contextType, keyType); 54roleStoreType = typeof(RoleStore<,,>).MakeGenericType(roleType, contextType, keyType); 58userStoreType = typeof(UserStore<,,,,,,,,>).MakeGenericType(userType, roleType, contextType, 65roleStoreType = typeof(RoleStore<,,,,>).MakeGenericType(roleType, contextType, 70services.TryAddScoped(typeof(IUserStore<>).MakeGenericType(userType), userStoreType); 71services.TryAddScoped(typeof(IRoleStore<>).MakeGenericType(roleType), roleStoreType); 80userStoreType = typeof(UserOnlyStore<,,>).MakeGenericType(userType, contextType, keyType); 84userStoreType = typeof(UserOnlyStore<,,,,,>).MakeGenericType(userType, contextType, 90services.TryAddScoped(typeof(IUserStore<>).MakeGenericType(userType), userStoreType);
Microsoft.AspNetCore.Identity.UI (2)
IdentityBuilderUIExtensions.cs (1)
61.MakeGenericType(builder.UserType));
IdentityPageModelConvention.cs (1)
20var templateInstance = defaultUIAttribute.Template.MakeGenericType(typeof(TUser));
Microsoft.AspNetCore.JsonPatch (3)
Adapters\AdapterFactory.cs (1)
40var type = typeof(DictionaryAdapter<,>).MakeGenericType(jsonDictionaryContract.DictionaryKeyType, jsonDictionaryContract.DictionaryValueType);
Converters\TypedJsonPatchDocumentConverter.cs (2)
34var concreteOperationType = genericOperation.MakeGenericType(genericType); 37var concreteList = genericList.MakeGenericType(concreteOperationType);
Microsoft.AspNetCore.Mvc.Core (8)
ModelBinding\Binders\ArrayModelBinderProvider.cs (1)
25var binderType = typeof(ArrayModelBinder<>).MakeGenericType(elementType);
ModelBinding\Binders\CollectionModelBinderProvider.cs (1)
56var binderType = typeof(CollectionModelBinder<>).MakeGenericType(collectionType.GenericTypeArguments);
ModelBinding\Binders\KeyValuePairModelBinderProvider.cs (1)
33var binderType = typeof(KeyValuePairModelBinder<,>).MakeGenericType(typeArguments);
src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (3)
75awaitableType = typeof(Task<>).MakeGenericType(awaiterResultType); 220.MakeGenericType(typeof(TaskCreationOptions)); 226.MakeGenericType(typeof(CancellationToken));
src\Shared\PropertyHelper\PropertyHelper.cs (2)
251var delegateType = openGenericDelegateType.MakeGenericType(typeInput, typeOutput); 295setMethod.CreateDelegate(typeof(Action<,>).MakeGenericType(typeInput, parameterType));
Microsoft.AspNetCore.Mvc.Core.Test (3)
DependencyInjection\MvcCoreServiceCollectionExtensionsTest.cs (2)
39var mockType = typeof(Mock<>).MakeGenericType(serviceType.Key); 67var mockType = typeof(Mock<>).MakeGenericType(serviceType);
ModelBinding\Binders\ArrayModelBinderProviderTest.cs (1)
48Assert.IsType(typeof(ArrayModelBinder<>).MakeGenericType(modelType.GetElementType()), result);
Microsoft.AspNetCore.Mvc.Razor (1)
RazorPagePropertyActivator.cs (1)
35_viewDataDictionaryType = typeof(ViewDataDictionary<>).MakeGenericType(viewDataDictionaryModelType);
Microsoft.AspNetCore.Mvc.Test (3)
MvcServiceCollectionExtensionsTest.cs (3)
64var mockType = typeof(Mock<>).MakeGenericType(serviceType.Key); 148var mockType = typeof(Mock<>).MakeGenericType(serviceType); 421scope.ServiceProvider.GetService(typeof(IEnumerable<>).MakeGenericType(serviceType));
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
ViewDataDictionaryFactory.cs (2)
16var type = typeof(ViewDataDictionary<>).MakeGenericType(modelType); 37var type = typeof(ViewDataDictionary<>).MakeGenericType(modelType);
Microsoft.AspNetCore.OpenApi (3)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (3)
75awaitableType = typeof(Task<>).MakeGenericType(awaiterResultType); 220.MakeGenericType(typeof(TaskCreationOptions)); 226.MakeGenericType(typeof(CancellationToken));
Microsoft.AspNetCore.Routing (3)
Matching\ILEmitTrieFactory.cs (1)
705types: new[] { typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), },
src\Shared\PropertyHelper\PropertyHelper.cs (2)
251var delegateType = openGenericDelegateType.MakeGenericType(typeInput, typeOutput); 295setMethod.CreateDelegate(typeof(Action<,>).MakeGenericType(typeInput, parameterType));
Microsoft.AspNetCore.Routing.Abstractions (2)
src\Shared\PropertyHelper\PropertyHelper.cs (2)
251var delegateType = openGenericDelegateType.MakeGenericType(typeInput, typeOutput); 295setMethod.CreateDelegate(typeof(Action<,>).MakeGenericType(typeInput, parameterType));
Microsoft.AspNetCore.Shared.Tests (8)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (3)
75awaitableType = typeof(Task<>).MakeGenericType(awaiterResultType); 220.MakeGenericType(typeof(TaskCreationOptions)); 226.MakeGenericType(typeof(CancellationToken));
src\Shared\PropertyHelper\PropertyHelper.cs (2)
251var delegateType = openGenericDelegateType.MakeGenericType(typeInput, typeOutput); 295setMethod.CreateDelegate(typeof(Action<,>).MakeGenericType(typeInput, parameterType));
TypeNameHelperTest.cs (3)
125var closedDictionaryType = openDictionaryType.MakeGenericType(genArgsDictionary); 130var closedLevelType = openLevelType.MakeGenericType(genArgsLevel); 135var closedInnerType = openInnerType.MakeGenericType(genArgsInnerType);
Microsoft.AspNetCore.SignalR.Core (3)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (3)
75awaitableType = typeof(Task<>).MakeGenericType(awaiterResultType); 220.MakeGenericType(typeof(TaskCreationOptions)); 226.MakeGenericType(typeof(CancellationToken));
Microsoft.AspNetCore.SignalR.Tests (2)
HubConnectionHandlerTestUtils\Utils.cs (2)
19return connectionHandlerType.MakeGenericType(hubType); 24return genericType.MakeGenericType(hubType);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Compilation\CompilationAPITests.cs (1)
2396var open = typeof(Dictionary<,>).MakeGenericType(typeof(int), genericParameter);
Microsoft.CodeAnalysis.EditorFeatures.Wpf (4)
Lightup\ISmartRenameSessionWrapper.cs (4)
65s_renameContextImmutableListBuilderAddAccessor = LightupHelpers.CreateActionAccessor<object, object>(typeof(ImmutableArray<>.Builder).MakeGenericType(s_wrappedRenameContextType), 68s_renameContextImmutableListBuilderToArrayAccessor = LightupHelpers.CreateFunctionAccessor<object, object>(typeof(ImmutableArray<>.Builder).MakeGenericType(s_wrappedRenameContextType), 70typeof(ImmutableArray<>).MakeGenericType(s_wrappedRenameContextType)); 72var immutableArrayOfRenameContextType = typeof(ImmutableArray<>).MakeGenericType(s_wrappedRenameContextType);
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (2)
Debugger\Engine\DkmClrModuleInstance.cs (1)
59type = type.MakeGenericType(typeArgs);
Debugger\MemberInfo\TypeImpl.cs (1)
343return (TypeImpl)this.Type.MakeGenericType(argTypes.Select(t => ((TypeImpl)t).Type).ToArray());
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Protocol\Converters\SumConverter.cs (2)
25var converterType = typeof(SumConverter<>).MakeGenericType(typeToConvert); 164var expression = (LambdaExpression)expressionLambdaMethod.Invoke(null, [typeof(StjReader<>).MakeGenericType(constructor.DeclaringType), body, new[] { param1, param2 }])!;
Microsoft.CodeAnalysis.Scripting (1)
Hosting\ObjectFormatter\ObjectFormatterHelpers.cs (1)
119proxyType = proxyType.MakeGenericType(type.GenericTypeArguments);
Microsoft.CodeAnalysis.UnitTests (1)
Collections\DebuggerAttributes.cs (1)
122proxyType = proxyType.MakeGenericType(genericTypeArguments);
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Compilation\CompilationAPITests.vb (1)
2607Dim open = GetType(Dictionary(Of,)).MakeGenericType(GetType(Integer), genericParameter)
Microsoft.CSharp (2)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\AggregateType.cs (1)
332return uninstantiatedType.MakeGenericType(systemTypeArgs);
Microsoft\CSharp\RuntimeBinder\Semantics\Types\NullableType.cs (1)
51get => typeof(Nullable<>).MakeGenericType(UnderlyingType.AssociatedSystemType);
Microsoft.Extensions.Caching.Hybrid.Tests (2)
TypeTests.cs (2)
22Assert.True((bool)typeof(ImmutableTypeCache<>).MakeGenericType(type) 38Assert.False((bool)typeof(ImmutableTypeCache<>).MakeGenericType(type)
Microsoft.Extensions.Configuration.Binder (4)
ConfigurationBinder.cs (4)
434Type genericType = typeof(List<>).MakeGenericType(type.GenericTypeArguments); 652dictionaryType = typeof(Dictionary<,>).MakeGenericType(keyType, valueType); 659Type kvpType = typeof(KeyValuePair<,>).MakeGenericType(keyType, valueType); 879Type genericType = typeof(HashSet<>).MakeGenericType(elementType);
Microsoft.Extensions.DependencyInjection (2)
ServiceLookup\CallSiteFactory.cs (1)
440closedType = implementationType.MakeGenericType(genericTypeArguments);
ServiceLookup\IEnumerableCallSite.cs (1)
27public override Type ServiceType => typeof(IEnumerable<>).MakeGenericType(ItemType);
Microsoft.Extensions.DependencyInjection.Abstractions (2)
ServiceProviderKeyedServiceExtensions.cs (1)
117Type? genericEnumerable = typeof(IEnumerable<>).MakeGenericType(serviceType);
ServiceProviderServiceExtensions.cs (1)
93Type? genericEnumerable = typeof(IEnumerable<>).MakeGenericType(serviceType);
Microsoft.Extensions.DependencyInjection.AutoActivation (2)
AutoActivationExtensions.cs (1)
84static Type GetEnumerableServiceType(Type serviceType) => typeof(IEnumerable<>).MakeGenericType(serviceType);
AutoActivationExtensions.Keyed.cs (1)
87static Type GetEnumerableServiceType(Type serviceType) => typeof(IEnumerable<>).MakeGenericType(serviceType);
Microsoft.Extensions.Identity.Core (12)
IdentityBuilder.cs (12)
88=> AddScoped(typeof(IUserValidator<>).MakeGenericType(UserType), typeof(TValidator)); 97=> AddScoped(typeof(IUserClaimsPrincipalFactory<>).MakeGenericType(UserType), typeof(TFactory)); 117=> AddScoped(typeof(IPasswordValidator<>).MakeGenericType(UserType), typeof(TValidator)); 126=> AddScoped(typeof(IUserStore<>).MakeGenericType(UserType), typeof(TStore)); 146if (!typeof(IUserTwoFactorTokenProvider<>).MakeGenericType(UserType).IsAssignableFrom(provider)) 176var userManagerType = typeof(UserManager<>).MakeGenericType(UserType); 200Services.AddScoped(typeof(IUserClaimsPrincipalFactory<>).MakeGenericType(UserType), typeof(UserClaimsPrincipalFactory<,>).MakeGenericType(UserType, RoleType)); 216return AddScoped(typeof(IRoleValidator<>).MakeGenericType(RoleType), typeof(TRole)); 247return AddScoped(typeof(IRoleStore<>).MakeGenericType(RoleType), typeof(TStore)); 262var managerType = typeof(RoleManager<>).MakeGenericType(RoleType); 282=> AddScoped(typeof(IUserConfirmation<>).MakeGenericType(UserType), typeof(TUserConfirmation));
Microsoft.JSInterop (3)
Infrastructure\DotNetObjectReferenceJsonConverterFactory.cs (1)
29var converterType = typeof(DotNetObjectReferenceJsonConverter<>).MakeGenericType(instanceType);
Infrastructure\TaskGenericsUtil.cs (2)
34typeof(TaskResultGetter<>).MakeGenericType(resultType))!; 110typeof(TcsResultSetter<>).MakeGenericType(resultType))!;
Microsoft.Maui (3)
Hosting\ImageSources\ImageSourceServiceProvider.cs (2)
45 var genericConcreteType = ImageSourceServiceType.MakeGenericType(type); 52 return ImageSourceServiceType.MakeGenericType(GetImageSourceType(type));
HotReload\HotReloadHelper.cs (1)
183 newType = pair.Value.GetGenericTypeDefinition().MakeGenericType(newHandler);
Microsoft.Maui.Controls.Xaml (1)
XamlParser.cs (1)
422 type = type.MakeGenericType(args);
Microsoft.ML.Core (1)
CommandLine\CmdParser.cs (1)
2327componentFactoryType.MakeGenericType(factoryType.GenericTypeArguments),
Microsoft.ML.Data (22)
Data\DataViewUtils.cs (2)
868pipeType = typeof(ImplVec<>).MakeGenericType(vectorType.ItemType.RawType); 872pipeType = typeof(ImplOne<>).MakeGenericType(type.RawType);
DataLoadSave\Binary\BinaryLoader.cs (3)
513entryType = typeof(MetadataTableOfContentsEntry.ImplVec<>).MakeGenericType(args); 517entryType = typeof(MetadataTableOfContentsEntry.ImplOne<>).MakeGenericType(type.RawType); 1455genType = genType.MakeGenericType(entry.Type.RawType);
DataLoadSave\Binary\BinarySaver.cs (1)
97Type writePipeType = typeof(WritePipe<>).MakeGenericType(col.Codec.Type.RawType);
DataLoadSave\Binary\Codecs.cs (5)
1151Type codecType = typeof(VBufferCodec<>).MakeGenericType(itemType.RawType); 1167Type codecType = typeof(VBufferCodec<>).MakeGenericType(itemType.RawType); 1264Type codecType = typeof(KeyCodecOld<>).MakeGenericType(itemType.RawType); 1352Type codecType = typeof(KeyCodec<>).MakeGenericType(itemType.RawType); 1369Type codecType = typeof(KeyCodec<>).MakeGenericType(type.RawType);
DataLoadSave\Text\TextSaver.cs (2)
67writePipeType = typeof(VecValueWriter<>).MakeGenericType(vectorType.ItemType.RawType); 69writePipeType = typeof(ValueWriter<>).MakeGenericType(type.RawType);
DataView\CacheDataView.cs (2)
1290pipeType = typeof(ImplVec<>).MakeGenericType(vectorType.ItemType.RawType); 1294pipeType = typeof(ImplOne<>).MakeGenericType(type.RawType);
EntryPoints\EntryPointNode.cs (1)
298type = typeof(Dictionary<,>).MakeGenericType(typeof(string), type);
Prediction\Calibrator.cs (1)
820Type constructed = calibratedModelParametersType.MakeGenericType(genericTypeArgs);
Scorers\PredictionTransformer.cs (2)
811Type constructedType = predictionTransformerType.MakeGenericType(genericTypeArgs); 838return genericType.MakeGenericType(typeArguments);
Transforms\Hashing.cs (1)
1517t = t.MakeGenericType(itemType.RawType);
Transforms\RowShufflingTransformer.cs (2)
380pipeType = typeof(ImplVec<>).MakeGenericType(vectorType.ItemType.RawType); 384pipeType = typeof(ImplOne<>).MakeGenericType(type.RawType);
Microsoft.ML.DataView (1)
VectorType.cs (1)
91return typeof(VBuffer<>).MakeGenericType(itemType.RawType);
Microsoft.ML.IntegrationTests (1)
Common.cs (1)
41types[property.Name] = vBufferType.MakeGenericType(typeArgs);
Microsoft.ML.OnnxTransformer (10)
OnnxMapType.cs (2)
25public OnnxMapType(Type keyType, Type valueType) : base(typeof(IDictionary<,>).MakeGenericType(keyType, valueType)) 97var type = enumerableType.MakeGenericType(_keyType, _valueType);
OnnxSequenceType.cs (2)
23var enumerableType = enumerableTypeInfo.MakeGenericType(elementType); 101var type = enumerableType.MakeGenericType(_elemType);
OnnxTypeParser.cs (6)
91return tensorType.MakeGenericType(elementType); 98return enumerableType.MakeGenericType(elementType); 105return dictionaryType.MakeGenericType(keyType, valueType); 327resultedType = typeof(Tensor<>).MakeGenericType(type); 343resultedType = typeof(IEnumerable<>).MakeGenericType(elementType); 367resultedType = typeof(IDictionary<,>).MakeGenericType(keyType, valueType);
Microsoft.ML.Parquet (1)
PartitionedFileLoader.cs (1)
683var returnType = typeof(ValueGetter<>).MakeGenericType(type);
Microsoft.ML.Transforms (3)
Expression\CodeGen.cs (1)
71_delType = typeFn.MakeGenericType(types);
GroupTransform.cs (1)
456var cons = type.MakeGenericType(colType.RawType).GetConstructor(new[] { typeof(DataViewRow), typeof(int) });
PermutationFeatureImportanceExtensions.cs (1)
687Type pfiGenericType = typeof(PermutationFeatureImportance<,,>).MakeGenericType(types);
Microsoft.VisualBasic.Core (3)
Microsoft\VisualBasic\CompilerServices\ConversionResolution.vb (1)
414GetType(System.Collections.Generic.IList(Of )).MakeGenericType(New Type() {sourceElementType}))
Microsoft\VisualBasic\CompilerServices\IDOBinder.vb (1)
1380Dim CallSiteType As Type = GetType(CallSite(Of )).MakeGenericType(CallSiteDelegate)
Microsoft\VisualBasic\CompilerServices\OverloadResolution.vb (1)
1031GetType(System.Collections.Generic.IList(Of )).MakeGenericType(New Type() {argumentType.GetElementType})
PresentationFramework (4)
MS\Internal\WindowsRuntime\Generated\WinRT\Projections.cs (3)
45? abiTypeDefinition.MakeGenericType(publicType.GetGenericArguments()) 64? publicTypeDefinition.MakeGenericType(abiType.GetGenericArguments()) 173compatibleType = definition.MakeGenericType(newArguments);
MS\Internal\WindowsRuntime\Generated\WinRT\TypeExtensions.cs (1)
53vftblType = vftblType.MakeGenericType(helperType.GetGenericArguments());
PresentationFramework-SystemCore (2)
DynamicAccessorImpl.cs (2)
79callsiteType = typeof(CallSite<>).MakeGenericType(new Type[]{ delegateType }); 99callsiteType = typeof(CallSite<>).MakeGenericType(new Type[]{ delegateType });
System.ComponentModel.Composition (7)
Microsoft\Internal\Collections\CollectionServices.CollectionOfObject.cs (1)
32Type collectionType = typeof(CollectionOfObject<>).MakeGenericType(underlyingItemType);
System\ComponentModel\Composition\Hosting\CompositionServices.cs (2)
76return specifiedContractType.MakeGenericType(typeGenericArguments); 85return specifiedContractType.GetGenericTypeDefinition().MakeGenericType(memberGenericParameters.ToArray());
System\ComponentModel\Composition\ReflectionModel\ExportfactoryCreator.cs (2)
47Type constructed = _exportFactoryType.MakeGenericType(typeArgs); 60Type constructed = _exportFactoryType.MakeGenericType(typeArgs);
System\ComponentModel\Composition\ReflectionModel\GenericServices.cs (1)
131return type.GetGenericTypeDefinition().MakeGenericType(subSpecialization);
System\ComponentModel\Composition\ReflectionModel\GenericSpecializationPartCreationInfo.cs (1)
47() => _originalPartCreationInfo.GetPartType().MakeGenericType(specialization),
System.Composition.TypedParts (3)
System\Composition\TypedParts\Discovery\DiscoveredInstanceExport.cs (1)
24var closedContractType = Contract.ContractType.MakeGenericType(genericArguments);
System\Composition\TypedParts\Discovery\DiscoveredPart.cs (1)
244var closedType = _partType.MakeGenericType(typeArguments).GetTypeInfo();
System\Composition\TypedParts\Discovery\DiscoveredPropertyExport.cs (1)
38var closedContractType = Contract.ContractType.MakeGenericType(genericArguments);
System.Diagnostics.DiagnosticSource (3)
System\Diagnostics\DsesFilterAndTransform.cs (2)
788.GetTypeInfo().MakeGenericType(elemType); 804Type instantiatedTypedPropertyFetcher = typedPropertyFetcher.GetTypeInfo().MakeGenericType(
System\Diagnostics\Metrics\AggregationManager.cs (1)
302Type instrumentStateType = typeof(InstrumentState<>).MakeGenericType(aggregatorType);
System.Linq.Expressions (57)
System\Dynamic\Utils\TypeUtils.cs (1)
30return typeof(Nullable<>).MakeGenericType(type);
System\Linq\Expressions\Compiler\CompilerScope.cs (1)
324Type boxType = typeof(StrongBox<>).MakeGenericType(v.Type);
System\Linq\Expressions\Compiler\CompilerScope.Storage.cs (2)
115Type boxType = typeof(StrongBox<>).MakeGenericType(variable.Type); 167Type boxType = typeof(StrongBox<>).MakeGenericType(variable.Type);
System\Linq\Expressions\Compiler\DelegateHelpers.Generated.cs (41)
117case 2: return typeof(VBCallSiteDelegate0<>).MakeGenericType(types[0]); 118case 3: return typeof(VBCallSiteDelegate1<>).MakeGenericType(types[0]); 119case 4: return typeof(VBCallSiteDelegate2<>).MakeGenericType(types[0]); 120case 5: return typeof(VBCallSiteDelegate3<>).MakeGenericType(types[0]); 121case 6: return typeof(VBCallSiteDelegate4<>).MakeGenericType(types[0]); 122case 7: return typeof(VBCallSiteDelegate5<>).MakeGenericType(types[0]); 123case 8: return typeof(VBCallSiteDelegate6<>).MakeGenericType(types[0]); 124case 9: return typeof(VBCallSiteDelegate7<>).MakeGenericType(types[0]); 193return typeof(Func<>).MakeGenericType(types); 195return typeof(Func<,>).MakeGenericType(types); 197return typeof(Func<,,>).MakeGenericType(types); 199return typeof(Func<,,,>).MakeGenericType(types); 201return typeof(Func<,,,,>).MakeGenericType(types); 203return typeof(Func<,,,,,>).MakeGenericType(types); 205return typeof(Func<,,,,,,>).MakeGenericType(types); 207return typeof(Func<,,,,,,,>).MakeGenericType(types); 209return typeof(Func<,,,,,,,,>).MakeGenericType(types); 211return typeof(Func<,,,,,,,,,>).MakeGenericType(types); 213return typeof(Func<,,,,,,,,,,>).MakeGenericType(types); 215return typeof(Func<,,,,,,,,,,,>).MakeGenericType(types); 217return typeof(Func<,,,,,,,,,,,,>).MakeGenericType(types); 219return typeof(Func<,,,,,,,,,,,,,>).MakeGenericType(types); 221return typeof(Func<,,,,,,,,,,,,,,>).MakeGenericType(types); 223return typeof(Func<,,,,,,,,,,,,,,,>).MakeGenericType(types); 225return typeof(Func<,,,,,,,,,,,,,,,,>).MakeGenericType(types); 241return typeof(Action<>).MakeGenericType(types); 243return typeof(Action<,>).MakeGenericType(types); 245return typeof(Action<,,>).MakeGenericType(types); 247return typeof(Action<,,,>).MakeGenericType(types); 249return typeof(Action<,,,,>).MakeGenericType(types); 251return typeof(Action<,,,,,>).MakeGenericType(types); 253return typeof(Action<,,,,,,>).MakeGenericType(types); 255return typeof(Action<,,,,,,,>).MakeGenericType(types); 257return typeof(Action<,,,,,,,,>).MakeGenericType(types); 259return typeof(Action<,,,,,,,,,>).MakeGenericType(types); 261return typeof(Action<,,,,,,,,,,>).MakeGenericType(types); 263return typeof(Action<,,,,,,,,,,,>).MakeGenericType(types); 265return typeof(Action<,,,,,,,,,,,,>).MakeGenericType(types); 267return typeof(Action<,,,,,,,,,,,,,>).MakeGenericType(types); 269return typeof(Action<,,,,,,,,,,,,,,>).MakeGenericType(types); 271return typeof(Action<,,,,,,,,,,,,,,,>).MakeGenericType(types);
System\Linq\Expressions\Interpreter\CallInstruction.Generated.cs (9)
175t = typeof(ActionCallInstruction<>).MakeGenericType(arrTypes); 178t = typeof(ActionCallInstruction<,>).MakeGenericType(arrTypes); 181t = typeof(ActionCallInstruction<,,>).MakeGenericType(arrTypes); 184t = typeof(ActionCallInstruction<,,,>).MakeGenericType(arrTypes); 195t = typeof(FuncCallInstruction<>).MakeGenericType(arrTypes); 198t = typeof(FuncCallInstruction<,>).MakeGenericType(arrTypes); 201t = typeof(FuncCallInstruction<,,>).MakeGenericType(arrTypes); 204t = typeof(FuncCallInstruction<,,,>).MakeGenericType(arrTypes); 207t = typeof(FuncCallInstruction<,,,,>).MakeGenericType(arrTypes);
System\Linq\Expressions\LambdaExpression.cs (2)
626create = typeof(Expression<>).MakeGenericType(delegateType).GetMethod("Create", BindingFlags.Static | BindingFlags.NonPublic)!; 630create = typeof(ExpressionCreator<>).MakeGenericType(delegateType).GetMethod("CreateExpressionFunc", BindingFlags.Static | BindingFlags.Public)!;
System\Runtime\CompilerServices\CallSite.cs (1)
102MethodInfo method = typeof(CallSite<>).MakeGenericType(delegateType).GetMethod(nameof(Create))!;
System.Linq.Queryable (8)
System\Linq\EnumerableExecutor.cs (1)
21Type execType = typeof(EnumerableExecutor<>).MakeGenericType(expression.Type);
System\Linq\EnumerableQuery.cs (2)
22Type seqType = typeof(EnumerableQuery<>).MakeGenericType(elementType); 30Type seqType = typeof(EnumerableQuery<>).MakeGenericType(elementType);
System\Linq\EnumerableRewriter.cs (5)
130return typeof(IGrouping<,>).MakeGenericType(t.GetGenericArguments()); 166equiv = typeof(IOrderedEnumerable<>).MakeGenericType(pubType.GenericTypeArguments[0]); 170equiv = typeof(IEnumerable<>).MakeGenericType(pubType.GenericTypeArguments[0]); 185equiv = typeof(IOrderedEnumerable<>).MakeGenericType(typeArg); 193equiv = typeof(IEnumerable<>).MakeGenericType(typeArg);
System.Private.CoreLib (14)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\PropertyValue.cs (2)
195var helper = (TypeHelper)Activator.CreateInstance(typeof(ReferenceTypeHelper<>).MakeGenericType(property.DeclaringType!))!; 207return property.GetMethod!.CreateDelegate(typeof(Func<,>).MakeGenericType(property.DeclaringType!, propertyType));
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilder.cs (3)
361type = type.MakeGenericType(type.GetGenericArguments()); 394type = type.MakeGenericType(type.GetGenericArguments()); 427type = type.MakeGenericType(type.GetGenericArguments());
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilderInstantiation.cs (1)
139return GetGenericTypeDefinition().MakeGenericType(instSubstituted);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureTypeExtensions.cs (1)
221return type.MakeGenericType(instantiation);
src\libraries\System.Private.CoreLib\src\System\Reflection\TypeNameResolver.cs (1)
116return type.MakeGenericType(genericTypes);
src\System\Collections\Generic\ComparerHelpers.cs (2)
36if (typeof(IComparable<>).MakeGenericType(type).IsAssignableFrom(type)) 73else if (type.IsAssignableTo(typeof(IEquatable<>).MakeGenericType(type)))
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (1)
1258Type inst = genericTypeDefinition.MakeGenericType(m_typeParent.GetGenericArguments());
src\System\RuntimeType.CoreCLR.cs (3)
1018AddSpecialInterface(ref list, filter, (RuntimeType)typeof(IList<>).MakeGenericType(arrayType), true); 1022AddSpecialInterface(ref list, filter, (RuntimeType)typeof(IReadOnlyList<>).MakeGenericType(arrayType), false); 1023AddSpecialInterface(ref list, filter, (RuntimeType)typeof(IReadOnlyCollection<>).MakeGenericType(arrayType), false);
System.Private.DataContractSerialization (33)
System\Runtime\Serialization\ClassDataContract.cs (2)
1339boundType = type.MakeGenericType(underlyingParamTypes); 1360boundType = type.MakeGenericType(paramTypes);
System\Runtime\Serialization\CollectionDataContract.cs (10)
772MethodInfo? buildIncrementCollectionCountDelegate = GetBuildIncrementCollectionCountGenericDelegate(typeof(KeyValuePair<,>).MakeGenericType(ItemType.GetGenericArguments())); 850enumeratorType = Globals.TypeOfGenericDictionaryEnumerator.MakeGenericType(keyValueTypes); 1063itemType = Globals.TypeOfKeyValue.MakeGenericType(genericArgs); 1065getEnumeratorMethod = Globals.TypeOfIEnumerableGeneric.MakeGenericType(Globals.TypeOfKeyValuePair.MakeGenericType(genericArgs)).GetMethod(Globals.GetEnumeratorMethodName)!; 1072addMethod = Globals.TypeOfICollectionGeneric.MakeGenericType(itemType).GetMethod(Globals.AddMethodName); 1074getEnumeratorMethod = Globals.TypeOfIEnumerableGeneric.MakeGenericType(itemType).GetMethod(Globals.GetEnumeratorMethodName)!; 1211itemType = isOpenGeneric ? Globals.TypeOfKeyValue : Globals.TypeOfKeyValue.MakeGenericType(addMethodTypeArray); 1215itemType = Globals.TypeOfKeyValue.MakeGenericType(addMethodTypeArray); 1395Type boundType = type.MakeGenericType(paramTypes);
System\Runtime\Serialization\DataContract.cs (1)
2027DataContract itemDataContract = DataContract.GetDataContract(Globals.TypeOfKeyValuePair.MakeGenericType(collectionDataContract.ItemType.GetGenericArguments()));
System\Runtime\Serialization\Globals.cs (1)
305get => s_typeOfHashtable ??= TypeOfDictionaryGeneric.MakeGenericType(TypeOfObject, TypeOfObject);
System\Runtime\Serialization\Json\DataContractJsonSerializer.cs (1)
566itemType = Globals.TypeOfKeyValuePair.MakeGenericType(itemType.GenericTypeArguments);
System\Runtime\Serialization\Json\JsonDataContract.cs (1)
298DataContract itemDataContract = DataContract.GetDataContract(Globals.TypeOfKeyValuePair.MakeGenericType(collectionDataContract.ItemType.GenericTypeArguments));
System\Runtime\Serialization\Json\JsonFormatReaderGenerator.cs (2)
590Type type = Globals.TypeOfNullable.MakeGenericType(innerType); 610type = Globals.TypeOfDictionaryGeneric.MakeGenericType(itemType.GetGenericArguments());
System\Runtime\Serialization\Json\JsonFormatWriterGenerator.cs (7)
354incrementCollectionCountMethod = XmlFormatGeneratorStatics.IncrementCollectionCountGenericMethod.MakeGenericMethod(Globals.TypeOfKeyValuePair.MakeGenericType(collectionContract.ItemType.GetGenericArguments())); 369enumeratorType = Globals.TypeOfGenericDictionaryEnumerator.MakeGenericType(keyValueTypes); 427Type ctorParam = Globals.TypeOfIEnumeratorGeneric.MakeGenericType(Globals.TypeOfKeyValuePair.MakeGenericType(keyValueTypes)); 438Type genericDictionaryKeyValueType = Globals.TypeOfKeyValue.MakeGenericType(keyValueTypes); 729_ilg.Call(typeof(Nullable<>).MakeGenericType(innerType).GetMethod("get_HasValue")!); 731_ilg.Call(typeof(Nullable<>).MakeGenericType(innerType).GetMethod("get_Value")!);
System\Runtime\Serialization\Json\XmlObjectSerializerWriteContextComplexJson.cs (1)
415itemContract = context.GetDataContract(Globals.TypeOfKeyValuePair.MakeGenericType(collectionContract.ItemType.GetGenericArguments()));
System\Runtime\Serialization\ReflectionReader.cs (1)
489Type type = Globals.TypeOfDictionaryGeneric.MakeGenericType(collectionContract.ItemType.GetGenericArguments());
System\Runtime\Serialization\XmlFormatReaderGenerator.cs (2)
623Type type = Globals.TypeOfNullable.MakeGenericType(innerType); 646type = Globals.TypeOfDictionaryGeneric.MakeGenericType(itemType.GetGenericArguments());
System\Runtime\Serialization\XmlFormatWriterGenerator.cs (4)
433incrementCollectionCountMethod = XmlFormatGeneratorStatics.IncrementCollectionCountGenericMethod.MakeGenericMethod(Globals.TypeOfKeyValuePair.MakeGenericType(collectionContract.ItemType.GetGenericArguments())); 448enumeratorType = Globals.TypeOfGenericDictionaryEnumerator.MakeGenericType(keyValueTypes); 504Type ctorParam = Globals.TypeOfIEnumeratorGeneric.MakeGenericType(Globals.TypeOfKeyValuePair.MakeGenericType(keyValueTypes!));
System.Private.Windows.Core.TestUtilities (3)
DebuggerAttributes.cs (1)
107proxyType = proxyType.MakeGenericType(genericTypeArguments);
TestAccessors.cs (2)
54typeof(TestAccessor<>).MakeGenericType(type), 57typeof(TestAccessor<>).MakeGenericType(instanceOrType.GetType()),
System.Private.Xml (10)
System\Xml\Serialization\CodeGenerator.cs (1)
439_ilGen!.Emit(OpCodes.Newobj, typeof(Span<>).MakeGenericType(elementType).GetConstructor(new Type[] { typeof(void*), typeof(int) })!);
System\Xml\Serialization\XmlSerializationWriterILGen.cs (3)
1498Type typeIEnumerable = typeof(IEnumerable<>).MakeGenericType(arrayElementTypeDesc.Type!); 2428LocalBuilder enumerator = ilg.DeclareLocal(typeof(IEnumerator<>).MakeGenericType(typeof(ConstructorInfo)), "e"); 2430MethodInfo getEnumerator = typeof(IEnumerable<>).MakeGenericType(typeof(ConstructorInfo)).GetMethod("GetEnumerator")!;
System\Xml\Xsl\IlGen\GenerateHelper.cs (3)
111sequenceType = typeof(XmlQuerySequence<>).MakeGenericType(storageType); 124Type listType = typeof(IList<>).MakeGenericType(storageType); 127IListCount = typeof(ICollection<>).MakeGenericType(storageType).GetMethod("get_Count")!;
System\Xml\Xsl\IlGen\IteratorDescriptor.cs (3)
101typeof(IList<>).MakeGenericType(itemStorageType).IsAssignableFrom(loc.LocalType), 134typeof(IList<>).MakeGenericType(itemStorageType).IsAssignableFrom(methGlobal.ReturnType), 601EnsureLocal(_helper.DeclareLocal(locName, typeof(IList<>).MakeGenericType(_storage.ItemStorageType)));
System.Reflection.Context (1)
System\Reflection\Context\Delegation\DelegatingType.cs (1)
464return _typeInfo.MakeGenericType(typeArguments);
System.Reflection.Emit (1)
System\Reflection\Emit\ModuleBuilderImpl.cs (1)
740declaringType = declaringType.MakeGenericType(declaringType.GetGenericArguments());
System.Reflection.MetadataLoadContext (2)
System\Reflection\Runtime\SignatureTypeExtensions.cs (1)
217return type.MakeGenericType(instantiation);
System\Reflection\TypeLoading\General\Assignability.cs (1)
36fromTypeInfo = fromTypeInfo.GetGenericTypeDefinition().MakeGenericType(fromTypeInfo.GetGenericTypeParameters());
System.Text.Json (18)
System\Text\Json\Serialization\Converters\Collection\IAsyncEnumerableConverterFactory.cs (1)
28Type converterType = typeof(IAsyncEnumerableOfTConverter<,>).MakeGenericType(typeToConvert, elementType);
System\Text\Json\Serialization\Converters\Collection\IEnumerableConverterFactory.cs (3)
185genericType = converterType.MakeGenericType(typeToConvert); 191genericType = converterType.MakeGenericType(typeToConvert, elementType!); 200genericType = converterType.MakeGenericType(typeToConvert, dictionaryKeyType!, elementType!);
System\Text\Json\Serialization\Converters\Collection\MemoryConverterFactory.cs (1)
34converterType.MakeGenericType(elementType))!;
System\Text\Json\Serialization\Converters\FSharp\FSharpTypeConverterFactory.cs (5)
41converterFactoryType = typeof(FSharpOptionConverter<,>).MakeGenericType(typeToConvert, elementType); 46converterFactoryType = typeof(FSharpValueOptionConverter<,>).MakeGenericType(typeToConvert, elementType); 51converterFactoryType = typeof(FSharpListConverter<,>).MakeGenericType(typeToConvert, elementType); 55converterFactoryType = typeof(FSharpSetConverter<,>).MakeGenericType(typeToConvert, elementType); 61converterFactoryType = typeof(FSharpMapConverter<,,>).MakeGenericType(typeToConvert, keyType, valueType);
System\Text\Json\Serialization\Converters\Object\ObjectConverterFactory.cs (3)
56converterType = typeof(ObjectDefaultConverter<>).MakeGenericType(typeToConvert); 87converterType = typeof(SmallObjectWithParameterizedConstructorConverter<,,,,>).MakeGenericType(typeArguments); 91converterType = typeof(LargeObjectWithParameterizedConstructorConverterWithReflection<>).MakeGenericType(typeToConvert);
System\Text\Json\Serialization\Converters\Value\EnumConverterFactory.cs (1)
39Type converterType = typeof(EnumConverter<>).MakeGenericType(enumType);
System\Text\Json\Serialization\Converters\Value\NullableConverterFactory.cs (1)
50private static Type GetNullableConverterType(Type valueTypeToConvert) => typeof(NullableConverter<>).MakeGenericType(valueTypeToConvert);
System\Text\Json\Serialization\Converters\Value\UnsupportedTypeConverterFactory.cs (1)
42typeof(UnsupportedTypeConverter<>).MakeGenericType(type),
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (2)
973Type jsonTypeInfoType = typeof(JsonTypeInfo<>).MakeGenericType(type); 1035Type propertyInfoType = typeof(JsonPropertyInfo<>).MakeGenericType(propertyType);
System.Text.RegularExpressions (38)
System\Text\RegularExpressions\RegexCompiler.cs (38)
68private static MethodInfo SpanIndexOfCharMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOf", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 69private static MethodInfo SpanIndexOfSpanMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOf", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 71private static MethodInfo SpanIndexOfAnyCharCharMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 72private static MethodInfo SpanIndexOfAnyCharCharCharMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 73private static MethodInfo SpanIndexOfAnySpanMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 74private static MethodInfo SpanIndexOfAnySearchValuesMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(SearchValues<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 76private static MethodInfo SpanIndexOfAnyExceptCharMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 77private static MethodInfo SpanIndexOfAnyExceptCharCharMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 78private static MethodInfo SpanIndexOfAnyExceptCharCharCharMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 79private static MethodInfo SpanIndexOfAnyExceptSpanMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 80private static MethodInfo SpanIndexOfAnyExceptSearchValuesMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(SearchValues<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 81private static MethodInfo SpanIndexOfAnyInRangeMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAnyInRange", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 82private static MethodInfo SpanIndexOfAnyExceptInRangeMethod => field ??= typeof(MemoryExtensions).GetMethod("IndexOfAnyExceptInRange", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 83private static MethodInfo SpanLastIndexOfCharMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOf", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 84private static MethodInfo SpanLastIndexOfAnyCharCharMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 85private static MethodInfo SpanLastIndexOfAnyCharCharCharMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 86private static MethodInfo SpanLastIndexOfAnySpanMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 87private static MethodInfo SpanLastIndexOfAnySearchValuesMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(SearchValues<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 88private static MethodInfo SpanLastIndexOfSpanMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOf", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 89private static MethodInfo SpanLastIndexOfAnyExceptCharMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 90private static MethodInfo SpanLastIndexOfAnyExceptCharCharMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 91private static MethodInfo SpanLastIndexOfAnyExceptCharCharCharMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 92private static MethodInfo SpanLastIndexOfAnyExceptSpanMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 93private static MethodInfo SpanLastIndexOfAnyExceptSearchValuesMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(SearchValues<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char)); 94private static MethodInfo SpanLastIndexOfAnyInRangeMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAnyInRange", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 95private static MethodInfo SpanLastIndexOfAnyExceptInRangeMethod => field ??= typeof(MemoryExtensions).GetMethod("LastIndexOfAnyExceptInRange", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char)); 98private static MethodInfo SpanStartsWithSpanMethod => field ??= typeof(MemoryExtensions).GetMethod("StartsWith", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char));
System.Windows.Forms (1)
System\Windows\Forms\DataBinding\BindingSource.cs (1)
520Type bindingType = genericType.MakeGenericType([type]);
System.Xaml (4)
System\Xaml\Runtime\ClrObjectRuntime.cs (2)
394Type genericKVP = typeof(KeyValuePair<,>).MakeGenericType(keyType, itemType); 395Type genericIEnumerator = typeof(IEnumerator<>).MakeGenericType(genericKVP);
System\Xaml\Schema\CollectionReflector.cs (1)
258Type genericICollection = typeof(ICollection<>).MakeGenericType(itemType);
System\Xaml\Schema\XamlNamespace.cs (1)
115Type closedType = openType.MakeGenericType(typeArgs);