209 references to GetConstructor
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)
1039var 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)
105private static readonly NewExpression EmptyHttpResultValueTaskExpr = Expression.New(typeof(ValueTask<object>).GetConstructor(new[] { typeof(EmptyHttpResult) })!, Expression.Property(null, typeof(EmptyHttpResult), nameof(EmptyHttpResult.Instance))); 111private static readonly ConstructorInfo DefaultEndpointFilterInvocationContextConstructor = typeof(DefaultEndpointFilterInvocationContext).GetConstructor(new[] { typeof(HttpContext), typeof(object[]) })!; 121private 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.CSharp (2)
Microsoft\CSharp\RuntimeBinder\BinderHelper.cs (1)
137typeof(RuntimeBinderException).GetConstructor(new Type[] { typeof(string) }),
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (1)
980agg.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) });
PresentationBuildTasks (3)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (3)
3010parentType.GetConstructor(Type.EmptyTypes) == null || 3287parentType.GetConstructor(Type.EmptyTypes) == null || 4409ParentContext.ContextDataType.GetConstructor(Type.EmptyTypes) == null))
PresentationCore (15)
MS\Internal\TextFormatting\FullTextLine.cs (2)
410ConstructorInfo constructor = t.GetConstructor( 421constructor = t.GetConstructor(
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\WindowsRuntime\ReflectionHelper.cs (3)
309ConstructorInfo constructor = type.GetConstructor(Type.EmptyTypes); 334ConstructorInfo constructor = type.GetConstructor(new Type[] { typeof(TArg1) }); 361ConstructorInfo constructor = type.GetConstructor(new Type[] { typeof(TArg1), typeof(TArg2) });
System\Windows\DurationConverter.cs (1)
108MemberInfo mi = typeof(Duration).GetConstructor(new Type[] { typeof(TimeSpan) });
System\Windows\FontStyleConverter.cs (1)
94ConstructorInfo ci = typeof(FontStyle).GetConstructor(new Type[]{typeof(int)});
System\Windows\Ink\StrokeCollectionConverter.cs (1)
130ConstructorInfo ci = typeof(StrokeCollection).GetConstructor(new Type[] { typeof(Stream) });
System\Windows\Media\Animation\KeySplineConverter.cs (1)
101ConstructorInfo ci = typeof(KeySpline).GetConstructor(new Type[]
System\Windows\Media\Animation\RepeatBehaviorConverter.cs (2)
131mi = typeof(RepeatBehavior).GetConstructor(new Type[] { typeof(double) }); 137mi = typeof(RepeatBehavior).GetConstructor(new Type[] { typeof(TimeSpan) });
System\Windows\Media\PixelFormatConverter.cs (1)
83ConstructorInfo ci = typeof(PixelFormat).GetConstructor(new Type[] { typeof(string) });
System\Windows\Media\RequestCachePolicyConverter.cs (2)
115ConstructorInfo ci = typeof(HttpRequestCachePolicy).GetConstructor(new Type[] { typeof(HttpRequestCachePolicy) }); 130ConstructorInfo ci = typeof(RequestCachePolicy).GetConstructor(new Type[] { typeof(RequestCachePolicy) });
System\Windows\TextDecorationCollectionConverter.cs (1)
171ConstructorInfo ci = typeof(TextDecorationCollection).GetConstructor(
PresentationFramework (17)
MS\Internal\Annotations\Serializer.cs (1)
55_ctor = type.GetConstructor(Array.Empty<Type>());
MS\Internal\WindowsRuntime\Generated\WinRT\ObjectReference.cs (1)
78var ctor = typeof(T).GetConstructor(new[] { typeof(IObjectReference) });
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\WindowsRuntime\ReflectionHelper.cs (3)
309ConstructorInfo constructor = type.GetConstructor(Type.EmptyTypes); 334ConstructorInfo constructor = type.GetConstructor(new Type[] { typeof(TArg1) }); 361ConstructorInfo constructor = type.GetConstructor(new Type[] { typeof(TArg1), typeof(TArg2) });
System\Windows\Controls\DataGridLengthConverter.cs (1)
142ConstructorInfo ci = typeof(DataGridLength).GetConstructor(new Type[] { typeof(double), typeof(DataGridLengthUnitType) });
System\Windows\Controls\VirtualizationCacheLengthConverter.cs (1)
145ConstructorInfo ci = typeof(VirtualizationCacheLength).GetConstructor(new Type[] { typeof(double), typeof(VirtualizationCacheLengthUnit) });
System\Windows\CornerRadiusConverter.cs (1)
131ConstructorInfo ci = typeof(CornerRadius).GetConstructor(new Type[] { typeof(double), typeof(double), typeof(double), typeof(double) });
System\Windows\Data\ListCollectionView.cs (1)
693_itemConstructor = itemType.GetConstructor(Type.EmptyTypes);
System\Windows\DynamicResourceExtensionConverter.cs (1)
50return new InstanceDescriptor(typeof(DynamicResourceExtension).GetConstructor(new Type[] { typeof(object) }),
System\Windows\FigureLengthConverter.cs (1)
158ConstructorInfo ci = typeof(FigureLength).GetConstructor(new Type[] { typeof(double), typeof(FigureUnitType) });
System\Windows\GridLengthConverter.cs (1)
178ConstructorInfo ci = typeof(GridLength).GetConstructor(new Type[] { typeof(double), typeof(GridUnitType) });
System\Windows\LengthConverter.cs (1)
153ConstructorInfo ci = typeof(double).GetConstructor(new Type[] { typeof(double) });
System\Windows\Standard\ErrorCodes.cs (1)
440ConstructorInfo cons = e.GetType().GetConstructor(new[] { typeof(string) });
System\Windows\TemplateBindingExtensionConverter.cs (1)
54return new InstanceDescriptor(typeof(TemplateBindingExtension).GetConstructor(new Type[] { typeof(DependencyProperty) }),
System\Windows\ThemeModeConverter.cs (1)
106ConstructorInfo ci = typeof(ThemeMode).GetConstructor(new Type[] { typeof(string) });
System\Windows\ThicknessConverter.cs (1)
131ConstructorInfo ci = typeof(Thickness).GetConstructor(new Type[] { typeof(double), typeof(double), typeof(double), typeof(double) });
PresentationFramework-SystemCore (1)
DynamicAccessorImpl.cs (1)
237typeof(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>) }); 70ConstructorInfo 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)
84ConstructorInfo? ctor = typeof(Point).GetConstructor(new Type[] { typeof(int), typeof(int) });
System\Drawing\RectangleConverter.cs (1)
84ConstructorInfo? ctor = typeof(Rectangle).GetConstructor(new Type[] {
System\Drawing\SizeConverter.cs (1)
82ConstructorInfo? ctor = typeof(Size).GetConstructor(new Type[] { typeof(int), typeof(int) });
System\Drawing\SizeFConverter.cs (1)
79ConstructorInfo? ctor = typeof(SizeF).GetConstructor(new Type[] { 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.Net.Security (3)
src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (3)
109ConstructorInfo? socketsHttpHandlerCtor = socketsHttpHandlerType.GetConstructor(Type.EmptyTypes); 112ConstructorInfo? httpClientCtor = httpClientType.GetConstructor(new Type[] { httpMessageHandlerType }); 114ConstructorInfo? httpRequestMessageCtor = httpRequestMessageType.GetConstructor(Type.EmptyTypes);
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 (2)
System\Reflection\DispatchProxyGenerator.cs (2)
197if (baseType.GetConstructor(Type.EmptyTypes) == null) 295ConstructorInfo baseCtor = _proxyBaseType.GetConstructor(Type.EmptyTypes)!;
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.Security.Cryptography (3)
src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (3)
109ConstructorInfo? socketsHttpHandlerCtor = socketsHttpHandlerType.GetConstructor(Type.EmptyTypes); 112ConstructorInfo? httpClientCtor = httpClientType.GetConstructor(new Type[] { httpMessageHandlerType }); 114ConstructorInfo? httpRequestMessageCtor = httpRequestMessageType.GetConstructor(Type.EmptyTypes);
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)
131ConstructorInfo ci = typeof(RibbonControlLength).GetConstructor(new Type[] { typeof(double), typeof(RibbonControlLengthUnitType) });
System.Windows.Forms (1)
System\Windows\Forms\DataBinding\ListBindingConverter.cs (1)
153ConstructorInfo? ctor = typeof(Binding).GetConstructor(ctorParams);
System.Windows.Forms.Tests (6)
System\Windows\Forms\ColumnHeaderConverterTests.cs (1)
98Assert.Equal(value.GetType().GetConstructor(parameterTypes), descriptor.MemberInfo);
System\Windows\Forms\ListViewGroupConverterTests.cs (1)
204Assert.Equal(typeof(ListViewGroup).GetConstructor(parameterTypes), descriptor.MemberInfo);
System\Windows\Forms\ListViewItemConverterTests.cs (1)
259Assert.Equal(typeof(ListViewItem).GetConstructor(parameterTypes), descriptor.MemberInfo);
System\Windows\Forms\ListViewSubItemConverterTests.cs (1)
72Assert.Equal(typeof(ListViewItem.ListViewSubItem).GetConstructor(parameterTypes), descriptor.MemberInfo);
System\Windows\Forms\TableLayoutStyleTests.cs (2)
126yield return new object[] { new RowStyle(SizeType.AutoSize, 1), typeof(RowStyle).GetConstructor(Array.Empty<Type>()), Array.Empty<object>() }; 129yield return new object[] { new ColumnStyle(SizeType.AutoSize, 1), typeof(ColumnStyle).GetConstructor(Array.Empty<Type>()), Array.Empty<object>() };
System.Xaml (6)
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\Replacements\TypeUriConverter.cs (1)
46ConstructorInfo constructor = typeof(Uri).GetConstructor(new Type[] { typeof(string), typeof(UriKind) });
System\Windows\Markup\StaticExtensionsToInstanceDescriptorsConverter.cs (1)
37typeof(StaticExtension).GetConstructor(new Type[] { typeof(string) }),
System\Windows\Markup\TypeExtensionConverter.cs (1)
37typeof(TypeExtension).GetConstructor(new Type[] { typeof(Type) }),
System\Xaml\Replacements\DateTimeOffsetConverter2.cs (1)
47ConstructorInfo constructor = typeof(DateTimeOffset).GetConstructor(new Type[]
System\Xaml\Schema\XamlTypeInvoker.cs (2)
260typeof(Action<object>).GetConstructor(new Type[] { typeof(object), typeof(IntPtr) }); 311ConstructorInfo 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]);