256 references to GetConstructor
Aspire.Hosting.Tests (2)
SecretsStoreTests.cs (1)
15private static readonly ConstructorInfo s_userSecretsIdAttrCtor = typeof(UserSecretsIdAttribute).GetConstructor([typeof(string)])!;
UserSecretsParameterDefaultTests.cs (1)
16private static readonly ConstructorInfo s_userSecretsIdAttrCtor = typeof(UserSecretsIdAttribute).GetConstructor([typeof(string)])!;
dotnet-svcutil-lib (21)
FrameworkFork\Microsoft.CodeDom\Compiler\CompilerInfo.cs (2)
79ConstructorInfo ci = CodeDomProviderType.GetConstructor(new Type[] { typeof(IDictionary<string, string>) }); 94ConstructorInfo constructor = CodeDomProviderType.GetConstructor(new Type[] { typeof(IDictionary<string, string>) });
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeGenerator.cs (2)
1171ConstructorInfo Decimal_ctor = typeof(Decimal).GetConstructor( 1184ConstructorInfo DateTime_ctor = typeof(DateTime).GetConstructor(new Type[] { typeof(Int64) });
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (1)
1256ConstructorInfo ctor = type.GetConstructor(new Type[0]);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationILGen.cs (8)
169ConstructorInfo Hashtable_ctor = typeof(Hashtable).GetConstructor(CodeGenerator.EmptyTypeArray); 275ConstructorInfo readerCtor = CreatedTypes[readerClass].GetConstructor(CodeGenerator.EmptyTypeArray); 286ConstructorInfo writerCtor = CreatedTypes[writerClass].GetConstructor(CodeGenerator.EmptyTypeArray); 420ConstructorInfo ctor = CreatedTypes[(string)serializers[key]].GetConstructor(CodeGenerator.EmptyTypeArray); 459ConstructorInfo ctor = CreatedTypes[(string)serializers[xmlMappings[i].Key]].GetConstructor(CodeGenerator.EmptyTypeArray); 500ConstructorInfo ctor = CreatedTypes[readerType].GetConstructor(CodeGenerator.EmptyTypeArray); 519ctor = CreatedTypes[writerType].GetConstructor(CodeGenerator.EmptyTypeArray); 531ConstructorInfo baseCtor = typeof(XmlSerializerImplementation).GetConstructor(CodeGenerator.EmptyTypeArray);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriterILGen.cs (4)
258ConstructorInfo XmlQualifiedName_ctor = typeof(XmlQualifiedName).GetConstructor(new Type[] { typeof(String), typeof(String) }); 1253ConstructorInfo StringBuilder_ctor = typeof(StringBuilder).GetConstructor(CodeGenerator.EmptyTypeArray); 2510ConstructorInfo ctor = type.GetConstructor(CodeGenerator.EmptyTypeArray); 2551ConstructorInfo XElement_ctor = type.GetConstructor(new Type[] { xName });
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlFormatReaderGenerator.cs (2)
492_ilg.New(type.GetConstructor(new Type[] { innerType })); 495_ilg.Call(outerType.GetConstructor(new Type[] { innerType }));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpMessageHandlerFactory.cs (1)
69ConstructorInfo ctorInfo = handler.GetConstructor(Array.Empty<Type>());
Metadata\ServiceDescriptor.cs (1)
275ConstructorInfo ctor = wsdlImporterType.GetConstructor(
illink (1)
ILLink.RoslynAnalyzer (1)
src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (1)
76/// <item><see cref="System.Type.GetConstructor(System.Type[])"/></item>
Microsoft.AspNetCore.Authentication.Test (2)
JwtBearerTests.cs (1)
1038var constructor = ExceptionType.GetTypeInfo().GetConstructor(new[] { typeof(string) });
JwtBearerTests_Handler.cs (1)
1117var constructor = ExceptionType.GetTypeInfo().GetConstructor(new[] { typeof(string) });
Microsoft.AspNetCore.Components.Endpoints (3)
FormMapping\Factories\Collections\TypedCollectionConverterFactory.cs (1)
65var _ when type.IsAssignableTo(typeof(ICollection<TElement>)) && type.GetConstructor(Type.EmptyTypes) != null => true,
FormMapping\Factories\Dictionary\TypedDictionaryConverterFactory.cs (2)
61var _ when type.IsAssignableTo(typeof(IDictionary<TKey, TValue>)) && type.GetConstructor(Type.EmptyTypes) != null => true, 143var _ when type.IsAssignableTo(typeof(IDictionary<TKey, TValue>)) && type.GetConstructor(Type.EmptyTypes) != null =>
Microsoft.AspNetCore.DataProtection (3)
AuthenticatedEncryption\ConfigurationModel\ManagedAlgorithmHelpers.cs (1)
59if (type.GetConstructor(Type.EmptyTypes) == null)
SimpleActivator.cs (2)
41var ctorParameterless = implementationType.GetConstructor(Type.EmptyTypes); 49var ctorWhichTakesServiceProvider = implementationType.GetConstructor(_serviceProviderTypeArray);
Microsoft.AspNetCore.Http.Extensions (7)
RequestDelegateFactory.cs (3)
106private static readonly NewExpression EmptyHttpResultValueTaskExpr = Expression.New(typeof(ValueTask<object>).GetConstructor(new[] { typeof(EmptyHttpResult) })!, Expression.Property(null, typeof(EmptyHttpResult), nameof(EmptyHttpResult.Instance))); 112private static readonly ConstructorInfo DefaultEndpointFilterInvocationContextConstructor = typeof(DefaultEndpointFilterInvocationContext).GetConstructor(new[] { typeof(HttpContext), typeof(object[]) })!; 122private static readonly ConstructorInfo FormDataReaderConstructor = typeof(FormDataReader).GetConstructor(new[] { typeof(IReadOnlyDictionary<FormKey, StringValues>), typeof(CultureInfo), typeof(Memory<char>), typeof(IFormFileCollection) })!;
src\Components\Endpoints\src\FormMapping\Factories\Collections\TypedCollectionConverterFactory.cs (1)
65var _ when type.IsAssignableTo(typeof(ICollection<TElement>)) && type.GetConstructor(Type.EmptyTypes) != null => true,
src\Components\Endpoints\src\FormMapping\Factories\Dictionary\TypedDictionaryConverterFactory.cs (2)
61var _ when type.IsAssignableTo(typeof(IDictionary<TKey, TValue>)) && type.GetConstructor(Type.EmptyTypes) != null => true, 143var _ when type.IsAssignableTo(typeof(IDictionary<TKey, TValue>)) && type.GetConstructor(Type.EmptyTypes) != null =>
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (1)
21typeof(ObjectMethodExecutorAwaitable).GetConstructor(new[] {
Microsoft.AspNetCore.InternalTesting (1)
xunit\AspNetTestAssemblyRunner.cs (1)
60.GetConstructor(new[] { typeof(IMessageSink) });
Microsoft.AspNetCore.InternalTesting.Tests (4)
TestableAssembly.cs (4)
53.GetConstructor(new[] { typeof(string), typeof(string) }); 58var fixtureConstructor = typeof(AssemblyFixtureAttribute).GetConstructor(new[] { typeof(Type) }); 61var outputConstructor = typeof(TestOutputDirectoryAttribute).GetConstructor( 77var factConstructor = typeof(FactAttribute).GetConstructor(Array.Empty<Type>());
Microsoft.AspNetCore.Mvc.Core (4)
Filters\MiddlewareFilterConfigurationProvider.cs (1)
73return !modelType.IsAbstract && modelType.GetConstructor(Type.EmptyTypes) != null;
ModelBinding\Binders\ComplexObjectModelBinder.cs (1)
191if (modelType.IsAbstract || modelType.GetConstructor(Type.EmptyTypes) == null)
ModelBinding\Binders\ComplexTypeModelBinder.cs (1)
472if (modelType.IsAbstract || modelType.GetConstructor(Type.EmptyTypes) == null)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (1)
21typeof(ObjectMethodExecutorAwaitable).GetConstructor(new[] {
Microsoft.AspNetCore.Mvc.Core.Test (2)
DependencyInjection\MvcBuilderExtensionsTest.cs (1)
44var attribute = new CustomAttributeBuilder(typeof(ProvideApplicationPartFactoryAttribute).GetConstructor(
DependencyInjection\MvcCoreBuilderExtensionsTest.cs (1)
41var attribute = new CustomAttributeBuilder(typeof(ProvideApplicationPartFactoryAttribute).GetConstructor(
Microsoft.AspNetCore.Mvc.Formatters.Xml (1)
EnumerableWrapperProvider.cs (1)
47_wrappingTypeConstructor = WrappingType.GetConstructor(new[]
Microsoft.AspNetCore.Mvc.IntegrationTests (1)
ComplexRecordIntegrationTest.cs (1)
2002var parameterInfo = typeof(Order10).GetConstructor(new[] { typeof(Person10) }).GetParameters()[0];
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
ViewDataDictionaryFactory.cs (2)
17var constructor = type.GetConstructor(new[] { typeof(IModelMetadataProvider), typeof(ModelStateDictionary) }); 38var constructor = type.GetConstructor(new[] { typeof(ViewDataDictionary) });
Microsoft.AspNetCore.OpenApi (1)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (1)
21typeof(ObjectMethodExecutorAwaitable).GetConstructor(new[] {
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (1)
21typeof(ObjectMethodExecutorAwaitable).GetConstructor(new[] {
Microsoft.AspNetCore.SignalR.Core (2)
Internal\TypedClientBuilder.cs (1)
192generator.Emit(OpCodes.Newobj, typeof(InvalidOperationException).GetConstructor(new Type[] { typeof(string) })!);
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (1)
21typeof(ObjectMethodExecutorAwaitable).GetConstructor(new[] {
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Protocol\Converters\StringEnumConverter.cs (1)
27var constructor = typeof(TStringEnumType).GetConstructor([typeof(string)]);
Protocol\Converters\SumConverter.cs (1)
60var declaredConstructor = typeInfo.GetConstructor([parameterType]) ??
Microsoft.CSharp (2)
Microsoft\CSharp\RuntimeBinder\BinderHelper.cs (1)
138typeof(RuntimeBinderException).GetConstructor(new Type[] { typeof(string) }),
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (1)
1000agg.SetHasPubNoArgCtor(type.GetConstructor(Type.EmptyTypes) != null);
Microsoft.ML.Core (2)
CommandLine\CmdParser.cs (1)
1469_ctorCustom = ItemValueType.GetConstructor(Type.EmptyTypes);
ComponentModel\ComponentCatalog.cs (1)
312var ctor = ArgType.GetConstructor(Type.EmptyTypes);
Microsoft.ML.Data (4)
Data\DataViewUtils.cs (1)
874var constructor = pipeType.GetConstructor(new Type[] { typeof(object) });
DataView\CacheDataView.cs (1)
1301var constructor = pipeType.GetConstructor(_pipeConstructorTypes);
Transforms\Hashing.cs (1)
1520var constructorInfo = t.GetConstructor(consTypes);
Transforms\RowShufflingTransformer.cs (1)
388var constructor = pipeType.GetConstructor(_pipeConstructorTypes);
Microsoft.ML.Transforms (1)
GroupTransform.cs (1)
456var cons = type.MakeGenericType(colType.RawType).GetConstructor(new[] { typeof(DataViewRow), typeof(int) });
Microsoft.VisualBasic.Tests (1)
Microsoft\VisualBasic\ApplicationServices\WindowsFormsApplicationBaseTests.cs (1)
29typeof(GuidAttribute).GetConstructor([typeof(string)]), new[] { guid });
PresentationBuildTasks (3)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (3)
3009parentType.GetConstructor(Type.EmptyTypes) == null || 3286parentType.GetConstructor(Type.EmptyTypes) == null || 4408ParentContext.ContextDataType.GetConstructor(Type.EmptyTypes) == null))
PresentationCore (12)
MS\Internal\TextFormatting\FullTextLine.cs (2)
409ConstructorInfo constructor = t.GetConstructor( 420constructor = t.GetConstructor(
System\Windows\DurationConverter.cs (1)
108MemberInfo mi = typeof(Duration).GetConstructor(new Type[] { typeof(TimeSpan) });
System\Windows\FontStyleConverter.cs (1)
93ConstructorInfo ci = typeof(FontStyle).GetConstructor(new Type[]{typeof(int)});
System\Windows\Ink\StrokeCollectionConverter.cs (1)
129ConstructorInfo ci = typeof(StrokeCollection).GetConstructor(new Type[] { typeof(Stream) });
System\Windows\Media\Animation\KeySplineConverter.cs (1)
100ConstructorInfo ci = typeof(KeySpline).GetConstructor(new Type[]
System\Windows\Media\Animation\RepeatBehaviorConverter.cs (2)
130mi = typeof(RepeatBehavior).GetConstructor(new Type[] { typeof(double) }); 136mi = typeof(RepeatBehavior).GetConstructor(new Type[] { typeof(TimeSpan) });
System\Windows\Media\PixelFormatConverter.cs (1)
82ConstructorInfo ci = typeof(PixelFormat).GetConstructor(new Type[] { typeof(string) });
System\Windows\Media\RequestCachePolicyConverter.cs (2)
114ConstructorInfo ci = typeof(HttpRequestCachePolicy).GetConstructor(new Type[] { typeof(HttpRequestCachePolicy) }); 129ConstructorInfo ci = typeof(RequestCachePolicy).GetConstructor(new Type[] { typeof(RequestCachePolicy) });
System\Windows\TextDecorationCollectionConverter.cs (1)
137ConstructorInfo ci = typeof(TextDecorationCollection).GetConstructor(new Type[] { typeof(IEnumerable<TextDecoration>) });
PresentationFramework (14)
MS\Internal\Annotations\Serializer.cs (1)
54_ctor = type.GetConstructor(Array.Empty<Type>());
MS\Internal\WindowsRuntime\Generated\WinRT\ObjectReference.cs (1)
78var ctor = typeof(T).GetConstructor(new[] { typeof(IObjectReference) });
System\Windows\Controls\DataGridLengthConverter.cs (1)
141ConstructorInfo ci = typeof(DataGridLength).GetConstructor(new Type[] { typeof(double), typeof(DataGridLengthUnitType) });
System\Windows\Controls\VirtualizationCacheLengthConverter.cs (1)
144ConstructorInfo ci = typeof(VirtualizationCacheLength).GetConstructor(new Type[] { typeof(double), typeof(VirtualizationCacheLengthUnit) });
System\Windows\CornerRadiusConverter.cs (1)
130ConstructorInfo ci = typeof(CornerRadius).GetConstructor(new Type[] { typeof(double), typeof(double), typeof(double), typeof(double) });
System\Windows\Data\ListCollectionView.cs (1)
692_itemConstructor = itemType.GetConstructor(Type.EmptyTypes);
System\Windows\DynamicResourceExtensionConverter.cs (1)
49return new InstanceDescriptor(typeof(DynamicResourceExtension).GetConstructor(new Type[] { typeof(object) }),
System\Windows\FigureLengthConverter.cs (1)
157ConstructorInfo ci = typeof(FigureLength).GetConstructor(new Type[] { typeof(double), typeof(FigureUnitType) });
System\Windows\GridLengthConverter.cs (1)
177ConstructorInfo ci = typeof(GridLength).GetConstructor(new Type[] { typeof(double), typeof(GridUnitType) });
System\Windows\LengthConverter.cs (1)
152ConstructorInfo ci = typeof(double).GetConstructor(new Type[] { typeof(double) });
System\Windows\Standard\ErrorCodes.cs (1)
439ConstructorInfo cons = e.GetType().GetConstructor(new[] { typeof(string) });
System\Windows\TemplateBindingExtensionConverter.cs (1)
53return new InstanceDescriptor(typeof(TemplateBindingExtension).GetConstructor(new Type[] { typeof(DependencyProperty) }),
System\Windows\ThemeModeConverter.cs (1)
105ConstructorInfo ci = typeof(ThemeMode).GetConstructor(new Type[] { typeof(string) });
System\Windows\ThicknessConverter.cs (1)
130ConstructorInfo ci = typeof(Thickness).GetConstructor(new Type[] { typeof(double), typeof(double), typeof(double), typeof(double) });
PresentationFramework-SystemCore (1)
DynamicAccessorImpl.cs (1)
236typeof(InvalidOperationException).GetConstructor(new Type[] { typeof(string) }),
System.CodeDom (2)
System\CodeDom\Compiler\CompilerInfo.cs (2)
53ConstructorInfo ci = CodeDomProviderType.GetConstructor(new Type[] { typeof(IDictionary<string, string>) }); 67ConstructorInfo constructor = CodeDomProviderType.GetConstructor(new Type[] { typeof(IDictionary<string, string>) });
System.ComponentModel.Composition (4)
Microsoft\Internal\GenerationServices.cs (1)
39private static readonly ConstructorInfo ObjectCtor = typeof(object).GetConstructor(Type.EmptyTypes)!;
System\ComponentModel\Composition\MetadataViewGenerator.cs (1)
76private static readonly ConstructorInfo ObjectCtor = typeof(object).GetConstructor(Type.EmptyTypes)!;
System\ComponentModel\Composition\ReflectionModel\GenericServices.cs (1)
181if (!type.IsValueType && ((type.GetConstructor(Type.EmptyTypes) == null) || type.IsAbstract))
System\ComponentModel\Composition\ReflectionModel\ImportingMember.cs (1)
145ConstructorInfo? constructor = ImportType.ActualType.GetConstructor(Type.EmptyTypes);
System.ComponentModel.TypeConverter (22)
System\ComponentModel\AttributeCollection.cs (1)
269ConstructorInfo? ci = reflect.UnderlyingSystemType.GetConstructor(Type.EmptyTypes);
System\ComponentModel\CultureInfoConverter.cs (1)
161typeof(CultureInfo).GetConstructor(new Type[] { typeof(string) }),
System\ComponentModel\DateOnlyConverter.cs (1)
98return new InstanceDescriptor(typeof(DateOnly).GetConstructor(new Type[] { typeof(int), typeof(int), typeof(int) }), new object[] { date.Year, date.Month, date.Day });
System\ComponentModel\DateTimeConverter.cs (2)
126typeof(DateTime).GetConstructor(new Type[] { typeof(long) }), 132typeof(DateTime).GetConstructor(new Type[] { typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int) }),
System\ComponentModel\DateTimeOffsetConverter.cs (2)
138typeof(DateTimeOffset).GetConstructor(new Type[] { typeof(long) }), 144typeof(DateTimeOffset).GetConstructor(new Type[] { typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(TimeSpan) }),
System\ComponentModel\DecimalConverter.cs (1)
48ConstructorInfo? ctor = typeof(decimal).GetConstructor(new Type[] { typeof(int[]) });
System\ComponentModel\GuidConverter.cs (1)
60ConstructorInfo? ctor = typeof(Guid).GetConstructor(new Type[] { typeof(string) });
System\ComponentModel\NullableConverter.cs (1)
18private static readonly ConstructorInfo s_nullableConstructor = typeof(Nullable<>).GetConstructor(typeof(Nullable<>).GetGenericArguments())!;
System\ComponentModel\PropertyDescriptor.cs (1)
229ConstructorInfo? ctor = type.GetConstructor(typeArgs);
System\ComponentModel\ReflectTypeDescriptionProvider.cs (4)
252obj = objectType.GetConstructor(argTypes)?.Invoke(args); 276obj = objectType.GetConstructor(argTypes)?.Invoke(args); 303return objectType.GetConstructor(s_typeConstructor)?.Invoke(new object[] { callingType }) 1541if (type.GetConstructor(s_typeConstructor) == null)
System\ComponentModel\TimeOnlyConverter.cs (2)
95return new InstanceDescriptor(typeof(TimeOnly).GetConstructor(new Type[] { typeof(long) }), new object[] { time.Ticks }); 98return new InstanceDescriptor(typeof(TimeOnly).GetConstructor(new Type[] { typeof(int), typeof(int), typeof(int), typeof(int), typeof(int) }),
System\Drawing\PointConverter.cs (1)
77ConstructorInfo? ctor = typeof(Point).GetConstructor([typeof(int), typeof(int)]);
System\Drawing\RectangleConverter.cs (1)
81ConstructorInfo? ctor = typeof(Rectangle).GetConstructor(
System\Drawing\SizeConverter.cs (1)
77ConstructorInfo? ctor = typeof(Size).GetConstructor([typeof(int), typeof(int)]);
System\Drawing\SizeFConverter.cs (1)
75ConstructorInfo? ctor = typeof(SizeF).GetConstructor([typeof(float), typeof(float)]);
System\Security\Authentication\ExtendedProtection\ExtendedProtectionPolicyTypeConverter.cs (1)
52ConstructorInfo? constructor = typeof(ExtendedProtectionPolicy).GetConstructor(parameterTypes);
System.Configuration.ConfigurationManager (2)
System\Diagnostics\TraceUtils.cs (2)
57ConstructorInfo ctorInfo = objectType.GetConstructor(Array.Empty<Type>()); 66ConstructorInfo ctorInfo = objectType.GetConstructor(new Type[] { typeof(string) });
System.Data.Common (6)
System\Data\Common\DataColumnMapping.cs (1)
173ConstructorInfo ctor = typeof(DataColumnMapping).GetConstructor(types)!;
System\Data\Common\DataTableMapping.cs (1)
197ConstructorInfo ctor = typeof(DataTableMapping).GetConstructor(types)!;
System\Data\ConstraintConverter.cs (2)
40Reflection.ConstructorInfo ctor = typeof(UniqueConstraint).GetConstructor(new Type[] { typeof(string), typeof(string[]), typeof(bool) })!; 50typeof(ForeignKeyConstraint).GetConstructor(new Type[] { typeof(string), typeof(string), typeof(string[]),
System\Data\RelationshipConverter.cs (2)
53ctor = typeof(DataRelation).GetConstructor(new Type[] { typeof(string) /*relationName*/, typeof(string) /*parentTableName*/, typeof(string) /*childTableName */, 60ctor = typeof(DataRelation).GetConstructor(new Type[] { typeof(string)/*relationName*/, typeof(string)/*parentTableName*/, typeof(string)/*parentTableNamespace*/,
System.Linq.Expressions (14)
System\Dynamic\Utils\CachedReflectionInfo.cs (1)
18s_InvalidCastException_Ctor_String ??= typeof(InvalidCastException).GetConstructor(new Type[] { typeof(string) })!;
System\Dynamic\Utils\TypeUtils.cs (1)
20private static readonly ConstructorInfo s_nullableConstructor = typeof(Nullable<>).GetConstructor(typeof(Nullable<>).GetGenericArguments())!;
System\Linq\Expressions\Common\CachedReflectionInfo.cs (8)
15=> s_Nullable_Boolean_Ctor ??= typeof(bool?).GetConstructor(new[] { typeof(bool) })!; 19s_Decimal_Ctor_Int32 ??= typeof(decimal).GetConstructor(new[] { typeof(int) })!; 23s_Decimal_Ctor_UInt32 ??= typeof(decimal).GetConstructor(new[] { typeof(uint) })!; 27s_Decimal_Ctor_Int64 ??= typeof(decimal).GetConstructor(new[] { typeof(long) })!; 31s_Decimal_Ctor_UInt64 ??= typeof(decimal).GetConstructor(new[] { typeof(ulong) })!; 35s_Decimal_Ctor_Int32_Int32_Int32_Bool_Byte ??= typeof(decimal).GetConstructor(new[] { typeof(int), typeof(int), typeof(int), typeof(bool), typeof(byte) })!; 87s_DictionaryOfStringInt32_Ctor_Int32 ??= typeof(Dictionary<string, int>).GetConstructor(new[] { typeof(int) })!; 140s_Closure_ObjectArray_ObjectArray ??= typeof(Closure).GetConstructor(new[] { typeof(object[]), typeof(object[]) })!;
System\Linq\Expressions\Compiler\CompilerScope.cs (3)
331lc.IL.Emit(OpCodes.Newobj, boxType.GetConstructor(new Type[] { v.Type })!); 337lc.IL.Emit(OpCodes.Newobj, boxType.GetConstructor(new Type[] { v.Type })!); 342lc.IL.Emit(OpCodes.Newobj, boxType.GetConstructor(Type.EmptyTypes)!);
System\Linq\Expressions\Compiler\ILGen.cs (1)
966ConstructorInfo? ci = arrayType.GetConstructor(types);
System.Private.CoreLib (4)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ILGenerator.cs (1)
98ConstructorInfo con = excType.GetConstructor(Type.EmptyTypes) ?? throw new ArgumentException(SR.Arg_NoDefCTorWithoutTypeName, nameof(excType));
src\System\Reflection\Emit\RuntimeConstructorBuilder.cs (1)
83ConstructorInfo rci = GetTypeBuilder().GetConstructor(m_methodBuilder.m_parameterTypes!)!;
src\System\RuntimeHandles.cs (2)
230Debug.Assert(type.GetConstructor(Type.EmptyTypes) is ConstructorInfo c && c.IsPublic, 254Debug.Assert(type.GetConstructor(Type.EmptyTypes) is ConstructorInfo c && c.IsPublic,
System.Private.DataContractSerialization (7)
System\Runtime\Serialization\Json\JsonFormatGeneratorStatics.cs (1)
316s_serializationExceptionCtor = typeof(SerializationException).GetConstructor(new Type[] { typeof(string) });
System\Runtime\Serialization\Json\JsonFormatReaderGenerator.cs (2)
591_ilg.New(type.GetConstructor(new Type[] { innerType })!); 594_ilg.Call(outerType.GetConstructor(new Type[] { innerType })!);
System\Runtime\Serialization\ReflectionReader.cs (1)
483var ci = arrayType.GetConstructor(s_arrayConstructorParameters)!;
System\Runtime\Serialization\XmlFormatGeneratorStatics.cs (1)
209internal static ConstructorInfo SerializationExceptionCtor => s_serializationExceptionCtor ??= typeof(SerializationException).GetConstructor(new Type[] { typeof(string) })!;
System\Runtime\Serialization\XmlFormatReaderGenerator.cs (2)
624_ilg.New(type.GetConstructor(new Type[] { innerType })!); 627_ilg.Call(outerType.GetConstructor(new Type[] { innerType })!);
System.Private.Xml (13)
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\Compilation.cs (1)
462ConstructorInfo AssemblyVersionAttribute_ctor = typeof(AssemblyVersionAttribute).GetConstructor(
System\Xml\Serialization\XmlSerializationReaderILGen.cs (2)
2777ilg.Call(varType.GetConstructor(varType.GetGenericArguments())!); 3423ilg.New(typeof(Span<bool>).GetConstructor(new[] { typeof(bool[]) })!);
System\Xml\Xsl\IlGen\GenerateHelper.cs (8)
156public static readonly ConstructorInfo DecFromParts = typeof(decimal).GetConstructor(new[] { typeof(int), typeof(int), typeof(int), typeof(bool), typeof(byte) })!; 157public static readonly ConstructorInfo DecFromInt32 = typeof(decimal).GetConstructor(new[] { typeof(int) })!; 158public static readonly ConstructorInfo DecFromInt64 = typeof(decimal).GetConstructor(new[] { typeof(long) })!; 159public static readonly ConstructorInfo Debuggable = typeof(DebuggableAttribute).GetConstructor(new[] { typeof(DebuggableAttribute.DebuggingModes) })!; 160public static readonly ConstructorInfo NonUserCode = typeof(DebuggerNonUserCodeAttribute).GetConstructor(Type.EmptyTypes)!; 161public static readonly ConstructorInfo QName = typeof(XmlQualifiedName).GetConstructor(new[] { typeof(string), typeof(string) })!; 162public static readonly ConstructorInfo StepThrough = typeof(DebuggerStepThroughAttribute).GetConstructor(Type.EmptyTypes)!; 163public static readonly ConstructorInfo Transparent = typeof(SecurityTransparentAttribute).GetConstructor(Type.EmptyTypes)!;
System\Xml\Xsl\Runtime\EarlyBoundInfo.cs (1)
27_constrInfo = ebType.GetConstructor(Type.EmptyTypes)!;
System.Reflection.DispatchProxy (3)
System\Reflection\DispatchProxyGenerator.cs (3)
194if (baseType.GetConstructor(Type.EmptyTypes) == null) 290ConstructorInfo baseCtor = _proxyBaseType.GetConstructor(Type.EmptyTypes)!; 449ConstructorInfo exCtor = typeof(NotSupportedException).GetConstructor([typeof(string)])!;
System.Reflection.TypeExtensions (1)
System\Reflection\TypeExtensions.cs (1)
19return type.GetConstructor(types);
System.Runtime.InteropServices (3)
System\Runtime\InteropServices\Marshalling\ComImportInteropInterfaceDetailsStrategy.cs (3)
79implementation.SetCustomAttribute(new CustomAttributeBuilder(typeof(DynamicInterfaceCastableImplementationAttribute).GetConstructor(Array.Empty<Type>())!, Array.Empty<object>())); 123return attributeType.GetConstructor(new Type[] { typeof(string) })!; 166private static readonly ConstructorInfo s_attributeUsageCtor = typeof(AttributeUsageAttribute).GetConstructor(new Type[] { typeof(AttributeTargets) })!;
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Converters.cs (1)
192ConstructorInfo? ctor = converterType.GetConstructor(Type.EmptyTypes);
System.Text.RegularExpressions (3)
System\Text\RegularExpressions\RegexAssemblyCompiler.cs (3)
95_ilg!.Emit(OpCodes.Newobj, type.GetConstructor(Type.EmptyTypes)!); 121_ilg!.Emit(OpCodes.Newobj, regexRunnerFactoryType.GetConstructor(Type.EmptyTypes)!); 196_ilg!.Emit(OpCodes.Newobj, typeof(Hashtable).GetConstructor(Type.EmptyTypes)!);
System.Windows.Controls.Ribbon (1)
Microsoft\Windows\Controls\Ribbon\RibbonControlLengthConverter.cs (1)
130ConstructorInfo ci = typeof(RibbonControlLength).GetConstructor(new Type[] { typeof(double), typeof(RibbonControlLengthUnitType) });
System.Windows.Forms (35)
System\Windows\Forms\Controls\DataGridView\DataGridViewCellConverter.cs (1)
30ConstructorInfo? ctor = cell.GetType().GetConstructor([]);
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyleConverter.cs (1)
40ConstructorInfo? ctor = value.GetType().GetConstructor([]);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnConverter.cs (2)
42ctor = dataGridViewColumn.GetType().GetConstructor([typeof(Type)]); 51ctor = dataGridViewColumn.GetType().GetConstructor([]);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowConverter.cs (1)
29ConstructorInfo? ctor = row.GetType().GetConstructor([]);
System\Windows\Forms\Controls\Labels\LinkArea.LinkAreaConverter.cs (1)
106typeof(LinkArea).GetConstructor([typeof(int), typeof(int)]),
System\Windows\Forms\Controls\Labels\LinkConverter.cs (2)
105typeof(LinkLabel.Link).GetConstructor([typeof(int), typeof(int)]), 111typeof(LinkLabel.Link).GetConstructor([typeof(int), typeof(int), typeof(object)]),
System\Windows\Forms\Controls\ListView\ColumnHeaderConverter.cs (3)
47ctor = t.GetConstructor([typeof(int)]); 56ctor = t.GetConstructor([typeof(string)]); 65ctor = t.GetConstructor([]);
System\Windows\Forms\Controls\ListView\ListViewGroupConverter.cs (1)
95ConstructorInfo ctor = typeof(ListViewGroup).GetConstructor([typeof(string), typeof(HorizontalAlignment)])!;
System\Windows\Forms\Controls\ListView\ListViewItemConverter.cs (9)
55ctor = typeof(ListViewItem).GetConstructor([typeof(ListViewItem.ListViewSubItem[]), typeof(string)]); 63ctor = typeof(ListViewItem).GetConstructor([typeof(ListViewItem.ListViewSubItem[]), typeof(int)]); 84ctor = typeof(ListViewItem).GetConstructor( 104ctor = typeof(ListViewItem).GetConstructor( 127ctor = typeof(ListViewItem).GetConstructor([typeof(string)]); 137ctor = typeof(ListViewItem).GetConstructor( 147ctor = typeof(ListViewItem).GetConstructor( 160ctor = typeof(ListViewItem).GetConstructor( 170ctor = typeof(ListViewItem).GetConstructor(
System\Windows\Forms\Controls\ListView\ListViewSubItemConverter.cs (2)
35ctor = typeof(ListViewItem.ListViewSubItem).GetConstructor( 55ctor = typeof(ListViewItem.ListViewSubItem).GetConstructor([typeof(ListViewItem), typeof(string)]);
System\Windows\Forms\Controls\MonthCalendar\SelectionRangeConverter.cs (1)
122ConstructorInfo? ctor = typeof(SelectionRange).GetConstructor(
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (2)
1651ConstructorInfo? constructor = tabType.GetConstructor([typeof(IServiceProvider)]); 1656constructor = tabType.GetConstructor([typeof(IDesignerHost)]);
System\Windows\Forms\Controls\TreeView\TreeNodeConverter.cs (4)
52info = typeof(TreeNode).GetConstructor([typeof(string)]); 57info = typeof(TreeNode).GetConstructor([typeof(string), typeof(TreeNode[])]); 69info = typeof(TreeNode).GetConstructor( 84info = typeof(TreeNode).GetConstructor(
System\Windows\Forms\DataBinding\ListBindingConverter.cs (2)
153ConstructorInfo? ctor = typeof(Binding).GetConstructor(ctorParams); 158ctor = typeof(Binding).GetConstructor(
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutPanelCellPositionTypeConverter.cs (1)
69typeof(TableLayoutPanelCellPosition).GetConstructor([typeof(int), typeof(int)]),
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutSettings.StyleConverter.cs (2)
32style.GetTypeWithConstructor().GetConstructor([]), 37style.GetTypeWithConstructor().GetConstructor([typeof(SizeType), typeof(int)]),
System.Windows.Forms.Design (3)
System\ComponentModel\Design\DesignSurface.cs (1)
277ConstructorInfo? ctor = TypeDescriptor.GetReflectionType(type).GetConstructor([]);
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (1)
1921ConstructorInfo? ctor = GetReflectionTypeHelper(manager, value).GetConstructor([]);
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (1)
279ConstructorInfo ctor = t.GetConstructor([]);
System.Windows.Forms.Design.Tests (1)
System\Windows\Forms\Design\ToolStripEditorManagerTests.cs (1)
51_constructor = _toolStripEditorControlType?.GetConstructor([typeof(Control), typeof(Rectangle)])
System.Windows.Forms.Primitives (2)
System\Windows\Forms\PaddingConverter.cs (2)
58typeof(Padding).GetConstructor([typeof(int)]), 61typeof(Padding).GetConstructor([typeof(int), typeof(int), typeof(int), typeof(int)]),
System.Windows.Forms.Tests (19)
System\Windows\Forms\AccessibleObjects\DataGridViewAccessibleObjectTests.cs (1)
267ConstructorInfo ctor = type.GetConstructor([typeof(DataGridView)]);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemAccessibleObjectTests.cs (1)
23ConstructorInfo ctor = type.GetConstructor([typeof(ListViewItem)]);
System\Windows\Forms\AccessibleObjects\PropertyGridView.PropertyGridViewAccessibleObjectTests.cs (1)
208ConstructorInfo ctor = type.GetConstructor([typeof(PropertyGridView), typeof(PropertyGrid)]);
System\Windows\Forms\ColumnHeaderConverterTests.cs (1)
100Assert.Equal(value.GetType().GetConstructor(parameterTypes), descriptor.MemberInfo);
System\Windows\Forms\LinkAreaConverterTests.cs (1)
88Assert.Equal(typeof(LinkArea).GetConstructor([typeof(int), typeof(int)]), descriptor.MemberInfo);
System\Windows\Forms\LinkConverterTests.cs (2)
86Assert.Equal(typeof(LinkLabel.Link).GetConstructor([typeof(int), typeof(int)]), descriptor.MemberInfo); 96Assert.Equal(typeof(LinkLabel.Link).GetConstructor([typeof(int), typeof(int), typeof(object)]), descriptor.MemberInfo);
System\Windows\Forms\ListViewGroupConverterTests.cs (1)
206Assert.Equal(typeof(ListViewGroup).GetConstructor(parameterTypes), descriptor.MemberInfo);
System\Windows\Forms\ListViewItemConverterTests.cs (1)
261Assert.Equal(typeof(ListViewItem).GetConstructor(parameterTypes), descriptor.MemberInfo);
System\Windows\Forms\ListViewSubItemConverterTests.cs (1)
74Assert.Equal(typeof(ListViewItem.ListViewSubItem).GetConstructor(parameterTypes), descriptor.MemberInfo);
System\Windows\Forms\PaddingConverterTests.cs (2)
91Assert.Equal(typeof(Padding).GetConstructor([typeof(int), typeof(int), typeof(int), typeof(int)]), descriptor.MemberInfo); 100Assert.Equal(typeof(Padding).GetConstructor([typeof(int)]), descriptor.MemberInfo);
System\Windows\Forms\TableLayoutPanelCellPositionTests.cs (1)
178Assert.Equal(typeof(TableLayoutPanelCellPosition).GetConstructor([typeof(int), typeof(int)]), descriptor.MemberInfo);
System\Windows\Forms\TableLayoutStyleTests.cs (6)
128yield return new object[] { new RowStyle(SizeType.AutoSize, 1), typeof(RowStyle).GetConstructor(Array.Empty<Type>()), Array.Empty<object>() }; 129yield return new object[] { new RowStyle(SizeType.Absolute, 1), typeof(RowStyle).GetConstructor([typeof(SizeType), typeof(int)]), new object[] { SizeType.Absolute, 1f } }; 130yield return new object[] { new RowStyle(SizeType.Percent, 1), typeof(RowStyle).GetConstructor([typeof(SizeType), typeof(int)]), new object[] { SizeType.Percent, 1f } }; 131yield return new object[] { new ColumnStyle(SizeType.AutoSize, 1), typeof(ColumnStyle).GetConstructor(Array.Empty<Type>()), Array.Empty<object>() }; 132yield return new object[] { new ColumnStyle(SizeType.Absolute, 1), typeof(ColumnStyle).GetConstructor([typeof(SizeType), typeof(int)]), new object[] { SizeType.Absolute, 1f } }; 133yield return new object[] { new ColumnStyle(SizeType.Percent, 1), typeof(ColumnStyle).GetConstructor([typeof(SizeType), typeof(int)]), new object[] { SizeType.Percent, 1f } };
System.Xaml (6)
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\Replacements\TypeUriConverter.cs (1)
45ConstructorInfo constructor = typeof(Uri).GetConstructor(new Type[] { typeof(string), typeof(UriKind) });
System\Windows\Markup\StaticExtensionsToInstanceDescriptorsConverter.cs (1)
36typeof(StaticExtension).GetConstructor(new Type[] { typeof(string) }),
System\Windows\Markup\TypeExtensionConverter.cs (1)
36typeof(TypeExtension).GetConstructor(new Type[] { typeof(Type) }),
System\Xaml\Replacements\DateTimeOffsetConverter2.cs (1)
46ConstructorInfo constructor = typeof(DateTimeOffset).GetConstructor(new Type[]
System\Xaml\Schema\XamlTypeInvoker.cs (2)
259typeof(Action<object>).GetConstructor(new Type[] { typeof(object), typeof(IntPtr) }); 310ConstructorInfo tConstInfo = underlyingType.GetConstructor(Type.EmptyTypes);
WindowsBase.Tests (2)
System\Windows\Markup\Primitives\MarkupObjectTests.cs (1)
476var ctor = typeof(MarkupExtensionWithTypeConverter).GetConstructor(new[] { typeof(int), typeof(int) });
System\Windows\Markup\Primitives\MarkupPropertyTests.cs (1)
564var ctor = typeof(MarkupExtensionWithTypeConverter).GetConstructor(new[] { typeof(int), typeof(int) });
xunit.console (1)
ConsoleRunner.cs (1)
162var ctor = type.GetConstructor(new Type[0]);