9 types derived from MemberInfo
System.Private.CoreLib (9)
1051 references to MemberInfo
ConfigurationSchemaGenerator (1)
dotnet-svcutil-lib (100)
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (18)
715internal TypeDesc GetTypeDesc(Type type, MemberInfo source)
720internal TypeDesc GetTypeDesc(Type type, MemberInfo source, bool directReference)
725internal TypeDesc GetTypeDesc(Type type, MemberInfo source, bool directReference, bool throwOnError)
783private TypeDesc ImportTypeDesc(Type type, MemberInfo memberInfo, bool directReference)
1095internal static MemberMapping[] GetAllMembers(StructMapping mapping, System.Collections.Generic.Dictionary<string, MemberInfo> memberInfos)
1120MemberInfo memberInfo = memberMapping.MemberInfo;
1148internal static MemberMapping[] GetSettableMembers(StructMapping mapping, System.Collections.Generic.Dictionary<string, MemberInfo> memberInfos)
1155private static void PopulateMemberInfos(StructMapping structMapping, MemberMapping[] mappings, System.Collections.Generic.Dictionary<string, MemberInfo> memberInfos)
1175Dictionary<string, MemberInfo> replaceList = null;
1176MemberInfo replacedInfo = null;
1177foreach (KeyValuePair<string, MemberInfo> pair in memberInfos)
1183replaceList = new Dictionary<string, MemberInfo>();
1192foreach (KeyValuePair<string, MemberInfo> pair in replaceList)
1198MemberInfo mi;
1209private static bool ShouldBeReplaced(MemberInfo memberInfoToBeReplaced, Type derivedType, out MemberInfo replacedInfo)
1287foreach (MemberInfo member in type.GetMember("System.Collections.Generic.IEnumerable<*", BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic))
1354MemberInfo[] defaultMembers = type.GetDefaultMembers();
Microsoft.AspNetCore.Components.Forms (5)
Microsoft.AspNetCore.Components.Forms.Tests (1)
Microsoft.AspNetCore.Components.Web (2)
Microsoft.AspNetCore.Diagnostics (1)
Microsoft.AspNetCore.Hosting (1)
Microsoft.AspNetCore.Http.Extensions (1)
Microsoft.AspNetCore.Mvc.Core (6)
Microsoft.AspNetCore.Mvc.RazorPages (3)
Microsoft.AspNetCore.Mvc.Test (1)
Microsoft.AspNetCore.Mvc.ViewFeatures (11)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
Microsoft.AspNetCore.Server.IIS (1)
Microsoft.AspNetCore.Shared.Tests (1)
Microsoft.Build (6)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (6)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
Microsoft.CodeAnalysis.Scripting (13)
Microsoft.CodeAnalysis.UnitTests (1)
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
Microsoft.CSharp (26)
Microsoft\CSharp\RuntimeBinder\RuntimeBinderExtensions.cs (19)
23public static bool IsEquivalentTo(this MemberInfo mi1, MemberInfo mi2)
139private static bool IsGenericallyEquivalentTo(this Type t1, Type t2, MemberInfo member1, MemberInfo member2)
221private static bool IsTypeParameterEquivalentToTypeInst(this Type typeParam, Type typeInst, MemberInfo member)
250private static Func<MemberInfo, MemberInfo, bool> s_MemberEquivalence = (m1, m2) =>
254Type memberInfo = typeof(MemberInfo);
261types: new Type[] { typeof(MemberInfo) },
265Func<MemberInfo, MemberInfo, bool> apiDelegate = apiMethod.CreateDelegate<Func<MemberInfo, MemberInfo, bool>>();
287var memberEquivalence = Expression.Lambda<Func<MemberInfo, MemberInfo, bool>>(
307Func<MemberInfo, MemberInfo, bool> fallbackMemberEquivalence = (m1param, m2param) => m1param.IsEquivalentTo(m2param);
314public static bool HasSameMetadataDefinitionAs(this MemberInfo mi1, MemberInfo mi2)
Microsoft.DotNet.Helix.Client (1)
Microsoft.Maui (1)
Microsoft.Maui.Controls (12)
Microsoft.Maui.Controls.Xaml (7)
Microsoft.ML.Data (23)
DataView\InternalSchemaDefinition.cs (6)
25public readonly MemberInfo MemberInfo;
35public Column(string columnName, DataViewType columnType, MemberInfo memberInfo) :
39public Column(string columnName, DataViewType columnType, MemberInfo memberInfo,
53private Column(string columnName, DataViewType columnType, MemberInfo memberInfo = null,
144public static void GetVectorAndItemType(MemberInfo memberInfo, out bool isVector, out Type itemType)
229MemberInfo memberInfo = null;
Microsoft.VisualBasic.Core (80)
mscorlib (1)
netstandard (1)
PresentationBuildTasks (58)
MS\Internal\MarkupCompiler\MarkupCompiler.cs (6)
1889private Type GetEventHandlerType(MemberInfo memberInfo)
1908private CodeFieldReferenceExpression GetEvent(MemberInfo miEvent, string eventName, string eventHandler)
1922private CodeExpression GetEventDelegate(CodeContext cc, MemberInfo miEvent, string eventName, string eventHandler)
2079internal MarkupEventInfo(string eh, string en, MemberInfo mi, int ln)
2089internal MemberInfo mi;
3126internal void AddApplicationProperty(MemberInfo memberInfo, string attributeValue, int lineNumber)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (15)
775private MemberInfo GetCachedMemberInfo(
790return infoRecord.GetPropertyMember(onlyPropInfo) as MemberInfo;
937internal MemberInfo GetClrInfo(
1212internal MemberInfo GetClrInfoForClass (
1220MemberInfo mi = null;
1242private MemberInfo GetClrInfoForClass(
1252MemberInfo memberInfo = null;
2120MemberInfo memInfo = propertyMember as MemberInfo;
2311MemberInfo memberInfo = GetStaticMemberInfo(targetType, fieldName, true);
2325internal MemberInfo GetStaticMemberInfo(Type targetType, string memberName, bool fieldInfoOnly)
2329MemberInfo mi = GetStaticMemberInfo(targetType, memberName, fieldInfoOnly, false);
2365private MemberInfo GetStaticMemberInfo(Type targetType, string memberName, bool fieldInfoOnly, bool tryInternal)
2367MemberInfo memberInfo = null;
3535MemberInfo memberInfo = TypeConverterHelper.GetMemberInfoForPropertyConverter(dpOrPiOrMi);
PresentationCore (5)
PresentationFramework (46)
System\Windows\Markup\XamlTypeMapper.cs (16)
775private MemberInfo GetCachedMemberInfo(
790return infoRecord.GetPropertyMember(onlyPropInfo) as MemberInfo;
937internal MemberInfo GetClrInfo(
1212internal MemberInfo GetClrInfoForClass (
1220MemberInfo mi = null;
1242private MemberInfo GetClrInfoForClass(
1252MemberInfo memberInfo = null;
2120MemberInfo memInfo = propertyMember as MemberInfo;
2311MemberInfo memberInfo = GetStaticMemberInfo(targetType, fieldName, true);
2325internal MemberInfo GetStaticMemberInfo(Type targetType, string memberName, bool fieldInfoOnly)
2329MemberInfo mi = GetStaticMemberInfo(targetType, memberName, fieldInfoOnly, false);
2365private MemberInfo GetStaticMemberInfo(Type targetType, string memberName, bool fieldInfoOnly, bool tryInternal)
2367MemberInfo memberInfo = null;
3535MemberInfo memberInfo = TypeConverterHelper.GetMemberInfoForPropertyConverter(dpOrPiOrMi);
3577MemberInfo memberInfo = TypeConverterHelper.GetMemberInfoForPropertyConverter(dpOrPiOrMi);
ReachFramework (9)
System.ComponentModel.Annotations (1)
System.ComponentModel.Composition (54)
System.ComponentModel.Composition.Registration (17)
System.ComponentModel.TypeConverter (9)
System.Composition.AttributedModel (1)
System.Composition.Convention (17)
System.Composition.TypedParts (4)
System.Diagnostics.TraceSource (4)
System.Linq.Expressions (58)
System\Linq\Expressions\NewExpression.cs (15)
22internal NewExpression(ConstructorInfo? constructor, IReadOnlyList<Expression> arguments, ReadOnlyCollection<MemberInfo>? members)
66public ReadOnlyCollection<MemberInfo>? Members { get; }
98internal NewValueTypeExpression(Type type, ReadOnlyCollection<Expression> arguments, ReadOnlyCollection<MemberInfo>? members)
159/// <param name="members">An <see cref="IEnumerable{T}"/> of <see cref="MemberInfo"/> objects to use to populate the <see cref="NewExpression.Members"/> collection.</param>
162public static NewExpression New(ConstructorInfo constructor, IEnumerable<Expression>? arguments, IEnumerable<MemberInfo>? members)
173ReadOnlyCollection<MemberInfo> memberList = members.ToReadOnly();
184/// <param name="members">An Array of <see cref="MemberInfo"/> objects to use to populate the <see cref="NewExpression.Members"/> collection.</param>
187public static NewExpression New(ConstructorInfo constructor, IEnumerable<Expression>? arguments, params MemberInfo[]? members)
189return New(constructor, arguments, (IEnumerable<MemberInfo>?)members);
220private static void ValidateNewArgs(ConstructorInfo constructor, ref ReadOnlyCollection<Expression> arguments, ref ReadOnlyCollection<MemberInfo> members)
234MemberInfo[]? newMembers = null;
239MemberInfo member = members[i];
282newMembers = new MemberInfo[members.Count];
299members = new TrueReadOnlyCollection<MemberInfo>(newMembers);
313private static void ValidateAnonymousTypeMember(ref MemberInfo member, out Type memberType, string paramName, int index)
System.Private.CoreLib (138)
src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeExtensions.cs (12)
19public static Attribute? GetCustomAttribute(this MemberInfo element, Type attributeType)
36public static T? GetCustomAttribute<T>(this MemberInfo element) where T : Attribute
45public static Attribute? GetCustomAttribute(this MemberInfo element, Type attributeType, bool inherit)
54public static T? GetCustomAttribute<T>(this MemberInfo element, bool inherit) where T : Attribute
73public static IEnumerable<Attribute> GetCustomAttributes(this MemberInfo element)
82public static IEnumerable<Attribute> GetCustomAttributes(this MemberInfo element, bool inherit)
101public static IEnumerable<Attribute> GetCustomAttributes(this MemberInfo element, Type attributeType)
118public static IEnumerable<T> GetCustomAttributes<T>(this MemberInfo element) where T : Attribute
127public static IEnumerable<Attribute> GetCustomAttributes(this MemberInfo element, Type attributeType, bool inherit)
136public static IEnumerable<T> GetCustomAttributes<T>(this MemberInfo element, bool inherit) where T : Attribute
155public static bool IsDefined(this MemberInfo element, Type attributeType)
164public static bool IsDefined(this MemberInfo element, Type attributeType, bool inherit)
src\libraries\System.Private.CoreLib\src\System\Reflection\NullabilityInfoContext.cs (10)
23private readonly Dictionary<MemberInfo, NullabilityState> _context = new();
33private NullabilityState? GetNullableContext(MemberInfo? memberInfo)
93MemberInfo metaMember;
337private NullabilityInfo GetNullabilityInfo(MemberInfo memberInfo, Type type, NullableAttributeStateParser parser)
350private NullabilityInfo GetNullabilityInfo(MemberInfo memberInfo, Type type, NullableAttributeStateParser parser, ref int index)
422private void TryLoadGenericMetaTypeNullability(MemberInfo memberInfo, NullabilityInfo nullability)
424MemberInfo? metaMember = GetMemberMetadataDefinition(memberInfo);
441private static MemberInfo GetMemberMetadataDefinition(MemberInfo member)
462private void CheckGenericParameters(NullabilityInfo nullability, MemberInfo metaMember, Type metaType, Type? reflectedType)
src\System\Attribute.CoreCLR.cs (11)
445public static Attribute[] GetCustomAttributes(MemberInfo element, Type attributeType)
450public static Attribute[] GetCustomAttributes(MemberInfo element, Type attributeType, bool inherit)
466public static Attribute[] GetCustomAttributes(MemberInfo element)
471public static Attribute[] GetCustomAttributes(MemberInfo element, bool inherit)
483public static bool IsDefined(MemberInfo element, Type attributeType)
488public static bool IsDefined(MemberInfo element, Type attributeType, bool inherit)
505public static Attribute? GetCustomAttribute(MemberInfo element, Type attributeType)
510public static Attribute? GetCustomAttribute(MemberInfo element, Type attributeType, bool inherit)
548MemberInfo member = element.Member;
562MemberInfo member = element.Member;
584MemberInfo member = element.Member;
src\System\Reflection\RuntimeParameterInfo.cs (6)
14internal static ParameterInfo[] GetParameters(IRuntimeMethodInfo method, MemberInfo member, Signature sig)
21internal static ParameterInfo GetReturnParameter(IRuntimeMethodInfo method, MemberInfo member, Signature sig)
30IRuntimeMethodInfo methodHandle, MemberInfo member, Signature sig, out ParameterInfo? returnParameter, bool fetchReturnParameter)
151: this(accessor, (MemberInfo)property)
156private RuntimeParameterInfo(RuntimeParameterInfo accessor, MemberInfo member)
181int position, ParameterAttributes attributes, MemberInfo member)
src\System\RuntimeType.CoreCLR.cs (22)
191private sealed class MemberInfoCache<T> where T : MemberInfo
1464where T : MemberInfo
1471where T : MemberInfo
2012internal static void ValidateGenericArguments(MemberInfo definition, RuntimeType[] genericArguments, Exception? e)
2145private static bool FilterApplyPrefixLookup(MemberInfo memberInfo, string name, bool ignoreCase)
2165MemberInfo memberInfo, BindingFlags bindingFlags, bool isPublic, bool isNonProtectedInternal, bool isStatic,
2699public override MemberInfo[] GetMembers(BindingFlags bindingAttr)
2709MemberInfo[] members = new MemberInfo[
3047public override MemberInfo[] GetMember(string name, MemberTypes type, BindingFlags bindingAttr)
3114MemberInfo[] compressMembers = (type == (MemberTypes.Method | MemberTypes.Constructor)) ?
3115new MethodBase[totalCount] : new MemberInfo[totalCount];
3129public override MemberInfo GetMemberWithSameMetadataDefinitionAs(MemberInfo member)
3136MemberInfo? result = member.MemberType switch
3158private static RuntimeMethodInfo? GetMethodWithSameMetadataDefinitionAs(RuntimeType runtimeType, MemberInfo method)
3174private static RuntimeConstructorInfo? GetConstructorWithSameMetadataDefinitionAs(RuntimeType runtimeType, MemberInfo constructor)
3190private static RuntimePropertyInfo? GetPropertyWithSameMetadataDefinitionAs(RuntimeType runtimeType, MemberInfo property)
3206private static RuntimeFieldInfo? GetFieldWithSameMetadataDefinitionAs(RuntimeType runtimeType, MemberInfo field)
3222private static RuntimeEventInfo? GetEventWithSameMetadataDefinitionAs(RuntimeType runtimeType, MemberInfo eventInfo)
3238private static RuntimeType? GetNestedTypeWithSameMetadataDefinitionAs(RuntimeType runtimeType, MemberInfo nestedType)
3703public sealed override bool HasSameMetadataDefinitionAs(MemberInfo other) => HasSameMetadataDefinitionAsCore<RuntimeType>(other);
System.Private.DataContractSerialization (24)
System.Private.Windows.Core (1)
System.Private.Windows.Core.TestUtilities (8)
System.Private.Xml (78)
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (12)
655MemberInfo memberInfo = ReflectionXmlSerializationHelper.GetEffectiveGetInfo(o.GetType(), memberName);
748private static object? GetMemberValue(object? o, MemberInfo memberInfo)
1334public static MemberInfo? GetMember(Type declaringType, string memberName, bool throwOnNotFound)
1336MemberInfo[] memberInfos = declaringType.GetMember(memberName);
1365MemberInfo memberInfo = memberInfos![0];
1368foreach (MemberInfo mi in memberInfos)
1381public static MemberInfo GetEffectiveGetInfo(Type declaringType, string memberName)
1383MemberInfo memberInfo = GetMember(declaringType, memberName, true)!;
1394var mi = GetMember(parent, memberName, false);
1408public static MemberInfo GetEffectiveSetInfo(Type declaringType, string memberName)
1410MemberInfo memberInfo = GetMember(declaringType, memberName, true)!;
1421var mi = GetMember(parent, memberName, false);
System\Xml\Serialization\Types.cs (17)
692internal TypeDesc GetTypeDesc(Type type, MemberInfo? source, bool directReference)
698internal TypeDesc GetTypeDesc(Type type, MemberInfo? source, bool directReference, bool throwOnError)
754private TypeDesc ImportTypeDesc(Type type, MemberInfo? memberInfo, bool directReference)
1047internal static MemberMapping[] GetAllMembers(StructMapping mapping, System.Collections.Generic.Dictionary<string, MemberInfo> memberInfos)
1072MemberInfo? memberInfo = memberMapping.MemberInfo;
1098internal static MemberMapping[] GetSettableMembers(StructMapping mapping, System.Collections.Generic.Dictionary<string, MemberInfo> memberInfos)
1106private static void PopulateMemberInfos(StructMapping structMapping, MemberMapping[] mappings, System.Collections.Generic.Dictionary<string, MemberInfo> memberInfos)
1126Dictionary<string, MemberInfo>? replaceList = null;
1127MemberInfo? replacedInfo;
1128foreach (KeyValuePair<string, MemberInfo> pair in memberInfos)
1132replaceList ??= new Dictionary<string, MemberInfo>();
1140foreach (KeyValuePair<string, MemberInfo> pair in replaceList)
1146if (replaceList.TryGetValue(mappings[i].Name, out MemberInfo? mi))
1161MemberInfo memberInfoToBeReplaced,
1163out MemberInfo replacedInfo)
1258foreach (MemberInfo member in type.GetMember("System.Collections.Generic.IEnumerable<*", BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic))
1323MemberInfo[] defaultMembers = type.GetDefaultMembers();
System.Reflection (1)
System.Reflection.Context (25)
System.Reflection.Emit (18)
System.Reflection.MetadataLoadContext (38)
System\Reflection\TypeLoading\RuntimeTypeInfo.GetMember.cs (9)
11public sealed override MemberInfo[] GetMembers(BindingFlags bindingAttr) => GetMemberImpl(null, MemberTypes.All, bindingAttr);
12public sealed override MemberInfo[] GetMember(string name, BindingFlags bindingAttr)
22public sealed override MemberInfo[] GetMember(string name, MemberTypes type, BindingFlags bindingAttr)
32private MemberInfo[] GetMemberImpl(string? optionalNameOrPrefix, MemberTypes type, BindingFlags bindingAttr)
37Func<MemberInfo, bool>? predicate = null;
47MemberInfo[]? results;
68results = (type == (MemberTypes.Method | MemberTypes.Constructor)) ? new MethodBase[numMatches] : new MemberInfo[numMatches];
94private M[]? QuerySpecificMemberTypeIfRequested<M>(MemberTypes memberType, string? optionalName, BindingFlags bindingAttr, Func<MemberInfo, bool>? optionalPredicate, MemberTypes targetMemberType, out QueryResult<M> queryResult) where M : MemberInfo
System.Reflection.TypeExtensions (10)
System.Resources.Extensions (1)
System.Runtime (1)
System.Runtime.Serialization.Formatters (16)
System.Runtime.Serialization.Primitives (2)
System.Text.Json (27)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (8)
203MemberInfo memberInfo,
225MemberInfo memberInfo,
324MemberInfo memberInfo,
364private static void DeterminePropertyPolicies(JsonPropertyInfo propertyInfo, MemberInfo memberInfo)
376private static void DeterminePropertyName(JsonPropertyInfo propertyInfo, MemberInfo memberInfo)
401private static void DeterminePropertyIsRequired(JsonPropertyInfo propertyInfo, MemberInfo memberInfo, bool shouldCheckForRequiredKeyword)
410internal static void DeterminePropertyAccessors<T>(JsonPropertyInfo<T> jsonPropertyInfo, MemberInfo memberInfo, bool useNonPublicAccessors)
470private static void DeterminePropertyNullability(JsonPropertyInfo propertyInfo, MemberInfo memberInfo, NullabilityInfoContext nullabilityCtx)
System.Text.Json.SourceGeneration (1)
System.Windows.Forms (3)
System.Windows.Forms.Design (7)
System.Windows.Forms.Interop.Tests (1)
System.Windows.Forms.Primitives.TestUtilities (1)
System.Windows.Forms.Tests (2)
System.Xaml (44)
System\Xaml\Schema\TypeReflector.cs (6)
584MemberInfo[] infos = UnderlyingType.GetMember(name, MemberTypes.Property, AllProperties_BF);
755MemberInfo[] adders = UnderlyingType.GetMember(adderName, MemberTypes.Method, AttachableProperties_BF);
763MemberInfo[] getters = UnderlyingType.GetMember(KnownStrings.Get + name, MemberTypes.Method, AttachableProperties_BF);
771MemberInfo[] setters = UnderlyingType.GetMember(KnownStrings.Set + name, MemberTypes.Method, AttachableProperties_BF);
779private void PrioritizeAccessors(MemberInfo[] accessors, bool isEvent, bool isGetter, out List<MethodInfo> preferredAccessors, out List<MethodInfo> otherAccessors)
1042protected override MemberInfo Member
System\Xaml\XamlObjectReader.cs (9)
1209ParameterInfo[] GetMethodParams(MemberInfo memberInfo)
1221void AddFactoryMethodAndValidateArguments(Type valueType, MemberInfo memberInfo, ICollection arguments, SerializerContext context, out ParameterInfo[] methodParams)
1321bool TryAddPositionalParameters(XamlType xamlType, MemberInfo member, ICollection arguments, SerializerContext context)
1390bool TryGetInstanceDescriptorInfo(object value, SerializerContext context, TypeConverter converter, out MemberInfo member, out ICollection arguments, out bool isComplete)
1407out MemberInfo member, out ICollection arguments, out bool isComplete)
1418bool TryGetDefaultConstructorInfo(XamlType type, out MemberInfo member, out ICollection arguments, out bool isComplete)
1512MemberInfo member = null;
1547MemberInfo instanceDescriptorMember = member;
1602void GetConstructorInfo(object value, XamlType valueXamlType, SerializerContext context, out MemberInfo member, out ICollection arguments, out bool isComplete)
System\Xaml\XamlSchemaContext.cs (14)
467private ConcurrentDictionary<ReferenceEqualityTuple<MemberInfo, MemberInfo>, XamlMember> _masterMemberList;
510private ConcurrentDictionary<ReferenceEqualityTuple<MemberInfo, MemberInfo>, XamlMember> MasterMemberList
515Interlocked.CompareExchange(ref _masterMemberList, CreateDictionary<ReferenceEqualityTuple<MemberInfo, MemberInfo>, XamlMember>(), null);
607var xpik = new ReferenceEqualityTuple<MemberInfo, MemberInfo>(pi, null);
619var xpik = new ReferenceEqualityTuple<MemberInfo, MemberInfo>(ei, null);
633var xpik = new ReferenceEqualityTuple<MemberInfo, MemberInfo>(getter, setter);
645var xpik = new ReferenceEqualityTuple<MemberInfo, MemberInfo>(adder, null);