6 types derived from ConstructorInfo
System.Private.CoreLib (4)
System.Reflection.Context (1)
System.Reflection.MetadataLoadContext (1)
990 references to ConstructorInfo
Aspire.Hosting.Tests (1)
dotnet-svcutil-lib (58)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CollectionDataContract.cs (8)
172private CollectionDataContract(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo addMethod, ConstructorInfo constructor)
183private CollectionDataContract(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo addMethod, ConstructorInfo constructor, bool isConstructorCheckRequired)
433internal ConstructorInfo Constructor
577private readonly ConstructorInfo _constructor;
688internal CollectionDataContractCriticalHelper(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo addMethod, ConstructorInfo constructor) : base(type)
707internal CollectionDataContractCriticalHelper(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo addMethod, ConstructorInfo constructor, bool isConstructorCheckRequired)
827internal ConstructorInfo Constructor
1083ConstructorInfo defaultCtor = null;
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (1)
Microsoft.AspNetCore.Authentication.Test (2)
Microsoft.AspNetCore.Components (9)
Microsoft.AspNetCore.Components.Endpoints (1)
Microsoft.AspNetCore.Connections.Abstractions (3)
Microsoft.AspNetCore.DataProtection (2)
Microsoft.AspNetCore.Http.Extensions (11)
Microsoft.AspNetCore.InternalTesting (1)
Microsoft.AspNetCore.InternalTesting.Tests (4)
Microsoft.AspNetCore.Mvc.Abstractions (11)
Microsoft.AspNetCore.Mvc.Core (13)
Microsoft.AspNetCore.Mvc.Core.Test (16)
Microsoft.AspNetCore.Mvc.Formatters.Xml (1)
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Microsoft.AspNetCore.OpenApi (7)
Microsoft.AspNetCore.Routing (9)
Microsoft.AspNetCore.Shared.Tests (4)
Microsoft.AspNetCore.SignalR.Core (5)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
Microsoft.Build (6)
Microsoft.Build.Engine.UnitTests (1)
Microsoft.Build.Tasks.CodeAnalysis (3)
Microsoft.Build.Tasks.Core (1)
Microsoft.CodeAnalysis (3)
Microsoft.CodeAnalysis.CodeStyle (3)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (3)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (6)
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Microsoft.CodeAnalysis.Test.Utilities (4)
Microsoft.CodeAnalysis.Workspaces (3)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
Microsoft.CSharp (11)
Microsoft.DotNet.Internal.DependencyInjection.Testing (3)
Microsoft.DotNet.Open.Api.Tools.Tests (1)
Microsoft.Extensions.AI.Abstractions (9)
Microsoft.Extensions.ApiDescription.Tool.Tests (1)
Microsoft.Extensions.Configuration.Binder (2)
Microsoft.Extensions.DependencyInjection (7)
Microsoft.Extensions.DependencyInjection.Abstractions (13)
ActivatorUtilities.cs (13)
186FindApplicableConstructor(instanceType, argumentTypes, constructors, out ConstructorInfo constructorInfo, out int?[] parameterMap);
254ConstructorInfo[] constructors = type.GetConstructors();
336FindApplicableConstructor(instanceType, argumentTypes, constructors: null, out ConstructorInfo constructor, out int?[] parameterMap);
396ConstructorInfo constructor,
451FindApplicableConstructor(instanceType, argumentTypes, constructors: null, out ConstructorInfo constructor, out int?[] parameterMap);
569out ConstructorInfo matchingConstructor,
572ConstructorInfo? constructorInfo;
586private static ConstructorInfoEx FindConstructorEx(ConstructorInfo constructorInfo, ConstructorInfoEx[] constructorExs)
604[NotNullWhen(true)] out ConstructorInfo? matchingConstructor,
610foreach (ConstructorInfo? constructor in instanceType.GetConstructors())
638[NotNullWhen(true)] out ConstructorInfo? matchingConstructor,
724public readonly ConstructorInfo Info;
740public ConstructorInfoEx(ConstructorInfo constructor)
Microsoft.Extensions.SecretManager.Tools.Tests (1)
Microsoft.ML.Core (7)
Microsoft.ML.Data (9)
Microsoft.ML.Transforms (1)
Microsoft.VisualBasic.Core (9)
mscorlib (1)
netstandard (1)
PresentationBuildTasks (9)
PresentationCore (11)
PresentationFramework (26)
System.CodeDom (2)
System.ComponentModel.Composition (28)
System.ComponentModel.Composition.Registration (22)
System.ComponentModel.TypeConverter (17)
System.Composition.Convention (24)
System.Composition.Hosting (2)
System.Composition.TypedParts (5)
System.Configuration.ConfigurationManager (15)
System.Data.Common (5)
System.Linq.Expressions (54)
System\Linq\Expressions\NewExpression.cs (16)
22internal NewExpression(ConstructorInfo? constructor, IReadOnlyList<Expression> arguments, ReadOnlyCollection<MemberInfo>? members)
44public ConstructorInfo? Constructor { get; }
112/// <param name="constructor">The <see cref="ConstructorInfo"/> to set the <see cref="NewExpression.Constructor"/> property equal to.</param>
114public static NewExpression New(ConstructorInfo constructor)
122/// <param name="constructor">The <see cref="ConstructorInfo"/> to set the <see cref="NewExpression.Constructor"/> property equal to.</param>
125public static NewExpression New(ConstructorInfo constructor, params Expression[]? arguments)
133/// <param name="constructor">The <see cref="ConstructorInfo"/> to set the <see cref="NewExpression.Constructor"/> property equal to.</param>
136public static NewExpression New(ConstructorInfo constructor, IEnumerable<Expression>? arguments)
157/// <param name="constructor">The <see cref="ConstructorInfo"/> to set the <see cref="NewExpression.Constructor"/> property equal to.</param>
162public static NewExpression New(ConstructorInfo constructor, IEnumerable<Expression>? arguments, IEnumerable<MemberInfo>? members)
182/// <param name="constructor">The <see cref="ConstructorInfo"/> to set the <see cref="NewExpression.Constructor"/> property equal to.</param>
187public static NewExpression New(ConstructorInfo constructor, IEnumerable<Expression>? arguments, params MemberInfo[]? members)
196/// <returns>A <see cref="NewExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="ExpressionType.New"/> and the <see cref="NewExpression.Constructor"/> property set to the <see cref="ConstructorInfo"/> that represents the parameterless constructor of the specified type.</returns>
207ConstructorInfo? ci = type.GetConstructors(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).SingleOrDefault(c => c.GetParametersCached().Length == 0);
220private static void ValidateNewArgs(ConstructorInfo constructor, ref ReadOnlyCollection<Expression> arguments, ref ReadOnlyCollection<MemberInfo> members)
354private static void ValidateConstructor(ConstructorInfo constructor, string paramName)
System.Net.Security (3)
System.Private.CoreLib (128)
src\libraries\System.Private.CoreLib\src\System\Type.cs (9)
153public ConstructorInfo? TypeInitializer
160public ConstructorInfo? GetConstructor(Type[] types) => GetConstructor(BindingFlags.Public | BindingFlags.Instance, null, types, null);
178/// A <see cref="ConstructorInfo"/> object representing the constructor that matches the specified requirements, if found; otherwise, null.
181public ConstructorInfo? GetConstructor(BindingFlags bindingAttr, Type[] types) => GetConstructor(bindingAttr, binder: null, types, modifiers: null);
184public ConstructorInfo? GetConstructor(BindingFlags bindingAttr, Binder? binder, Type[] types, ParameterModifier[]? modifiers) => GetConstructor(bindingAttr, binder, CallingConventions.Any, types, modifiers);
187public ConstructorInfo? GetConstructor(BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers)
199protected abstract ConstructorInfo? GetConstructorImpl(BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers);
202public ConstructorInfo[] GetConstructors() => GetConstructors(BindingFlags.Public | BindingFlags.Instance);
205public abstract ConstructorInfo[] GetConstructors(BindingFlags bindingAttr);
src\System\Reflection\Emit\CustomAttributeBuilder.cs (6)
24private readonly ConstructorInfo m_con;
28internal ConstructorInfo Ctor => m_con;
34public CustomAttributeBuilder(ConstructorInfo con, object?[] constructorArgs) :
41public CustomAttributeBuilder(ConstructorInfo con, object?[] constructorArgs, PropertyInfo[] namedProperties, object?[] propertyValues) :
48public CustomAttributeBuilder(ConstructorInfo con, object?[] constructorArgs, FieldInfo[] namedFields, object?[] fieldValues) :
55public CustomAttributeBuilder(ConstructorInfo con, object?[] constructorArgs, PropertyInfo[] namedProperties, object?[] propertyValues, FieldInfo[] namedFields, object?[] fieldValues)
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (12)
24private readonly ConstructorInfo? m_con;
28public CustAttr(ConstructorInfo con, ReadOnlySpan<byte> binaryAttribute)
575internal void SetGenParamCustomAttribute(ConstructorInfo con, ReadOnlySpan<byte> binaryAttribute)
662protected override ConstructorInfo? GetConstructorImpl(BindingFlags bindingAttr, Binder? binder,
672public override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr)
1104if ((method.Attributes & MethodAttributes.SpecialName) != 0 && method.Name.Equals(ConstructorInfo.ConstructorName))
1213ConstructorInfo.TypeConstructorName, attr, CallingConventions.Standard, null, m_module, this);
1246ConstructorInfo? con = null;
1311name = ConstructorInfo.ConstructorName;
1315name = ConstructorInfo.TypeConstructorName;
1735internal void SetCustomAttribute(ConstructorInfo con, ReadOnlySpan<byte> binaryAttribute)
1740protected override void SetCustomAttributeCore(ConstructorInfo con, ReadOnlySpan<byte> binaryAttribute)
src\System\RuntimeType.CoreCLR.cs (13)
2539private ListBuilder<ConstructorInfo> GetConstructorCandidates(
2547ListBuilder<ConstructorInfo> candidates = new ListBuilder<ConstructorInfo>(cache.Length);
2659public override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr)
2699ListBuilder<ConstructorInfo> constructors = GetConstructorCandidates(null, bindingAttr, CallingConventions.Any, null, false);
2845protected override ConstructorInfo? GetConstructorImpl(
2849ListBuilder<ConstructorInfo> candidates = GetConstructorCandidates(null, bindingAttr, CallingConventions.Any, types, false);
2856ConstructorInfo firstCandidate = candidates[0];
2865return System.DefaultBinder.ExactBinding(candidates.ToArray(), types) as ConstructorInfo;
2868return binder.SelectMethod(bindingAttr, candidates.ToArray(), types, modifiers) as ConstructorInfo;
3049ListBuilder<ConstructorInfo> constructors = default;
3885ListBuilder<ConstructorInfo> candidates = GetConstructorCandidates(null, bindingAttr, CallingConventions.Any, null, false);
3950instance = ((ConstructorInfo)invokeMethod).Invoke(bindingAttr, binder, args, culture);
System.Private.DataContractSerialization (48)
System\Runtime\Serialization\CollectionDataContract.cs (8)
114private CollectionDataContract(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo? addMethod, ConstructorInfo? constructor)
122private CollectionDataContract(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo? addMethod, ConstructorInfo? constructor, bool isConstructorCheckRequired)
250internal ConstructorInfo? Constructor => _helper.Constructor;
409private readonly ConstructorInfo? _constructor;
567CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo? addMethod, ConstructorInfo? constructor)
580internal CollectionDataContractCriticalHelper(Type type, CollectionKind kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo? addMethod, ConstructorInfo? constructor, bool isConstructorCheckRequired)
690internal ConstructorInfo? Constructor => _constructor;
1103ConstructorInfo? defaultCtor = null;
System.Private.Windows.Core (4)
System.Private.Windows.Core.TestUtilities (1)
System.Private.Xml (44)
System.Reflection (1)
System.Reflection.Context (19)
System.Reflection.DispatchProxy (7)
System.Reflection.Emit (40)
System\Reflection\Emit\TypeBuilderImpl.cs (10)
184name = ConstructorInfo.ConstructorName;
188name = ConstructorInfo.TypeConstructorName;
213ConstructorInfo? con;
425return new ConstructorBuilderImpl(ConstructorInfo.TypeConstructorName, attr, CallingConventions.Standard, null, null, null, _module, this);
472protected override void SetCustomAttributeCore(ConstructorInfo con, ReadOnlySpan<byte> binaryAttribute)
503internal void SetCustomAttribute(ConstructorInfo con, ReadOnlySpan<byte> binaryAttribute)
508private void ParseStructLayoutAttribute(ConstructorInfo con, ReadOnlySpan<byte> binaryAttribute)
664protected override ConstructorInfo? GetConstructorImpl(BindingFlags bindingAttr, Binder? binder,
755public override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr)
759List<ConstructorInfo> ctors = new();
System.Reflection.MetadataLoadContext (78)
System\Reflection\Runtime\BindingFlagSupport\ConstructorPolicies.cs (10)
13internal sealed class ConstructorPolicies : MemberPolicies<ConstructorInfo>
15public sealed override IEnumerable<ConstructorInfo> GetDeclaredMembers(TypeInfo typeInfo)
20public sealed override IEnumerable<ConstructorInfo> CoreGetDeclaredMembers(RuntimeTypeInfo type, NameFilter? filter, RuntimeTypeInfo reflectedType)
34public sealed override void GetMemberAttributes(ConstructorInfo member, out MethodAttributes visibility, out bool isStatic, out bool isVirtual, out bool isNewSlot)
43public sealed override bool ImplicitlyOverrides(ConstructorInfo? baseMember, ConstructorInfo? derivedMember) => false;
45public sealed override bool IsSuppressedByMoreDerivedMember(ConstructorInfo member, ConstructorInfo[] priorMembers, int startIndex, int endIndex)
50public sealed override bool OkToIgnoreAmbiguity(ConstructorInfo m1, ConstructorInfo m2)
System.Reflection.TypeExtensions (3)
System.Resources.Extensions (3)
System.Runtime (1)
System.Runtime.InteropServices (4)
System.Runtime.Serialization.Formatters (3)
System.Security.Cryptography (5)
System.ServiceModel.Http (3)
System.ServiceModel.Primitives (4)
System.Text.Json (34)
System\Text\Json\Serialization\Metadata\MemberAccessor.cs (3)
12public abstract Func<object>? CreateParameterlessConstructor(Type type, ConstructorInfo? constructorInfo);
14public abstract Func<object[], T> CreateParameterizedConstructor<T>(ConstructorInfo constructor);
16public abstract JsonTypeInfo.ParameterizedConstructorDelegate<T, TArg0, TArg1, TArg2, TArg3>? CreateParameterizedConstructor<T, TArg0, TArg1, TArg2, TArg3>(ConstructorInfo constructor);
System\Text\Json\Serialization\Metadata\ReflectionEmitCachingMemberAccessor.cs (6)
31public override Func<object>? CreateParameterlessConstructor(Type type, ConstructorInfo? ctorInfo) =>
34valueFactory: key => _sourceAccessor.CreateParameterlessConstructor(key.declaringType, (ConstructorInfo?)key.member));
56public override Func<object[], T> CreateParameterizedConstructor<T>(ConstructorInfo constructor) =>
59valueFactory: key => _sourceAccessor.CreateParameterizedConstructor<T>((ConstructorInfo)key.member!));
61public override JsonTypeInfo.ParameterizedConstructorDelegate<T, TArg0, TArg1, TArg2, TArg3>? CreateParameterizedConstructor<T, TArg0, TArg1, TArg2, TArg3>(ConstructorInfo constructor) =>
64valueFactory: key => _sourceAccessor.CreateParameterizedConstructor<T, TArg0, TArg1, TArg2, TArg3>((ConstructorInfo)key.member!));
System\Text\Json\Serialization\Metadata\ReflectionEmitMemberAccessor.cs (8)
21public override Func<object>? CreateParameterlessConstructor(Type type, ConstructorInfo? constructorInfo)
37ConstructorInfo.ConstructorName,
71public override Func<object[], T> CreateParameterizedConstructor<T>(ConstructorInfo constructor) =>
74private static DynamicMethod CreateParameterizedConstructor(ConstructorInfo constructor)
86ConstructorInfo.ConstructorName,
111CreateParameterizedConstructor<T, TArg0, TArg1, TArg2, TArg3>(ConstructorInfo constructor) =>
115private static DynamicMethod? CreateParameterizedConstructor(ConstructorInfo constructor, Type parameterType1, Type parameterType2, Type parameterType3, Type parameterType4)
127ConstructorInfo.ConstructorName,
System.Windows.Controls.Ribbon (1)
System.Windows.Forms (13)
System.Windows.Forms.Design (6)
System.Windows.Forms.Tests (8)
System.Xaml (29)
System.Xaml.Tests (2)
xunit.console (1)