3 overrides of GenericTypeArguments
System.Private.CoreLib (2)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureType.cs (1)
64public abstract override Type[] GenericTypeArguments { get; }
System\RuntimeType.NativeAot.cs (1)
434public override Type[] GenericTypeArguments
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\Types\RoType.cs (1)
91public sealed override Type[] GenericTypeArguments => GetGenericTypeArgumentsNoCopy().CloneArray<Type>();
135 references to GenericTypeArguments
Aspire.Hosting.CodeGeneration.Python (3)
AtsPythonCodeGenerator.cs (3)
1480if (i.ClrType.GenericTypeArguments == null || i.ClrType.GenericTypeArguments.Length != 1) 1484var genericSubType = i.ClrType.GenericTypeArguments[0];
Aspire.Hosting.Tests (1)
AtsEventingExportsTests.cs (1)
40var contextType = delegateType.GenericTypeArguments[0];
dotnet-svcutil-lib (2)
FrameworkFork\System.ServiceModel\Extensions\ReflectionExtensions.cs (1)
36return type.GetTypeInfo().GenericTypeArguments;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceReflector.cs (1)
54args = t.GetTypeInfo().GenericTypeArguments;
Microsoft.AspNetCore.Identity.EntityFrameworkCore (15)
IdentityEntityFrameworkBuilderExtensions.cs (15)
37var keyType = identityUserType.GenericTypeArguments[0]; 59identityContext.GenericTypeArguments[2], 60identityContext.GenericTypeArguments[3], 61identityContext.GenericTypeArguments[4], 62identityContext.GenericTypeArguments[5], 63identityContext.GenericTypeArguments[7], 64identityContext.GenericTypeArguments[6], 65identityContext.GenericTypeArguments[8]); 67identityContext.GenericTypeArguments[2], 68identityContext.GenericTypeArguments[4], 69identityContext.GenericTypeArguments[6]); 86identityContext.GenericTypeArguments[1], 87identityContext.GenericTypeArguments[2], 88identityContext.GenericTypeArguments[3], 89identityContext.GenericTypeArguments[4]);
Microsoft.AspNetCore.JsonPatch (2)
Converters\TypedJsonPatchDocumentConverter.cs (1)
27var genericType = objectType.GenericTypeArguments[0];
Internal\ListAdapter.cs (1)
288listTypeArgument = genericList.GenericTypeArguments[0];
Microsoft.AspNetCore.JsonPatch.SystemTextJson (4)
Adapters\AdapterFactory.cs (2)
28return (IAdapter)Activator.CreateInstance(typeof(DictionaryAdapter<,>).MakeGenericType(typeToConvert.GenericTypeArguments[0], typeToConvert.GenericTypeArguments[1]));
Converters\JsonPatchDocumentConverterFactory.cs (1)
25return (JsonConverter)Activator.CreateInstance(typeof(JsonConverterForJsonPatchDocumentOfT<>).MakeGenericType(typeToConvert.GenericTypeArguments[0]));
Internal\ListAdapter.cs (1)
214listTypeArgument = genericList.GenericTypeArguments[0];
Microsoft.AspNetCore.Mvc.Abstractions (1)
ModelBinding\ModelMetadata.cs (1)
788ElementType = enumerableType?.GenericTypeArguments[0] ?? typeof(object);
Microsoft.AspNetCore.Mvc.Core (9)
ApplicationModels\InferParameterBindingInfoConvention.cs (1)
147type = type.GenericTypeArguments[0];
ModelBinding\Binders\CollectionModelBinder.cs (1)
504var elementType = enumerableType.GenericTypeArguments[0];
ModelBinding\Binders\CollectionModelBinderProvider.cs (3)
44var listType = typeof(List<>).MakeGenericType(enumerableType.GenericTypeArguments); 56var binderType = typeof(CollectionModelBinder<>).MakeGenericType(collectionType.GenericTypeArguments); 57var elementType = collectionType.GenericTypeArguments[0];
ModelBinding\Binders\DictionaryModelBinderProvider.cs (3)
27var binderType = typeof(DictionaryModelBinder<,>).MakeGenericType(dictionaryType.GenericTypeArguments); 29var keyType = dictionaryType.GenericTypeArguments[0]; 32var valueType = dictionaryType.GenericTypeArguments[1];
ModelBinding\Binders\KeyValuePairModelBinderProvider.cs (1)
25var typeArguments = modelType.GenericTypeArguments;
Microsoft.AspNetCore.Mvc.Formatters.Xml (2)
EnumerableWrapperProvider.cs (1)
43var declaredElementType = enumerableOfT.GenericTypeArguments[0];
EnumerableWrapperProviderFactory.cs (1)
52var elementType = enumerableOfT.GenericTypeArguments[0];
Microsoft.AspNetCore.Mvc.NewtonsoftJson (2)
BsonTempDataSerializer.cs (2)
181var genericTypeArguments = typeToSerialize.GenericTypeArguments; 187var genericTypeArguments = typeToSerialize.GenericTypeArguments;
Microsoft.AspNetCore.Mvc.RazorPages (2)
Infrastructure\ExecutorFactory.cs (2)
43if (taskType != null && typeof(IActionResult).IsAssignableFrom(taskType.GenericTypeArguments[0])) 119ConvertMethod.MakeGenericMethod(method.ReturnType.GenericTypeArguments),
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
TryGetValueProvider.cs (1)
54var typeArguments = dictionaryType.GenericTypeArguments;
Microsoft.AspNetCore.OpenApi (1)
Extensions\TypeExtensions.cs (1)
30(modelType.IsGenericType && modelType.GenericTypeArguments.Length == 1 && modelType.Name == JsonPatchDocumentNameOfT)))
Microsoft.AspNetCore.SignalR.Core (2)
Internal\HubMethodDescriptor.cs (1)
293return type.GenericTypeArguments[0];
Internal\TypedClientBuilder.cs (1)
135.MakeGenericMethod(returnType.GenericTypeArguments);
Microsoft.CodeAnalysis.CSharp (3)
Symbols\AssemblySymbol.cs (3)
811Type[] genericArguments = typeInfo.GenericTypeArguments; 865forcedArity: typeInfo.GenericTypeArguments.Length); 877Type[] genericArguments = typeInfo.GenericTypeArguments;
Microsoft.CodeAnalysis.ExternalAccess.Extensions (2)
Internal\ExtensionMessageHandlerWrapper.cs (2)
25MessageType = customMessageHandlerInterface.GenericTypeArguments[0]; 26ResponseType = customMessageHandlerInterface.GenericTypeArguments[1];
Microsoft.CodeAnalysis.Scripting (3)
Hosting\ObjectFormatter\CommonTypeNameFormatter.cs (2)
238Type[] genericArguments = typeInfo.IsGenericTypeDefinition ? typeInfo.GenericTypeParameters : typeInfo.GenericTypeArguments; 288int currentArgCount = (typeInfo.IsGenericTypeDefinition ? typeInfo.GenericTypeParameters.Length : typeInfo.GenericTypeArguments.Length) - genericArgIndex;
Hosting\ObjectFormatter\ObjectFormatterHelpers.cs (1)
118proxyType = proxyType.MakeGenericType(type.GenericTypeArguments);
Microsoft.DotNet.Cli.Utils (1)
Extensions\TypeExtensions.cs (1)
24var genericTypes = string.Join(", ", type.GenericTypeArguments.Select(generic => generic.ToCliTypeString()));
Microsoft.DotNet.HotReload.Watch (1)
UI\IReporter.cs (1)
303: typeof(TArgs).IsAssignableTo(typeof(ITuple)) ? typeof(TArgs).GenericTypeArguments.Length
Microsoft.DotNet.Internal.DependencyInjection.Testing (2)
DependencyInjectionValidation.cs (2)
214Type optionType = parameterType.GenericTypeArguments[0]; 221serviceType.GenericTypeArguments[0] == optionType;
Microsoft.Extensions.Configuration.Binder (6)
ConfigurationBinder.cs (6)
463Type genericType = typeof(List<>).MakeGenericType(type.GenericTypeArguments); 678Type keyType = dictionaryType.GenericTypeArguments[0]; 679Type valueType = dictionaryType.GenericTypeArguments[1]; 751Type keyType = dictionaryType.GenericTypeArguments[0]; 752Type valueType = dictionaryType.GenericTypeArguments[1]; 819Type itemType = collectionType.GenericTypeArguments[0];
Microsoft.Extensions.DependencyInjection (2)
ServiceLookup\CallSiteFactory.cs (2)
273Type itemType = serviceType.GenericTypeArguments[0]; 547Type[] genericTypeArguments = serviceIdentifier.ServiceType.GenericTypeArguments;
Microsoft.Extensions.DependencyInjection.Abstractions (3)
EmptyServiceProvider.cs (1)
134Type itemType = serviceType.GenericTypeArguments[0];
ServiceDescriptor.cs (2)
322Type[]? typeArguments = ImplementationFactory.GetType().GenericTypeArguments; 341Type[]? typeArguments = KeyedImplementationFactory.GetType().GenericTypeArguments;
Microsoft.Extensions.Diagnostics.Testing (2)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\BindingExtensions.g.cs (2)
776Type[]? temp116 = instance.GenericTypeArguments; 957Type[]? temp156 = instance.GenericTypeArguments;
Microsoft.JSInterop (1)
Infrastructure\DotNetDispatcher.cs (1)
129var innerTask = GetTaskByType(syncResultType.GenericTypeArguments[0], syncResult);
Microsoft.Maui.Controls.Xaml (3)
ApplyPropertiesVisitor.cs (3)
806 if (property?.ReturnType?.GenericTypeArguments == null) 809 if (property.ReturnType.GenericTypeArguments.Length != 1 || !property.ReturnType.GenericTypeArguments[0].IsInstanceOfType(value))
Microsoft.ML.Core (7)
CommandLine\CmdParser.cs (6)
1451ItemValueType = IsTaggedCollection ? ItemType.GenericTypeArguments[1] : ItemType; 1498Contracts.AssertValue(type.GenericTypeArguments); 1499if (type.GenericTypeArguments.Length != 2) 1502return type.GenericTypeArguments[0] == typeof(string); 2315switch (factoryType.GenericTypeArguments.Length) 2327componentFactoryType.MakeGenericType(factoryType.GenericTypeArguments),
Utilities\PlatformUtils.cs (1)
39: typeInfo.GenericTypeArguments;
Microsoft.ML.LightGbm (3)
LightGbmTrainerBase.cs (3)
427if (field.FieldType.GenericTypeArguments[0] == typeof(double)) 431else if (field.FieldType.GenericTypeArguments[0] == typeof(int)) 435else if (field.FieldType.GenericTypeArguments[0] == typeof(float))
Microsoft.ML.Transforms (1)
PermutationFeatureImportanceExtensions.cs (1)
686Type[] types = { predictionTransformerGenericType.GenericTypeArguments[0], typeof(TMetric), typeof(TResult) };
Microsoft.TestPlatform.AdapterUtilities (1)
ManagedNameUtilities\ManagedNameHelper.Reflection.cs (1)
529: info.GenericTypeArguments.Length;
System.CommandLine (2)
Argument{T}.cs (1)
126return (T?)(object)Array.CreateInstance(typeof(T).GenericTypeArguments[0], 0);
Binding\TypeExtensions.cs (1)
30return enumerableInterface?.GenericTypeArguments switch
System.Composition.Hosting (6)
System\Composition\Hosting\Providers\ExportFactory\ExportFactoryExportDescriptorProvider.cs (1)
21var gld = s_getExportFactoryDefinitionsMethod.MakeGenericMethod(exportKey.ContractType.GenericTypeArguments[0]);
System\Composition\Hosting\Providers\ExportFactory\ExportFactoryWithMetadataExportDescriptorProvider.cs (1)
23var ga = contract.ContractType.GenericTypeArguments;
System\Composition\Hosting\Providers\ImportMany\ImportManyExportDescriptorProvider.cs (1)
30contract.ContractType.GenericTypeArguments[0];
System\Composition\Hosting\Providers\Lazy\LazyExportDescriptorProvider.cs (1)
22var gld = s_getLazyDefinitionsMethod.MakeGenericMethod(exportKey.ContractType.GenericTypeArguments[0]);
System\Composition\Hosting\Providers\Lazy\LazyWithMetadataExportDescriptorProvider.cs (1)
22var ga = exportKey.ContractType.GenericTypeArguments;
System\Composition\Hosting\Util\Formatters.cs (1)
40var args = closedGenericType.GenericTypeArguments.Select(Format);
System.Composition.Runtime (1)
System\Composition\Runtime\Util\Formatters.cs (1)
28IEnumerable<string> args = closedGenericType.GenericTypeArguments.Select(Format);
System.Composition.TypedParts (2)
System\Composition\TypedParts\Discovery\TypeInspector.cs (1)
193if (!(mappedType == partType || mappedType.GenericTypeArguments.SequenceEqual(partType.GenericTypeParameters)))
System\Composition\TypedParts\TypedPartExportDescriptorProvider.cs (1)
115var typeArguments = contract.ContractType.GenericTypeArguments;
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Metrics\AggregationManager.cs (1)
374Type aggregatorType = createAggregatorFunc.GetType().GenericTypeArguments[0];
System.Linq.Queryable (6)
System\Linq\EnumerableRewriter.cs (5)
166equiv = typeof(IOrderedEnumerable<>).MakeGenericType(pubType.GenericTypeArguments[0]); 170equiv = typeof(IEnumerable<>).MakeGenericType(pubType.GenericTypeArguments[0]); 176.Where(i => i.IsGenericType && i.GenericTypeArguments.Length == 1) 181.Select(i => i.Info.GenericTypeArguments[0]) 190.Select(i => i.Info.GenericTypeArguments[0])
System\Linq\Queryable.cs (1)
44return EnumerableQuery.Create(enumType.GenericTypeArguments[0], source);
System.Private.CoreLib (8)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\SimpleTypeInfos.cs (1)
318Type[] typeArgs = type.GenericTypeArguments;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureModifiedType.cs (1)
42public override Type[] GenericTypeArguments => _unmodifiedType.GenericTypeArguments;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureTypeExtensions.cs (1)
57Type[] actualGenericTypeArguments = actual.GenericTypeArguments;
System\Reflection\Runtime\BindingFlagSupport\MemberPolicies.cs (2)
166Type[] ga1 = t1.GenericTypeArguments; 167Type[] ga2 = t2.GenericTypeArguments;
System\Reflection\Runtime\General\Assignability.cs (3)
199Type[] fromTypeArguments = fromTypeInfo.GenericTypeArguments; 200Type[] toTypeArguments = toTypeInfo.GenericTypeArguments; 353Type[] toTypeGenericTypeArguments = toTypeInfo.GenericTypeArguments;
System.Private.DataContractSerialization (4)
System\Runtime\Serialization\Json\DataContractJsonSerializer.cs (1)
575itemType = 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\ReflectionReader.cs (2)
553Type keyType = collectionContract.ItemType.GenericTypeArguments[0]; 554Type valueType = collectionContract.ItemType.GenericTypeArguments[1];
System.Private.Windows.Core.TestUtilities (4)
DebuggerAttributes.cs (2)
40return ValidateDebuggerTypeProxyProperties(type, type.GenericTypeArguments, obj); 86public static Type GetProxyType(Type type) => GetProxyType(type, type.GenericTypeArguments);
ReflectionHelper.cs (2)
75Type[] parentTypes = parentType.GenericTypeArguments; 76Type[] nestedTypes = nestedType.GenericTypeArguments;
System.Private.Xml (1)
System\Xml\Serialization\Compilation.cs (1)
448foreach (Type arg in t.GenericTypeArguments)
System.Reflection.MetadataLoadContext (9)
System\Reflection\Runtime\BindingFlagSupport\MemberPolicies.cs (2)
159Type[] ga1 = t1.GenericTypeArguments; 160Type[] ga2 = t2.GenericTypeArguments;
System\Reflection\Runtime\SignatureTypeExtensions.cs (3)
59Type[] patternGenericTypeArguments = pattern.GenericTypeArguments; 60Type[] actualGenericTypeArguments = actual.GenericTypeArguments; 133Type[] genericTypeArguments = signatureType.GenericTypeArguments;
System\Reflection\TypeLoading\General\Assignability.cs (4)
47Type nullableUnderlyingType = toTypeInfo.GenericTypeArguments[0]; 197Type[] fromTypeArguments = fromTypeInfo.GenericTypeArguments; 198Type[] toTypeArguments = toTypeInfo.GenericTypeArguments; 340Type[] toTypeGenericTypeArguments = toTypeInfo.GenericTypeArguments;
System.ServiceModel.Primitives (2)
Extensions\ReflectionExtensions.cs (1)
41return type.GetTypeInfo().GenericTypeArguments;
System\ServiceModel\Description\ServiceReflector.cs (1)
55args = t.GetTypeInfo().GenericTypeArguments;
System.Windows.Forms.Design (1)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
83if (collectionItemType is { IsGenericType: true, GenericTypeArguments: [Type innerType] }