6 types derived from PropertyInfo
PresentationFramework (1)
MS\Internal\Data\IndexerPropertyInfo.cs (1)
14internal class IndexerPropertyInfo : PropertyInfo
System.Private.CoreLib (2)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\PropertyBuilder.cs (1)
6public abstract class PropertyBuilder : PropertyInfo
System\Reflection\Runtime\PropertyInfos\RuntimePropertyInfo.cs (1)
25internal abstract partial class RuntimePropertyInfo : PropertyInfo
System.Reflection.Context (2)
System\Reflection\Context\Delegation\DelegatingPropertyInfo.cs (1)
10internal class DelegatingPropertyInfo : PropertyInfo
System\Reflection\Context\Virtual\VirtualPropertyBase.cs (1)
11internal abstract partial class VirtualPropertyBase : PropertyInfo
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\General\TypeExtensions.net.cs (1)
40internal abstract class LeveledPropertyInfo : PropertyInfo
1427 references to PropertyInfo
aspire (2)
Commands\SettingsSchemaBuilder.cs (2)
26foreach (var prop in type.GetProperties(BindingFlags.Public | BindingFlags.Instance)) 120foreach (var prop in type.GetProperties(BindingFlags.Public | BindingFlags.Instance))
Aspire.Azure.Messaging.EventHubs.Tests (1)
AspireEventHubsExtensionsTests.cs (1)
663var consumerGroupProperty = settings.GetType().GetProperty("ConsumerGroup");
Aspire.Confluent.Kafka (5)
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\Shared\PropertyFetcher.AOT.cs (5)
101var property = type.DeclaredProperties.FirstOrDefault(p => string.Equals(p.Name, propertyName, StringComparison.OrdinalIgnoreCase)) ?? type.GetProperty(propertyName); 104static PropertyFetch? CreateFetcherForProperty(PropertyInfo? propertyInfo) 140static PropertyFetch? DynamicInstantiationHelper(Type declaringType, PropertyInfo propertyInfo) 175private static PropertyFetchInstantiated<TDeclaredObject> CreateInstantiated<TDeclaredObject>(PropertyInfo propertyInfo) 189public PropertyFetchInstantiated(PropertyInfo property)
Aspire.Dashboard (2)
Utils\MaxItemCountHelper.cs (2)
28var prop = type.GetProperty("MaxItemCount", BindingFlags.Instance | BindingFlags.Public); 44var prop = type.GetProperty("MaxItemCount", BindingFlags.Instance | BindingFlags.Public);
Aspire.Hosting.CodeGeneration.TypeScript.Tests (2)
AtsTypeScriptCodeGeneratorTests.cs (2)
998var envVarsProperty = envCallbackContextType.GetProperty("EnvironmentVariables"); 1008var typesProperty = unionAttr.GetType().GetProperty("Types");
Aspire.Hosting.RemoteHost (14)
Ats\CapabilityDispatcher.cs (4)
117&& result.Properties.TryGetValue(capability.CapabilityId, out var property)) 146private void RegisterContextTypeProperty(AtsCapabilityInfo capability, PropertyInfo property) 149var prop = property; // Capture for closure 523var resultProperty = taskType.GetProperty("Result");
AtsCapabilityScanner.cs (10)
47public Dictionary<string, PropertyInfo> Properties { get; init; } = new(); 128var allProperties = new Dictionary<string, PropertyInfo>(); 269var properties = new Dictionary<string, PropertyInfo>(); 963foreach (var prop in type.GetProperties(BindingFlags.Public | BindingFlags.Instance)) 1021public Dictionary<string, PropertyInfo> Properties { get; init; } = new(); 1032var properties = new Dictionary<string, PropertyInfo>(); 1050foreach (var property in contextType.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static)) 2539private static bool HasExportIgnoreAttribute(PropertyInfo property) 2572private static AspireExportData? GetAspireExportAttribute(PropertyInfo property) 2588private static AspireUnionData? GetAspireUnionAttribute(PropertyInfo property)
Aspire.Hosting.RemoteHost.Tests (2)
AttributeDataReaderTests.cs (2)
57var property = typeof(OfficialResource).GetProperty(nameof(OfficialResource.InternalProp))!; 66var property = typeof(ThirdPartyResource).GetProperty(nameof(ThirdPartyResource.InternalProp))!;
Aspire.Hosting.Tests (2)
ApplicationModel\Docker\DockerfileBuilderCallbackContextTests.cs (1)
80foreach (var property in properties)
Backchannel\BackchannelContractTests.cs (1)
87foreach (var prop in type.GetProperties(BindingFlags.Public | BindingFlags.Instance))
Aspire.Hosting.Yarp (1)
YarpEnvConfigGenerator.cs (1)
88foreach (var property in obj.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance))
Aspire.StackExchange.Redis (5)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Shared\PropertyFetcher.AOT.cs (5)
103var property = type.DeclaredProperties.FirstOrDefault(p => string.Equals(p.Name, propertyName, StringComparison.OrdinalIgnoreCase)) ?? type.GetProperty(propertyName); 106static PropertyFetch? CreateFetcherForProperty(PropertyInfo? propertyInfo) 142static PropertyFetch? DynamicInstantiationHelper(Type declaringType, PropertyInfo propertyInfo) 177private static PropertyFetchInstantiated<TDeclaredObject> CreateInstantiated<TDeclaredObject>(PropertyInfo propertyInfo) 191public PropertyFetchInstantiated(PropertyInfo property)
Aspire.TypeSystem (4)
AtsContext.cs (1)
87public Dictionary<string, PropertyInfo> Properties { get; } = new();
AttributeDataReader.cs (3)
37public static AspireExportData? GetAspireExportData(PropertyInfo property) 51public static bool HasAspireExportIgnoreData(PropertyInfo property) 79public static AspireUnionData? GetAspireUnionData(PropertyInfo property)
dotnet-format (1)
Analyzers\Extensions.cs (1)
152var notificationProperty = option.GetType().GetProperty("Notification");
dotnet-svcutil.xmlserializer (3)
Microsoft\Tools\ServiceModel\SvcUtil\XmlSerializerGenerator.cs (3)
134PropertyInfo contractTypeProperty = contractDescriptionType.GetProperty("ContractType"); 155PropertyInfo getBehaviorsProperty = operationType.GetProperty("Behaviors"); 204PropertyInfo operationsProperty = contractDescriptionType.GetProperty("Operations");
dotnet-svcutil-lib (95)
CodeDomFixup\CodeDomVisitors\PropertyFieldNameScope.cs (1)
16foreach (PropertyInfo property in type.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance | BindingFlags.FlattenHierarchy))
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeGenerator.cs (8)
734private static MethodInfo GetPropertyMethodFromBaseType(PropertyInfo propertyInfo, bool isGetter) 739PropertyInfo currentProperty; 791PropertyInfo property = (PropertyInfo)memberInfo; 828PropertyInfo property = (PropertyInfo)memberInfo; 867PropertyInfo property = (PropertyInfo)memberInfo;
FrameworkFork\Microsoft.Xml\Xml\Serialization\Models.cs (9)
154if (!(members[i] is PropertyInfo)) 162if (members[i] is PropertyInfo) 175else if (memberInfo is PropertyInfo) 176model = GetPropertyModel((PropertyInfo)memberInfo); 214private FieldModel GetPropertyModel(PropertyInfo propertyInfo) 230internal static bool CheckPropertyRead(PropertyInfo propertyInfo) 297PropertyInfo specifiedProperty = memberInfo.DeclaringType.GetProperty(memberInfo.Name + "Specified"); 311if (memberInfo is PropertyInfo) 313_readOnly = !((PropertyInfo)memberInfo).CanWrite;
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapReflectionImporter.cs (1)
418if (memberInfo is FieldInfo || memberInfo is PropertyInfo)
FrameworkFork\Microsoft.Xml\Xml\Serialization\SourceInfo.cs (1)
175((FieldInfo)MemberInfo).FieldType : ((PropertyInfo)MemberInfo).PropertyType;
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (10)
1121PropertyInfo propertyInfo = memberInfo as PropertyInfo; 1134private static bool CanWriteProperty(PropertyInfo propertyInfo, TypeDesc typeDesc) 1221foreach (PropertyInfo info in currentInfo.DeclaredProperties) 1318PropertyInfo p = enumerator.ReturnType.GetProperty("Current"); 1340internal static PropertyInfo GetDefaultIndexer(Type type, string memberInfo) 1355PropertyInfo indexer = null; 1362if (defaultMembers[i] is PropertyInfo) 1364PropertyInfo defaultProp = (PropertyInfo)defaultMembers[i];
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (2)
850if (memberInfo is FieldInfo || memberInfo is PropertyInfo) 1464PropertyInfo info = structModel.Type.GetProperty(choice.MemberName, BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationILGen.cs (1)
577Type memType = memInfo is FieldInfo ? ((FieldInfo)memInfo).FieldType : ((PropertyInfo)memInfo).PropertyType;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (3)
3908typeof(FieldInfo).FullName, typeof(PropertyInfo).FullName, 3999if (memberInfo is PropertyInfo) 4058PropertyInfo defaultIndexer = TypeScope.GetDefaultIndexer(type, null);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriterILGen.cs (1)
2612PropertyInfo propInfo = initValue.ILG.GetVariableType(fixup).GetProperty(vars[1]);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ClassDataContract.cs (5)
958if (member is PropertyInfo) 960PropertyInfo property = (PropertyInfo)member; 1011PropertyInfo property = member as PropertyInfo;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeGenerator.cs (6)
706else if (memberInfo is PropertyInfo) 708PropertyInfo property = memberInfo as PropertyInfo; 749else if (memberInfo is PropertyInfo) 751PropertyInfo property = memberInfo as PropertyInfo;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataMember.cs (5)
263return ((PropertyInfo)MemberInfo).PropertyType; 321PropertyInfo property = (PropertyInfo)memberInfo; 346PropertyInfo property = (PropertyInfo)memberInfo;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ExceptionDataContract.cs (8)
279PropertyInfo publicProperty = member as PropertyInfo; 365PropertyInfo[] props = type.GetProperties(); 366foreach (PropertyInfo prop in props) 435private bool PropertyIsSystemExceptionProperty(PropertyInfo prop) 437PropertyInfo[] props = Globals.TypeOfException.GetProperties(); 438foreach (PropertyInfo propInfo in props) 471PropertyInfo messageProperty = exceptionType.GetProperty("Message");
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlFormatGeneratorStatics.cs (16)
199private static PropertyInfo s_nodeTypeProperty; 200internal static PropertyInfo NodeTypeProperty 871private static PropertyInfo s_namespaceProperty; 872internal static PropertyInfo NamespaceProperty 919private static PropertyInfo s_childElementNamespacesProperty; 920internal static PropertyInfo ChildElementNamespacesProperty 935private static PropertyInfo s_collectionItemNameProperty; 936internal static PropertyInfo CollectionItemNameProperty 951private static PropertyInfo s_childElementNamespaceProperty; 952internal static PropertyInfo ChildElementNamespaceProperty 1044private static PropertyInfo s_serializeReadOnlyTypesProperty; 1045internal static PropertyInfo SerializeReadOnlyTypesProperty 1060private static PropertyInfo s_classSerializationExceptionMessageProperty; 1061internal static PropertyInfo ClassSerializationExceptionMessageProperty 1076private static PropertyInfo s_collectionSerializationExceptionMessageProperty; 1077internal static PropertyInfo CollectionSerializationExceptionMessageProperty
FrameworkFork\System.ServiceModel\Extensions\ReflectionExtensions.cs (1)
30public static PropertyInfo GetProperty(this Type type, string name, BindingFlags bindingAttr)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannelProxy.cs (1)
298public PropertyInfo TaskProperty { get; private set; }
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\OperationGenerator.cs (2)
1008PropertyInfo property = member as PropertyInfo;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\TypeLoader.cs (5)
1312if (!(memberInfo is FieldInfo || memberInfo is PropertyInfo)) 1316PropertyInfo property = memberInfo as PropertyInfo; 1359if (memberInfo is PropertyInfo) 1361memberType = ((PropertyInfo)memberInfo).PropertyType;
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\OperationFormatter.cs (4)
599PropertyInfo propertyInfo = memberInfo as PropertyInfo; 613PropertyInfo propertyInfo = memberInfo as PropertyInfo;
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (1)
36_taskTResultGetMethod = ((PropertyInfo)taskMethod.ReturnType.GetMember(ResultMethodName)[0]).GetGetMethod();
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\XmlSerializerOperationFormatter.cs (4)
291PropertyInfo property = member as PropertyInfo; 348PropertyInfo property = member as PropertyInfo;
GenerateDocumentationAndConfigFiles (1)
src\roslyn\src\RoslynAnalyzers\Utilities\Workspaces\SyntaxNodeExtensions.cs (1)
21var property = typeof(Simplifier).GetTypeInfo().GetDeclaredProperty("AddImportsAnnotation");
Infrastructure.Common (1)
xunit\ConditionAttribute.cs (1)
116PropertyInfo pi = ti.GetDeclaredProperty(name);
Infrastructure.Tests (1)
PowerShellScripts\SplitTestMatrixByDepsTests.cs (1)
292foreach (var prop in entry.GetType().GetProperties())
Microsoft.AspNetCore.Components (26)
CascadingParameterState.cs (1)
120foreach (var prop in candidateProps)
DefaultComponentPropertyActivator.cs (1)
52foreach (var property in MemberAssignment.GetPropertiesIncludingInherited(type, InjectablePropertyBindingFlags))
PersistentState\PersistentServicesRegistry.cs (2)
170foreach (var propertyInfo in GetCandidateBindableProperties(targetType)) 235internal static IEnumerable<PropertyInfo> GetCandidateBindableProperties(
PersistentState\PersistentValueProviderComponentSubscription.cs (2)
231var propertyInfo = GetPropertyInfo(type, propertyName); 240static PropertyInfo? GetPropertyInfo([DynamicallyAccessedMembers(LinkerFlags.Component)] Type type, string propertyName)
Reflection\ComponentProperties.cs (5)
187internal static IEnumerable<PropertyInfo> GetCandidateBindableProperties([DynamicallyAccessedMembers(Component)] Type targetType) 196var propertyInfo = targetType.GetProperty(parameterName, BindablePropertyFlags); 250foreach (var property in targetType.GetProperties(BindablePropertyFlags)) 268private static void ThrowForInvalidCaptureUnmatchedValuesParameterType(Type targetType, PropertyInfo propertyInfo) 287foreach (var propertyInfo in GetCandidateBindableProperties(targetType))
Reflection\MemberAssignment.cs (12)
13public static IEnumerable<PropertyInfo> GetPropertiesIncludingInherited( 24foreach (var property in properties) 32List<PropertyInfo> many; 33if (others is PropertyInfo single) 35many = new List<PropertyInfo> { single }; 40many = (List<PropertyInfo>)others; 51if (item.Value is PropertyInfo property) 57var list = (List<PropertyInfo>)item.Value; 66private static bool IsInheritedProperty(PropertyInfo property, object others) 68if (others is PropertyInfo single) 73var many = (List<PropertyInfo>)others; 74foreach (var other in CollectionsMarshal.AsSpan(many))
src\aspnetcore\src\Components\Shared\src\Reflection\PropertyGetter.cs (2)
17public PropertyInfo PropertyInfo { get; } 23public PropertyGetter(Type targetType, PropertyInfo property)
src\aspnetcore\src\Components\Shared\src\Reflection\PropertySetter.cs (1)
21public PropertySetter(Type targetType, PropertyInfo property)
Microsoft.AspNetCore.Components.Endpoints (17)
FormMapping\Metadata\FormDataMetadataFactory.cs (1)
189var property = propertyHelper.Property;
FormMapping\Metadata\FormDataPropertyMetadata.cs (2)
7internal class FormDataPropertyMetadata(PropertyInfo property, FormDataTypeMetadata propertyTypeInfo) : IFormDataValue 9public PropertyInfo Property => property;
src\aspnetcore\src\Components\Shared\src\Reflection\PropertyGetter.cs (2)
17public PropertyInfo PropertyInfo { get; } 23public PropertyGetter(Type targetType, PropertyInfo property)
src\aspnetcore\src\Components\Shared\src\Reflection\PropertySetter.cs (1)
21public PropertySetter(Type targetType, PropertyInfo property)
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (10)
52public PropertyHelper(PropertyInfo property) 59/// Gets the backing <see cref="PropertyInfo"/>. 61public PropertyInfo Property { get; } 159public static Func<object, object?> MakeFastPropertyGetter(PropertyInfo propertyInfo) 179public static Func<object, object?> MakeNullSafeFastPropertyGetter(PropertyInfo propertyInfo) 191PropertyInfo propertyInfo, 272public static Action<object, object?> MakeFastPropertySetter(PropertyInfo propertyInfo) 461var declaredProperty = currentType.GetProperty(propertyHelper.Name, DeclaredOnlyLookup); 525foreach (var property in type.GetProperties(Everything)) 537private static bool IsInterestingProperty(PropertyInfo property)
TempData\TempDataCascadingValueSupplier.cs (1)
47var propertyInfo = type.GetProperty(propertyName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
Microsoft.AspNetCore.Components.Forms (6)
ClientValidation\DefaultClientValidationService.cs (1)
283var property = modelType.GetProperty(fieldName, BindingFlags.Public | BindingFlags.Instance);
EditContextDataAnnotationsExtensions.cs (4)
46private static readonly ConcurrentDictionary<(Type ModelType, string FieldName), PropertyInfo?> _propertyInfoCache = new(); 93else if (TryGetValidatableProperty(fieldIdentifier, out var propertyInfo)) 183private void ValidateField(FieldIdentifier fieldIdentifier, PropertyInfo propertyInfo) 264private static bool TryGetValidatableProperty(in FieldIdentifier fieldIdentifier, [NotNullWhen(true)] out PropertyInfo? propertyInfo)
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (1)
191foreach (var property in runtimeProperties)
Microsoft.AspNetCore.Components.Web (2)
JSComponents\JSComponentInterop.cs (1)
204foreach (var propertyInfo in candidateProperties)
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (1)
191foreach (var property in runtimeProperties)
Microsoft.AspNetCore.Http.Abstractions (10)
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (10)
52public PropertyHelper(PropertyInfo property) 59/// Gets the backing <see cref="PropertyInfo"/>. 61public PropertyInfo Property { get; } 159public static Func<object, object?> MakeFastPropertyGetter(PropertyInfo propertyInfo) 179public static Func<object, object?> MakeNullSafeFastPropertyGetter(PropertyInfo propertyInfo) 191PropertyInfo propertyInfo, 272public static Action<object, object?> MakeFastPropertySetter(PropertyInfo propertyInfo) 461var declaredProperty = currentType.GetProperty(propertyHelper.Name, DeclaredOnlyLookup); 525foreach (var property in type.GetProperties(Everything)) 537private static bool IsInterestingProperty(PropertyInfo property)
Microsoft.AspNetCore.Http.Extensions (25)
RequestDelegateFactory.cs (9)
68private static readonly PropertyInfo QueryIndexerProperty = typeof(IQueryCollection).GetProperty("Item")!; 69private static readonly PropertyInfo RouteValuesIndexerProperty = typeof(RouteValueDictionary).GetProperty("Item")!; 70private static readonly PropertyInfo HeaderIndexerProperty = typeof(IHeaderDictionary).GetProperty("Item")!; 71private static readonly PropertyInfo FormFilesIndexerProperty = typeof(IFormFileCollection).GetProperty("Item")!; 72private static readonly PropertyInfo FormIndexerProperty = typeof(IFormCollection).GetProperty("Item")!; 105private static readonly MemberExpression CompletedTaskExpr = Expression.Property(null, (PropertyInfo)GetMemberInfo<Func<Task>>(() => Task.CompletedTask)); 114private static readonly PropertyInfo ListIndexer = typeof(IList<object>).GetProperty("Item")!; 1564private static Expression GetValueFromProperty(MemberExpression sourceExpression, PropertyInfo itemProperty, string key, Type? returnType = null) 1970private static Expression BindParameterFromProperty(ParameterInfo parameter, MemberExpression property, PropertyInfo itemProperty, string key, RequestDelegateFactoryContext factoryContext, string source)
src\aspnetcore\src\Components\Endpoints\src\FormMapping\Metadata\FormDataMetadataFactory.cs (1)
189var property = propertyHelper.Property;
src\aspnetcore\src\Components\Endpoints\src\FormMapping\Metadata\FormDataPropertyMetadata.cs (2)
7internal class FormDataPropertyMetadata(PropertyInfo property, FormDataTypeMetadata propertyTypeInfo) : IFormDataValue 9public PropertyInfo Property => property;
src\aspnetcore\src\Shared\ObjectMethodExecutor\AwaitableInfo.cs (3)
21public PropertyInfo AwaiterIsCompletedProperty { get; } 30PropertyInfo awaiterIsCompletedProperty, 65var isCompletedProperty = awaiterType.GetProperty("IsCompleted", Everything, binder: null, returnType: typeof(bool), types: Type.EmptyTypes, modifiers: null);
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (2)
32private static PropertyInfo _fsharpOptionOfTaskCreationOptionsNoneProperty; 33private static PropertyInfo _fsharpOptionOfCancellationTokenNoneProperty;
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (4)
325var lookupTable = new Dictionary<ParameterLookupKey, PropertyInfo>(properties.Length); 344if (!lookupTable.TryGetValue(key, out var property)) 734public ConstructorParameter(ParameterInfo parameter, PropertyInfo propertyInfo) 741public PropertyInfo PropertyInfo { get; }
src\aspnetcore\src\Shared\PropertyAsParameterInfo.cs (4)
17private readonly PropertyInfo _underlyingProperty; 23public PropertyAsParameterInfo(PropertyInfo propertyInfo, NullabilityInfoContext? nullabilityContext = null) 40public PropertyAsParameterInfo(PropertyInfo property, ParameterInfo parameterInfo, NullabilityInfoContext? nullabilityContext = null) 122foreach (var property in properties)
Microsoft.AspNetCore.Mvc.Abstractions (9)
ModelBinding\Metadata\ModelMetadataIdentity.cs (3)
67PropertyInfo propertyInfo, 171public PropertyInfo? PropertyInfo => FieldInfo as PropertyInfo;
ModelBinding\ModelMetadataProvider.cs (2)
48/// <param name="propertyInfo">The <see cref="PropertyInfo"/>.</param> 51public virtual ModelMetadata GetMetadataForProperty(PropertyInfo propertyInfo, Type modelType)
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (4)
325var lookupTable = new Dictionary<ParameterLookupKey, PropertyInfo>(properties.Length); 344if (!lookupTable.TryGetValue(key, out var property)) 734public ConstructorParameter(ParameterInfo parameter, PropertyInfo propertyInfo) 741public PropertyInfo PropertyInfo { get; }
Microsoft.AspNetCore.Mvc.ApiExplorer (5)
EndpointMetadataApiDescriptionProvider.cs (1)
526if (parameterInfo.Member is PropertyInfo propertyInfo && propertyInfo.DeclaringType is not null)
src\aspnetcore\src\Shared\PropertyAsParameterInfo.cs (4)
17private readonly PropertyInfo _underlyingProperty; 23public PropertyAsParameterInfo(PropertyInfo propertyInfo, NullabilityInfoContext? nullabilityContext = null) 40public PropertyAsParameterInfo(PropertyInfo property, ParameterInfo parameterInfo, NullabilityInfoContext? nullabilityContext = null) 122foreach (var property in properties)
Microsoft.AspNetCore.Mvc.Core (42)
ApplicationModels\DefaultApplicationModelProvider.cs (5)
65var propertyInfo = propertyHelper.Property; 207/// Creates a <see cref="PropertyModel"/> for the given <see cref="PropertyInfo"/>. 209/// <param name="propertyInfo">The <see cref="PropertyInfo"/>.</param> 210/// <returns>A <see cref="PropertyModel"/> for the given <see cref="PropertyInfo"/>.</returns> 211internal PropertyModel CreatePropertyModel(PropertyInfo propertyInfo)
ApplicationModels\PropertyModel.cs (2)
22PropertyInfo propertyInfo, 59public PropertyInfo PropertyInfo { get; }
Controllers\ControllerBoundPropertyDescriptor.cs (2)
16/// Gets or sets the <see cref="System.Reflection.PropertyInfo"/> for this property. 18public PropertyInfo PropertyInfo { get; set; } = default!;
Infrastructure\IPropertyInfoParameterDescriptor.cs (2)
17/// Gets the <see cref="System.Reflection.PropertyInfo"/>. 19PropertyInfo PropertyInfo { get; }
ModelBinding\Metadata\DefaultModelMetadataProvider.cs (2)
124public override ModelMetadata GetMetadataForProperty(PropertyInfo propertyInfo, Type modelType) 176private ModelMetadataCacheEntry GetCacheEntry(PropertyInfo property, Type modelType)
ModelBinding\Metadata\ModelAttributes.cs (6)
97/// <see cref="TypeAttributes"/> contains attributes retrieved from <see cref="PropertyInfo.PropertyType"/>. 108/// <param name="property">A <see cref="PropertyInfo"/> for which attributes need to be resolved. 113public static ModelAttributes GetAttributesForProperty(Type type, PropertyInfo property) 123/// <param name="property">A <see cref="PropertyInfo"/> for which attributes need to be resolved. 129public static ModelAttributes GetAttributesForProperty(Type containerType, PropertyInfo property, Type modelType) 140var metadataProperty = metadataType.GetRuntimeProperty(property.Name);
ModelBinding\ModelBindingHelper.cs (1)
302if (memberExpression.Member is PropertyInfo memberInfo)
ModelBinding\ParameterBinder.cs (1)
259var propertyInfo = propertyInfoParameter.PropertyInfo;
src\aspnetcore\src\Shared\ObjectMethodExecutor\AwaitableInfo.cs (3)
21public PropertyInfo AwaiterIsCompletedProperty { get; } 30PropertyInfo awaiterIsCompletedProperty, 65var isCompletedProperty = awaiterType.GetProperty("IsCompleted", Everything, binder: null, returnType: typeof(bool), types: Type.EmptyTypes, modifiers: null);
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (2)
32private static PropertyInfo _fsharpOptionOfTaskCreationOptionsNoneProperty; 33private static PropertyInfo _fsharpOptionOfCancellationTokenNoneProperty;
src\aspnetcore\src\Shared\PropertyActivator\PropertyActivator.cs (6)
18PropertyInfo propertyInfo, 26public PropertyInfo PropertyInfo { get; private set; } 40Func<PropertyInfo, PropertyActivator<TContext>> createActivateInfo) 52Func<PropertyInfo, PropertyActivator<TContext>> createActivateInfo, 65Func<PropertyInfo, TAttribute, PropertyActivator<TContext>> createActivateInfo, 80private static IEnumerable<PropertyInfo> GetActivatableProperties(
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (10)
52public PropertyHelper(PropertyInfo property) 59/// Gets the backing <see cref="PropertyInfo"/>. 61public PropertyInfo Property { get; } 159public static Func<object, object?> MakeFastPropertyGetter(PropertyInfo propertyInfo) 179public static Func<object, object?> MakeNullSafeFastPropertyGetter(PropertyInfo propertyInfo) 191PropertyInfo propertyInfo, 272public static Action<object, object?> MakeFastPropertySetter(PropertyInfo propertyInfo) 461var declaredProperty = currentType.GetProperty(propertyHelper.Name, DeclaredOnlyLookup); 525foreach (var property in type.GetProperties(Everything)) 537private static bool IsInterestingProperty(PropertyInfo property)
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
DataAnnotationsMetadataProvider.cs (1)
339var property = context.Key.PropertyInfo;
Microsoft.AspNetCore.Mvc.Razor (6)
Compilation\DefaultRazorPageFactoryProvider.cs (1)
45var pathProperty = viewType.GetProperty(nameof(IRazorPage.Path))!;
DefaultTagHelperFactory.cs (2)
22private static readonly Func<PropertyInfo, PropertyActivator<ViewContext>> _createActivateInfo = CreateActivateInfo; 84private static PropertyActivator<ViewContext> CreateActivateInfo(PropertyInfo property)
RazorPagePropertyActivator.cs (1)
76PropertyInfo property,
TagHelpers\TagHelperComponentPropertyActivator.cs (2)
20private static readonly Func<PropertyInfo, PropertyActivator<ViewContext>> _createActivateInfo = CreateActivateInfo; 43private static PropertyActivator<ViewContext> CreateActivateInfo(PropertyInfo property)
Microsoft.AspNetCore.Mvc.RazorPages (12)
ApplicationModels\DefaultPageApplicationModelPartsProvider.cs (2)
102/// <param name="property">The <see cref="PropertyInfo"/>.</param> 104public PagePropertyModel CreatePropertyModel(PropertyInfo property)
ApplicationModels\DefaultPageApplicationModelProvider.cs (1)
76var modelProperty = pageTypeInfo.GetProperty(ModelPropertyName, BindingFlags.Public | BindingFlags.Instance);
ApplicationModels\IPageApplicationModelPartsProvider.cs (2)
30/// <param name="property">The <see cref="PropertyInfo"/>.</param> 32PagePropertyModel CreatePropertyModel(PropertyInfo property);
ApplicationModels\PagePropertyModel.cs (2)
22PropertyInfo propertyInfo, 53public PropertyInfo PropertyInfo { get; }
Infrastructure\DefaultPageModelFactoryProvider.cs (2)
11private static readonly Func<PropertyInfo, PropertyActivator<PageContext>> _createActivateInfo = 72private static PropertyActivator<PageContext> CreateActivateInfo(PropertyInfo property) =>
Infrastructure\PageBoundPropertyDescriptor.cs (3)
16/// Gets or sets the <see cref="System.Reflection.PropertyInfo"/> for this property. 18public PropertyInfo Property { get; set; } = default!; 20PropertyInfo IPropertyInfoParameterDescriptor.PropertyInfo => Property;
Microsoft.AspNetCore.Mvc.ViewFeatures (15)
ExpressionHelper.cs (1)
253foreach (var property in runtimeProperties)
ExpressionMetadataProvider.cs (1)
45propertyName = memberExpression.Member is PropertyInfo ? memberExpression.Member.Name : null;
Filters\LifecycleProperty.cs (2)
16public LifecycleProperty(PropertyInfo propertyInfo, string key) 26public PropertyInfo PropertyInfo => _propertyHelper.Property;
Filters\SaveTempDataPropertyFilterBase.cs (4)
33public IDictionary<PropertyInfo, object> OriginalValues { get; } = new Dictionary<PropertyInfo, object>(); 93var property = propertyHelper.Property; 120private static bool ValidateProperty(TempDataSerializer tempDataSerializer, List<string> errorMessages, PropertyInfo property)
Filters\ViewDataAttributePropertyProvider.cs (1)
20var property = propertyHelper.Property;
ViewComponents\DefaultViewComponentFactory.cs (1)
64private static PropertyActivator<ViewComponentContext> CreateActivateInfo(PropertyInfo property)
ViewDataEvaluator.cs (1)
200var propertyInfo = container.GetType().GetRuntimeProperty(propertyName);
ViewDataInfo.cs (4)
33/// It uses <see cref="System.Reflection.PropertyInfo.GetValue(object)"/> on <paramref name="propertyInfo"/> 38public ViewDataInfo(object container, PropertyInfo propertyInfo) 51public ViewDataInfo(object container, PropertyInfo propertyInfo, Func<object> valueAccessor) 66public PropertyInfo PropertyInfo { get; }
Microsoft.AspNetCore.Routing (10)
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (10)
52public PropertyHelper(PropertyInfo property) 59/// Gets the backing <see cref="PropertyInfo"/>. 61public PropertyInfo Property { get; } 159public static Func<object, object?> MakeFastPropertyGetter(PropertyInfo propertyInfo) 179public static Func<object, object?> MakeNullSafeFastPropertyGetter(PropertyInfo propertyInfo) 191PropertyInfo propertyInfo, 272public static Action<object, object?> MakeFastPropertySetter(PropertyInfo propertyInfo) 461var declaredProperty = currentType.GetProperty(propertyHelper.Name, DeclaredOnlyLookup); 525foreach (var property in type.GetProperties(Everything)) 537private static bool IsInterestingProperty(PropertyInfo property)
Microsoft.AspNetCore.Routing.Abstractions (10)
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (10)
52public PropertyHelper(PropertyInfo property) 59/// Gets the backing <see cref="PropertyInfo"/>. 61public PropertyInfo Property { get; } 159public static Func<object, object?> MakeFastPropertyGetter(PropertyInfo propertyInfo) 179public static Func<object, object?> MakeNullSafeFastPropertyGetter(PropertyInfo propertyInfo) 191PropertyInfo propertyInfo, 272public static Action<object, object?> MakeFastPropertySetter(PropertyInfo propertyInfo) 461var declaredProperty = currentType.GetProperty(propertyHelper.Name, DeclaredOnlyLookup); 525foreach (var property in type.GetProperties(Everything)) 537private static bool IsInterestingProperty(PropertyInfo property)
Microsoft.AspNetCore.SignalR.Core (6)
Internal\TypedClientBuilder.cs (1)
19private static readonly PropertyInfo CancellationTokenNoneProperty = typeof(CancellationToken).GetProperty("None", BindingFlags.Public | BindingFlags.Static)!;
src\aspnetcore\src\Shared\ObjectMethodExecutor\AwaitableInfo.cs (3)
21public PropertyInfo AwaiterIsCompletedProperty { get; } 30PropertyInfo awaiterIsCompletedProperty, 65var isCompletedProperty = awaiterType.GetProperty("IsCompleted", Everything, binder: null, returnType: typeof(bool), types: Type.EmptyTypes, modifiers: null);
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (2)
32private static PropertyInfo _fsharpOptionOfTaskCreationOptionsNoneProperty; 33private static PropertyInfo _fsharpOptionOfCancellationTokenNoneProperty;
Microsoft.Build (14)
BackEnd\Components\Logging\LoggingService.cs (4)
98private static readonly Lazy<PropertyInfo> s_projectStartedEventArgsGlobalProperties = new Lazy<PropertyInfo>(() => typeof(ProjectStartedEventArgs).GetProperty("GlobalProperties", BindingFlags.Public | BindingFlags.Instance), LazyThreadSafetyMode.PublicationOnly); 107private static readonly Lazy<PropertyInfo> s_projectStartedEventArgsToolsVersion = new Lazy<PropertyInfo>(() => typeof(ProjectStartedEventArgs).GetProperty("ToolsVersion", BindingFlags.Public | BindingFlags.Instance), LazyThreadSafetyMode.PublicationOnly);
BackEnd\Components\RequestBuilder\IntrinsicTasks\IntrinsicTaskFactory.cs (1)
63PropertyInfo[] infos = TaskType.GetProperties(BindingFlags.Instance | BindingFlags.Public);
Instance\TaskFactories\TaskHostTask.cs (1)
276PropertyInfo parameter = _taskType.Type.GetProperty(property.Name, BindingFlags.Instance | BindingFlags.Public);
src\msbuild\src\Shared\Debugging\PrintLineDebugger.cs (3)
25private static readonly Lazy<PropertyInfo> CommonWriterProperty = new Lazy<PropertyInfo>( 30var propertyInfo = commonWriterType.GetProperty("Writer", BindingFlags.Public | BindingFlags.Static);
Utilities\NuGetFrameworkWrapper.cs (5)
37private PropertyInfo FrameworkProperty; 38private PropertyInfo VersionProperty; 39private PropertyInfo PlatformProperty; 40private PropertyInfo PlatformVersionProperty; 41private PropertyInfo AllFrameworkVersionsProperty;
Microsoft.Build.Framework (7)
AssemblyUtilities.cs (1)
27private static PropertyInfo s_assemblylocationProperty;
Loader\LoadedType.cs (1)
92PropertyInfo[] props = type.GetProperties(BindingFlags.Instance | BindingFlags.Public);
ReflectableTaskPropertyInfo.cs (4)
21private PropertyInfo _propertyInfo; 44internal ReflectableTaskPropertyInfo(PropertyInfo propertyInfo) 59internal ReflectableTaskPropertyInfo(PropertyInfo propertyInfo, bool output, bool required, bool isAssignableToITaskItemType) 73internal PropertyInfo Reflection
Telemetry\CrashTelemetry.cs (1)
435var buildEventArgsProp = exception.GetType().GetProperty("BuildEventArgs");
Microsoft.Build.Tasks.Core (7)
AssemblyDependency\Node\RarTaskParameters.cs (4)
119private readonly struct ReflectedPropertyInfo(PropertyInfo target, object? defaultValue) 121internal PropertyInfo Target { get; } = target; 133PropertyInfo[] properties = typeof(ResolveAssemblyReference) 139foreach (PropertyInfo property in properties)
src\msbuild\src\Shared\Debugging\PrintLineDebugger.cs (3)
25private static readonly Lazy<PropertyInfo> CommonWriterProperty = new Lazy<PropertyInfo>( 30var propertyInfo = commonWriterType.GetProperty("Writer", BindingFlags.Public | BindingFlags.Static);
Microsoft.Build.Utilities.Core (3)
src\msbuild\src\Shared\Debugging\PrintLineDebugger.cs (3)
25private static readonly Lazy<PropertyInfo> CommonWriterProperty = new Lazy<PropertyInfo>( 30var propertyInfo = commonWriterType.GetProperty("Writer", BindingFlags.Public | BindingFlags.Static);
Microsoft.CodeAnalysis.Analyzers (1)
src\roslyn\src\RoslynAnalyzers\Utilities\Workspaces\SyntaxNodeExtensions.cs (1)
21var property = typeof(Simplifier).GetTypeInfo().GetDeclaredProperty("AddImportsAnnotation");
Microsoft.CodeAnalysis.Scripting (6)
Hosting\ObjectFormatter\CommonObjectFormatter.Visitor.cs (2)
382PropertyInfo property = (PropertyInfo)member;
Hosting\ObjectFormatter\ObjectFormatterHelpers.cs (4)
149var property = currentType.GetDeclaredProperty(memberName); 213var getter = ((PropertyInfo)member).GetMethod; 259var property = (PropertyInfo)member;
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildProjectLoader.cs (1)
329var fileNameProperty = logger.GetType().GetProperty("FileName");
Microsoft.CSharp (13)
Microsoft\CSharp\RuntimeBinder\ExpressionTreeCallRewriter.cs (1)
405PropertyInfo p = propinfo.PropertyInfo;
Microsoft\CSharp\RuntimeBinder\RuntimeBinderExtensions.cs (4)
70return mi1 is PropertyInfo prop1 && mi2 is PropertyInfo prop2 280PropertyInfo property = memberInfo.GetProperty("MetadataToken", typeof(int), Type.EmptyTypes); 346foreach (PropertyInfo p in type.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance))
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\PropertySymbol.cs (1)
22public PropertyInfo AssociatedPropertyInfo { get; set; }
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\PropertyInfo.cs (3)
23public PropertyInfo PropertyInfo 37PropertyInfo propertyInfo = propSym.AssociatedPropertyInfo; 47foreach (PropertyInfo p in type.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static))
Microsoft\CSharp\RuntimeBinder\Semantics\Types\PredefinedTypes.cs (1)
174new PredefinedTypeInfo(PredefinedType.PT_PROPERTYINFO, typeof(System.Reflection.PropertyInfo), "System.Reflection.PropertyInfo"),
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (3)
207else if (member is PropertyInfo prop) 1162foreach (PropertyInfo pi in t.GetProperties(EverythingBindingFlags)) 1175private static void AddPropertyToSymbolTable(PropertyInfo property, AggregateSymbol aggregate)
Microsoft.DotNet.Build.Tasks.Packaging (5)
Extensions.cs (4)
153var property = memberSelectorExpression.Member as PropertyInfo; 175var property = memberSelectorExpression.Member as PropertyInfo;
NuGetPack.cs (1)
346var propertyInfo = type.GetProperty(deterministicTimestampPropertyName, BindingFlags.Public | BindingFlags.Instance);
Microsoft.Extensions.AI.Abstractions.Tests (2)
Functions\DelegatingAIFunctionTests.cs (1)
54case PropertyInfo propertyInfo when propertyInfo.GetMethod?.IsVirtual is true:
Utilities\AIJsonUtilitiesTests.cs (1)
89foreach (PropertyInfo property in typeof(AIJsonSchemaCreateOptions).GetProperties(BindingFlags.Instance | BindingFlags.Public))
Microsoft.Extensions.AI.OpenAI (1)
OpenAIResponsesChatClient.cs (1)
55private static readonly PropertyInfo? _inputImageUrlProperty =
Microsoft.Extensions.Caching.Hybrid (1)
Internal\DefaultJsonSerializerFactory.cs (1)
101foreach (var prop in props)
Microsoft.Extensions.Compliance.Redaction (2)
src\Shared\Data.Validation\LengthAttribute.cs (2)
133var property = GetCountProperty(value); 150private static PropertyInfo? GetCountProperty(object value) => value.GetType().GetRuntimeProperty("Count");
Microsoft.Extensions.Configuration.Binder (16)
ConfigurationBinder.cs (16)
222List<PropertyInfo> modelProperties = GetAllProperties(instance.GetType()); 246foreach (PropertyInfo property in modelProperties) 276private static void ResetPropertyValue(PropertyInfo property, object instance, BinderOptions options) 292private static void BindProperty(PropertyInfo property, object instance, IConfiguration config, BinderOptions options) 592List<PropertyInfo> properties = GetAllProperties(type); 625List<PropertyInfo> properties, out string missing) 628foreach (PropertyInfo prop in properties) 709PropertyInfo keyMethod = kvpType.GetProperty("Key", DeclaredOnlyLookup)!; 710PropertyInfo valueMethod = kvpType.GetProperty("Value", DeclaredOnlyLookup)!; 771PropertyInfo indexerProperty = dictionaryType.GetProperty("Item", DeclaredOnlyLookup)!; 1106private static List<PropertyInfo> GetAllProperties( 1114var allProperties = new List<PropertyInfo>(); 1119PropertyInfo[] properties = baseType.GetProperties(DeclaredOnlyLookup); 1121foreach (PropertyInfo property in properties) 1175private static bool IsIgnoredProperty(PropertyInfo property) => property.IsDefined(typeof(ConfigurationIgnoreAttribute)); 1177private static string GetPropertyName(PropertyInfo property)
Microsoft.Extensions.Diagnostics.Probes (2)
src\Shared\Data.Validation\LengthAttribute.cs (2)
133var property = GetCountProperty(value); 150private static PropertyInfo? GetCountProperty(object value) => value.GetType().GetRuntimeProperty("Count");
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
src\Shared\Data.Validation\LengthAttribute.cs (2)
133var property = GetCountProperty(value); 150private static PropertyInfo? GetCountProperty(object value) => value.GetType().GetRuntimeProperty("Count");
Microsoft.Extensions.Http.Resilience (2)
src\Shared\Data.Validation\LengthAttribute.cs (2)
133var property = GetCountProperty(value); 150private static PropertyInfo? GetCountProperty(object value) => value.GetType().GetRuntimeProperty("Count");
Microsoft.Extensions.Options.DataAnnotations (1)
DataAnnotationValidateOptions.cs (1)
96foreach (PropertyInfo propertyInfo in options.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public))
Microsoft.Extensions.Telemetry (2)
src\Shared\Data.Validation\LengthAttribute.cs (2)
133var property = GetCountProperty(value); 150private static PropertyInfo? GetCountProperty(object value) => value.GetType().GetRuntimeProperty("Count");
Microsoft.Extensions.Validation (1)
ValidatablePropertyInfo.cs (1)
70var property = DeclaringType.GetProperty(Name) ?? throw new InvalidOperationException($"Property '{Name}' not found on type '{DeclaringType.Name}'.");
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
DiagDescriptorsTests.cs (1)
17foreach (var property in type.GetProperties(BindingFlags.Public | BindingFlags.Static | BindingFlags.GetProperty))
Microsoft.Gen.Logging.Unit.Tests (1)
DiagDescriptorsTests.cs (1)
18foreach (var property in type.GetProperties(BindingFlags.Public | BindingFlags.Static | BindingFlags.GetProperty))
Microsoft.Gen.Metrics.Unit.Tests (1)
DiagDescriptorsTests.cs (1)
17foreach (var property in type.GetProperties(BindingFlags.Public | BindingFlags.Static | BindingFlags.GetProperty))
Microsoft.Maui (2)
Converters\KeyboardTypeConverter.cs (1)
35 PropertyInfo? property = kbType.GetProperties()?.FirstOrDefault(pi => pi != null && pi.Name == keyboard && pi.CanRead && (pi.GetMethod?.IsStatic ?? false));
Handlers\HybridWebView\HybridWebViewHandler.cs (1)
280 var resultProperty = dotnetMethod.ReturnType.GetProperty(nameof(Task<object>.Result));
Microsoft.Maui.Controls (10)
BindingExpression.cs (7)
268 PropertyInfo GetIndexer(TypeInfo sourceType, string indexerName, string content) 272 foreach (var pi in sourceType.DeclaredProperties) 285 foreach (var pi in sourceType.DeclaredProperties) 296 foreach (var pi in sourceType.DeclaredProperties) 307 if (sourceType.BaseType is Type baseT && GetIndexer(baseT.GetTypeInfo(), indexerName, content) is PropertyInfo p) 313 if (GetIndexer(face.GetTypeInfo(), indexerName, content) is PropertyInfo pi) 327 PropertyInfo property = null;
PlatformBindingHelpers.cs (1)
44 var targetPropertyInfo = target.GetType().GetProperty(targetProperty);
Shell\ShellContent.cs (2)
389 PropertyInfo prop = type.GetRuntimeProperty(attrib.Name); 409 PropertyInfo prop = type.GetRuntimeProperty(attrib.Name);
Microsoft.Maui.Controls.Xaml (13)
ApplyPropertiesVisitor.cs (3)
342 var propertyInfo = elementType.GetRuntimeProperties().FirstOrDefault(p => p.Name == localName); 660 var propertyInfo = elementType.GetRuntimeProperties().FirstOrDefault(p => p.Name == localName); 692 PropertyInfo propertyInfo = null;
MarkupExtensions\AppThemeBindingExtension.cs (2)
61 PropertyInfo pi = null; 69 pi = valueProvider.TargetProperty as PropertyInfo;
MarkupExtensions\OnIdiomExtension.cs (2)
46 PropertyInfo pi = null; 56 pi = valueProvider.TargetProperty as PropertyInfo;
MarkupExtensions\OnPlatformExtension.cs (2)
58 PropertyInfo pi = null; 66 pi = valueProvider.TargetProperty as PropertyInfo;
MarkupExtensions\StaticExtension.cs (1)
32 var pinfo = type.GetRuntimeProperties().FirstOrDefault(pi => pi.Name == membername && pi.GetMethod.IsStatic);
MarkupExtensions\StaticResourceExtension.cs (2)
40 var pi = targetProperty as PropertyInfo;
XamlServiceProvider.cs (1)
338 && parentType.GetRuntimeProperties().FirstOrDefault(p => p.Name == name.LocalName) is PropertyInfo propertyInfo
Microsoft.ML.Core (1)
ComponentModel\ComponentCatalog.cs (1)
645var prop = loaderType.GetProperty("Instance", instType);
Microsoft.ML.Data (19)
Data\SchemaDefinition.cs (2)
188case PropertyInfo cursorChannelAttrPropertyInfo: 366case PropertyInfo propertyInfo:
DataLoadSave\Database\DatabaseLoader.cs (1)
154case PropertyInfo property:
DataLoadSave\Text\TextLoader.cs (1)
1617case PropertyInfo property:
DataView\InternalSchemaDefinition.cs (4)
32public Type FieldOrPropertyType => (MemberInfo is FieldInfo) ? (MemberInfo as FieldInfo).FieldType : (MemberInfo as PropertyInfo).PropertyType; 153case PropertyInfo propertyInfo: 246(memberInfo is PropertyInfo && (memberInfo as PropertyInfo).PropertyType == typeof(IChannel)))
DataView\TypedCursor.cs (3)
238case PropertyInfo propertyInfo: 292(memberInfo is PropertyInfo && (memberInfo as PropertyInfo).PropertyType == typeof(IChannel)))
Utils\ApiUtils.cs (8)
25private static readonly FuncStaticMethodInfo3<PropertyInfo, OpCode, Delegate> _generatePeekPropertyMethodInfo 26= new FuncStaticMethodInfo3<PropertyInfo, OpCode, Delegate>(GeneratePeek<int, int, int>); 31private static readonly FuncStaticMethodInfo3<PropertyInfo, Delegate> _generatePokePropertyMethodInfo 32= new FuncStaticMethodInfo3<PropertyInfo, Delegate>(GeneratePoke<int, int, int>); 77case PropertyInfo propertyInfo: 109private static Delegate GeneratePeek<TOwn, TRow, TValue>(PropertyInfo propertyInfo, OpCode assignmentOpCode) 145case PropertyInfo propertyInfo: 174private static Delegate GeneratePoke<TOwn, TRow, TValue>(PropertyInfo propertyInfo)
Microsoft.ML.EntryPoints (1)
JsonUtils\JsonManifestUtils.cs (1)
67foreach (var fieldInfo in propertyInfos)
Microsoft.ML.IntegrationTests (1)
Common.cs (1)
31foreach (var property in toyClassProperties)
Microsoft.ML.InternalCodeAnalyzer (1)
InstanceInitializerAnalyzer.cs (1)
53var hasInitProp = typeInfo.GetDeclaredProperty("HasInitializer");
Microsoft.ML.SearchSpace (2)
Parameter.cs (1)
196foreach (var property in properties)
SearchSpace.cs (1)
245foreach (var property in propertyInfo)
Microsoft.ML.Tests (1)
CollectionsDataViewTest.cs (1)
71foreach (var property in typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance))
Microsoft.ML.Tokenizers.Tests (1)
LlamaTests.cs (1)
69PropertyInfo? propertyInfo = typeof(SentencePieceTokenizer).GetProperty("TreatWhitespaceAsSuffix", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public);
Microsoft.TestPlatform.Build (1)
Tasks\VSTestTask.cs (1)
69var allowFailureWithoutError = BuildEngine.GetType().GetProperty("AllowFailureWithoutError");
Microsoft.TestPlatform.CrossPlatEngine (2)
Client\ProxyOperationManager.cs (2)
484var versionCheckProperty = properties.FirstOrDefault(p => string.Equals(p.Name, _versionCheckPropertyName, StringComparison.OrdinalIgnoreCase)); 490var makeRunsettingsCompatibleProperty = properties.FirstOrDefault(p => string.Equals(p.Name, _makeRunsettingsCompatiblePropertyName, StringComparison.OrdinalIgnoreCase));
Microsoft.TestUtilities (1)
XUnit\ConditionalTheoryDiscoverer.cs (1)
58var property = type.GetProperty("Skip");
Microsoft.VisualBasic.Core (25)
Microsoft\VisualBasic\CompilerServices\LateBinding.vb (4)
377Dim pi As PropertyInfo 574member = CType(member, PropertyInfo).GetGetMethod() 825member = CType(member, PropertyInfo).GetSetMethod() 999member = CType(member, PropertyInfo).GetGetMethod()
Microsoft\VisualBasic\CompilerServices\NewLateBinding.vb (3)
592DirectCast(member, PropertyInfo).GetIndexParameters().Length = 0)) 1246Dim propInfo As PropertyInfo = targetProcedure.AsProperty() 1257Dim propInfo As PropertyInfo = targetProcedure.AsProperty()
Microsoft\VisualBasic\CompilerServices\OverloadResolution.vb (3)
697DirectCast(newCandidate, PropertyInfo), 777Dim propertyBlock As PropertyInfo = DirectCast(candidate, PropertyInfo)
Microsoft\VisualBasic\CompilerServices\Symbols.vb (6)
663Return DirectCast(member, PropertyInfo).GetGetMethod.IsStatic 884Dim propertyBlock As PropertyInfo = DirectCast(members(memberIndex), PropertyInfo) 1346ByVal [property] As PropertyInfo, 1495Friend Function AsProperty() As PropertyInfo 1497Return TryCast(_item, PropertyInfo)
Microsoft\VisualBasic\CompilerServices\Utils.LateBinder.vb (2)
631Friend Shared Function PropertyToString(ByVal prop As Reflection.PropertyInfo) As String 719Return PropertyToString(DirectCast(member, PropertyInfo))
Microsoft\VisualBasic\CompilerServices\Utils.vb (1)
351Dim [property] As PropertyInfo = MemberInfo.GetProperty("MetadataToken", GetType(Integer), Array.Empty(Of Type)())
Microsoft\VisualBasic\CompilerServices\VBBinder.vb (5)
1600Public Overrides Function SelectProperty(ByVal bindingAttr As BindingFlags, ByVal match() As PropertyInfo, ByVal returnType As Type, ByVal indexes() As Type, ByVal modifiers() As ParameterModifier) As PropertyInfo 1605Dim ThisProperty As PropertyInfo 2064Dim ThisProperty As PropertyInfo 2144ThisProperty = CType(ThisMember, PropertyInfo)
Microsoft\VisualBasic\FileIO\SpecialDirectories.vb (1)
166Dim [property] As PropertyInfo = type?.GetProperty(propertyName)
Microsoft.VisualStudio.TestPlatform.Common (1)
Utilities\TypesToLoadUtilities.cs (1)
31var typesProperty = type.GetProperty("Types");
Microsoft.VisualStudio.TestPlatform.ObjectModel (1)
Navigation\PortablePdbReader.cs (1)
20private static readonly PropertyInfo MethodInfoMethodTokenProperty =
MSBuild (6)
OutOfProcTaskAppDomainWrapperBase.cs (3)
369PropertyInfo paramInfo = wrappedTask.GetType().GetProperty(param.Key, BindingFlags.Instance | BindingFlags.Public); 404PropertyInfo[] finalPropertyValues = wrappedTask.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public); 407foreach (PropertyInfo value in finalPropertyValues)
src\msbuild\src\Shared\Debugging\PrintLineDebugger.cs (3)
25private static readonly Lazy<PropertyInfo> CommonWriterProperty = new Lazy<PropertyInfo>( 30var propertyInfo = commonWriterType.GetProperty("Writer", BindingFlags.Public | BindingFlags.Static);
mscorlib (1)
src\runtime\src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
489[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.PropertyInfo))]
netstandard (1)
netstandard.cs (1)
1457[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.PropertyInfo))]
PresentationBuildTasks (58)
MS\Internal\MarkupCompiler\MarkupCompiler.cs (3)
1819if (desc.MemberInfo is FieldInfo || desc.MemberInfo is PropertyInfo) 2807param1 = new CodeParameterDeclarationExpression(typeof(PropertyInfo), PROPINFO); 3159(memberInfo.DeclaringType.IsAssignableFrom(_ccRoot.ElementType) && (memberInfo is PropertyInfo)));
MS\Internal\MarkupCompiler\ParserExtension.cs (1)
358PropertyInfo pi = KnownTypes.Types[(int)KnownElements.Application].GetProperty(localAttribName);
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlMapTable.cs (1)
1495if (memberInfo is PropertyInfo)
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlRecords.cs (7)
4695Debug.Assert((propertyMember is MethodInfo) || (propertyMember is PropertyInfo) 4743return PropertyMember as PropertyInfo; 4764if (arr[0] is PropertyInfo) 4766return (PropertyInfo)arr[0]; 4768else if (arr[1] is PropertyInfo) 4770return (PropertyInfo)arr[1]; 4774return arr[2] as PropertyInfo;
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\ParserContext.cs (2)
843PropertyInfo[] propertyInfo = extensionType.GetProperties(BindingFlags.Public | BindingFlags.Instance); 847foreach (PropertyInfo property in propertyInfo)
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\StyleXamlParser.cs (2)
441PropertyInfo pi = memberInfo as PropertyInfo;
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\TemplateXamlParser.cs (2)
498PropertyInfo pi = memberInfo as PropertyInfo;
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlNodes.cs (2)
448internal PropertyInfo PropInfo 450get { return _propertyMember as PropertyInfo;}
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (20)
651PropertyInfo contentPropertyInfo = CurrentContext.ContentPropertyInfo; 672PropertyInfo contentPropertyInfo = (PropertyInfo)propertyDynamicObject; 1509internal PropertyInfo ContentPropertyInfo 1626private PropertyInfo _contentPropertyInfo; 2182private PropertyInfo HandleElementScopedAttributes( 2191PropertyInfo xmlLangProperty = null; 3184PropertyInfo propInfo = dynamicObject as PropertyInfo; 3487PropertyInfo propertyMember = parentType.GetProperty(propertyName); 3506PropertyInfo propertyInfo = propertyMember as PropertyInfo; 3870PropertyInfo pi = ParentContext.ContentPropertyInfo; 3898private void CheckAllowedProperty(PropertyInfo pi, string propName) 4000PropertyInfo pi = propertyMember as PropertyInfo; 4531CurrentContext.ContentPropertyInfo = (PropertyInfo)propertyDynamicObject; 4576PropertyInfo pi = propertyDynamicObject as PropertyInfo; 4958PropertyInfo propertyInfo = contentWrapper.GetProperty( contentPropertyName );
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (17)
978internal bool IsAllowedPropertySet(PropertyInfo pi) 986private bool IsAllowedPropertyGet(PropertyInfo pi, bool checkProtected) 994internal bool IsAllowedPropertyGet(PropertyInfo pi) 1799internal PropertyInfo GetXmlLangProperty( 1896private PropertyInfo PropertyInfoFromName( 1903PropertyInfo info = null; 1945PropertyInfo[] infos = ownerType.GetProperties( 2046PropertyInfo propertyInfo = propertyMember as PropertyInfo; 2090PropertyInfo propertyInfo = propertyMember as PropertyInfo; 2335PropertyInfo pi = mi as PropertyInfo; 4002PropertyInfo dpInfo, 4071PropertyInfo dpInfo, 4085public PropertyInfo PropInfo; 4198public PropertyInfo XmlLangProperty;
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\TypeConverterHelper.cs (1)
45MemberInfo memberInfo = dpOrPiOrMi as PropertyInfo;
PresentationCore (5)
System\Windows\Diagnostics\XamlSourceInfoHelper.cs (3)
41private static PropertyInfo s_sourceBamlUriProperty; 42private static PropertyInfo s_elementLineNumberProperty; 43private static PropertyInfo s_elementLinePositionProperty;
System\Windows\Input\CursorConverter.cs (2)
59PropertyInfo[] properties = typeof(Cursors).GetProperties(BindingFlags.Public | BindingFlags.Static); 64PropertyInfo info = properties[i];
PresentationFramework (109)
MS\Internal\Data\IndexedEnumerable.cs (5)
488PropertyInfo pi = defaultMembers[i] as PropertyInfo; 506PropertyInfo pi = srcType.GetProperty("Count", typeof(int)); 697private PropertyInfo _reflectedCount; 698private PropertyInfo _reflectedItemAt;
MS\Internal\Data\PropertyPathWorker.cs (17)
116PropertyInfo pi; 227PropertyInfo pi; 332PropertyInfo pi; 531internal static bool IsIndexedProperty(PropertyInfo pi) 684PropertyInfo oldPI; 855PropertyInfo newPI; 1127PropertyInfo pi1; 1195PropertyInfo pi = defaultMembers[jj] as PropertyInfo; 1315PropertyInfo[] properties = type.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.FlattenHierarchy); 1319foreach (PropertyInfo pi in properties) 1339private bool MatchIndexerParameters(PropertyInfo pi, IndexerParameterInfo[] aryInfo, object[] args, bool isIList) 1550private void SetPropertyInfo(object info, out PropertyInfo pi, out PropertyDescriptor pd, out DependencyProperty dp, out DynamicPropertyAccessor dpa) 1559pi = info as PropertyInfo; 1572PropertyInfo pi; 1600private bool IsPropertyReadOnly(object item, PropertyInfo pi) 1660PropertyInfo pi;
MS\Internal\Data\XDeferredAxisSource.cs (2)
78PropertyInfo pi = (aryMembers.Length > 0) ? aryMembers[0] as PropertyInfo : null;
MS\Internal\Helper.cs (3)
599PropertyInfo propertyInfo = targetMember as PropertyInfo; 637Debug.Assert(targetMember is PropertyInfo || targetMember is MethodInfo,
MS\Internal\Interop\InternalDispatchObject.cs (3)
100PropertyInfo[] IReflect.GetProperties(BindingFlags bindingAttr) 104PropertyInfo IReflect.GetProperty(string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers) 108PropertyInfo IReflect.GetProperty(string name, BindingFlags bindingAttr)
MS\Internal\LayoutDump.cs (4)
905System.Reflection.PropertyInfo prop = paraClientType.GetProperty("Visual", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic); 930System.Reflection.PropertyInfo prop = type.GetProperty("ColumnCount"); 963System.Reflection.PropertyInfo propOfColumnIndex = typeOfCell.GetProperty("ColumnIndex", 971System.Reflection.PropertyInfo propOfRowIndex = typeOfCell.GetProperty("RowIndex",
MS\Internal\SystemDataHelper.cs (1)
77PropertyInfo nullProperty = type.GetProperty("Null", BindingFlags.Static | BindingFlags.Public | BindingFlags.FlattenHierarchy);
MS\Internal\TraceData.cs (1)
281PropertyInfo pi => $"{pi.GetType().Name}({pi.Name})",
System\Windows\Controls\DataGridAutoGeneratingColumnEventArgs.cs (1)
107typeof(PropertyInfo).IsAssignableFrom(value.GetType()),
System\Windows\Controls\DataGridColumn.cs (2)
1210PropertyInfo pi = itemProperty.Descriptor as PropertyInfo;
System\Windows\Data\CollectionView.cs (2)
1480PropertyInfo pi; 1486else if ((pi = property as PropertyInfo) != null)
System\Windows\Input\Command\CommandConverter.cs (2)
139PropertyInfo propertyInfo = ownerType.GetProperty(localName, BindingFlags.Public | BindingFlags.Static); 805PropertyInfo propertyInfo = type.GetProperty(name, BindingFlags.Public | BindingFlags.Static);
System\Windows\Input\Command\CommandValueSerializer.cs (1)
39PropertyInfo propertyInfo = ownerType.GetProperty(localName, BindingFlags.Public | BindingFlags.Static);
System\Windows\Markup\Baml2006\WpfXamlMember.cs (3)
56PropertyInfo property, 132PropertyInfo underlyingProperty = UnderlyingMember as PropertyInfo;
System\Windows\Markup\Baml2006\WpfXamlType.cs (2)
419PropertyInfo propertyInfo = memberFromBase.UnderlyingMember as PropertyInfo;
System\Windows\Markup\BamlMapTable.cs (1)
1495if (memberInfo is PropertyInfo)
System\Windows\Markup\BamlReader.cs (1)
1012PropertyInfo[] infos = attrInfo.OwnerType.GetProperties(
System\Windows\Markup\BamlRecordReader.cs (9)
1989PropertyInfo pi = dpOrPi as PropertyInfo; 3638PropertyInfo propertyInfo = attribInfo.PropInfo; 3798if (memberInfo is PropertyInfo propertyInfo) 4946PropertyInfo pi = contentProperty as PropertyInfo; 5139PropertyInfo pi = PiOrAttribInfo as PropertyInfo; 5729public PropertyInfo PropertyInfo
System\Windows\Markup\BamlRecords.cs (9)
4662PropertyInfo propInfo = PropInfo; 4695Debug.Assert((propertyMember is MethodInfo) || (propertyMember is PropertyInfo) 4764if (arr[0] is PropertyInfo) 4766return (PropertyInfo)arr[0]; 4768else if (arr[1] is PropertyInfo) 4770return (PropertyInfo)arr[1]; 4774return arr[2] as PropertyInfo; 4867internal PropertyInfo PropInfo 4943private PropertyInfo _pi = null;
System\Windows\Markup\BamlWriter.cs (4)
642PropertyInfo pi = dpOrPi as PropertyInfo; 1131PropertyInfo mostDerived = null; 1133foreach(PropertyInfo pi in infos)
System\Windows\Markup\ParserContext.cs (2)
843PropertyInfo[] propertyInfo = extensionType.GetProperties(BindingFlags.Public | BindingFlags.Instance); 847foreach (PropertyInfo property in propertyInfo)
System\Windows\Markup\XamlTypeMapper.cs (19)
824as PropertyInfo; 1101internal bool IsAllowedPropertySet(PropertyInfo pi) 1109internal bool IsAllowedPropertyGet(PropertyInfo pi) 1117internal static bool IsAllowedPropertySet(PropertyInfo pi, bool allowProtected, out bool isPublic) 1130private static bool IsAllowedPropertyGet(PropertyInfo pi, bool allowProtected, out bool isPublic) 1799internal PropertyInfo GetXmlLangProperty( 1896private PropertyInfo PropertyInfoFromName( 1903PropertyInfo info = null; 1945PropertyInfo[] infos = ownerType.GetProperties( 2046PropertyInfo propertyInfo = propertyMember as PropertyInfo; 2090PropertyInfo propertyInfo = propertyMember as PropertyInfo; 2768internal static object GetInternalPropertyValue(ParserContext pc, object rootElement, PropertyInfo pi, object target) 2783internal static bool SetInternalPropertyValue(ParserContext pc, object rootElement, PropertyInfo pi, object target, object value) 4002PropertyInfo dpInfo, 4071PropertyInfo dpInfo, 4085public PropertyInfo PropInfo; 4198public PropertyInfo XmlLangProperty;
System\Windows\Media\Animation\Storyboard.cs (2)
774else if( propertyAccessor is PropertyInfo ) 776return ((PropertyInfo)propertyAccessor).Name;
System\Windows\PropertyPath.cs (8)
171PropertyInfo pi; 193out DependencyProperty dp, out PropertyInfo pi, out PropertyDescriptor pd, out DynamicObjectAccessor doa) 201else if ((pi = accessor as PropertyInfo) != null) 645private PropertyInfo GetPropertyHelper(Type ownerType, string propertyName) 647PropertyInfo result = null; 921accessor is PropertyInfo || 930PropertyInfo pi; 936else if ((pi = accessor as PropertyInfo) != null)
System\Windows\PropertyPathConverter.cs (1)
194PropertyInfo pi;
System\Windows\ThemeDictionaryExtension.cs (4)
81PropertyInfo propertyInfo = targetProperty as PropertyInfo; 159private static PropertyInfo _sourceProperty; 161private static PropertyInfo SourceProperty
PresentationUI (1)
MS\Internal\Documents\DocumentSignatureManager.cs (1)
1206PropertyInfo p = t.GetProperty("HResult", BindingFlags.NonPublic | BindingFlags.Instance);
ReachFramework (17)
Serialization\Manager\MetroSerializationManager.cs (2)
828PropertyInfo propertyInfo = null; 830PropertyInfo[] properties = dependencyProperty.OwnerType.GetProperties();
Serialization\Manager\ReachSerializableProperties.cs (5)
500PropertyInfo 505PropertyInfo info = null; 509info = (PropertyInfo)_propertyInfo.PropertyInfo; 650(((PropertyInfo)_propertyInfo.PropertyInfo) != null) ) 652isReadOnly = !((PropertyInfo)_propertyInfo.PropertyInfo).CanWrite;
Serialization\Manager\ReachSerializationCacheItems.cs (8)
87PropertyInfo[] properties = type.GetProperties(); 101PropertyInfo propertyInfo = properties[indexInProperties]; 182PropertyInfo propertyInfo, 279PropertyInfo propertyInfo 294PropertyInfo propertyInfo, 390PropertyInfo 430PropertyInfo propertyInfo; 452this.PropertyInfo = memberInfo as PropertyInfo;
Serialization\Manager\XpsTokenContext.cs (2)
127PropertyInfo 187PropertyInfo propertyInfo;
Roslyn.Diagnostics.Analyzers (1)
src\roslyn\src\RoslynAnalyzers\Utilities\Workspaces\SyntaxNodeExtensions.cs (1)
21var property = typeof(Simplifier).GetTypeInfo().GetDeclaredProperty("AddImportsAnnotation");
Shared (2)
Data.Validation\LengthAttribute.cs (2)
133var property = GetCountProperty(value); 150private static PropertyInfo? GetCountProperty(object value) => value.GetType().GetRuntimeProperty("Count");
System.ComponentModel.Annotations (6)
System\ComponentModel\DataAnnotations\CompareAttribute.cs (2)
38var otherPropertyInfo = validationContext.ObjectType.GetRuntimeProperty(OtherProperty); 62private string? GetDisplayNameForProperty(PropertyInfo property)
System\ComponentModel\DataAnnotations\LocalizableString.cs (1)
126var property = _resourceType.GetRuntimeProperty(_propertyValue);
System\ComponentModel\DataAnnotations\MaxLengthAttribute.cs (1)
127PropertyInfo? property = value.GetType().GetRuntimeProperty("Count");
System\ComponentModel\DataAnnotations\ValidationAttribute.cs (1)
266var property = _errorMessageResourceType
System\ComponentModel\DataAnnotations\ValidationAttributeStore.cs (1)
142internal static bool IsPublic(PropertyInfo p) =>
System.ComponentModel.Composition (15)
Microsoft\Internal\ReflectionServices.cs (1)
124internal static IEnumerable<PropertyInfo> GetAllProperties(this Type type)
System\ComponentModel\Composition\AttributedModel\AttributedPartCreationInfo.cs (2)
347foreach (PropertyInfo member in type.GetProperties(flags)) 486foreach (PropertyInfo member in type.GetProperties(flags))
System\ComponentModel\Composition\ConstraintServices.cs (2)
16private static readonly PropertyInfo _exportDefinitionContractNameProperty = typeof(ExportDefinition).GetProperty("ContractName")!; 17private static readonly PropertyInfo _exportDefinitionMetadataProperty = typeof(ExportDefinition).GetProperty("Metadata")!;
System\ComponentModel\Composition\Hosting\CompositionServices.cs (3)
33return ((PropertyInfo)member).PropertyType; 293foreach (PropertyInfo pi in attrType.GetProperties()) 480List<PropertyInfo> properties = metadataViewType.GetAllProperties().
System\ComponentModel\Composition\MetadataViewGenerator.cs (1)
209foreach (PropertyInfo propertyInfo in viewType.GetAllProperties())
System\ComponentModel\Composition\ReflectionModel\LazyMemberInfo.cs (2)
28PropertyInfo property = (PropertyInfo)member;
System\ComponentModel\Composition\ReflectionModel\ReflectionExtensions.cs (4)
50PropertyInfo? property = member as PropertyInfo; 81public static ReflectionProperty ToReflectionProperty(this PropertyInfo property) 132return ((PropertyInfo)member).ToReflectionProperty();
System.ComponentModel.Composition.Registration (32)
System\ComponentModel\Composition\Registration\PartBuilder.cs (26)
28private readonly List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportBuilder>, Type>> _propertyExports; 29private readonly List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportBuilder>, Type>> _propertyImports; 40_propertyExports = new List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportBuilder>, Type>>(); 41_propertyImports = new List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportBuilder>, Type>>(); 110public PartBuilder ExportProperties(Predicate<PropertyInfo> propertyFilter) 117public PartBuilder ExportProperties(Predicate<PropertyInfo> propertyFilter, 118Action<PropertyInfo, ExportBuilder> exportConfiguration) 128public PartBuilder ExportProperties<T>(Predicate<PropertyInfo> propertyFilter) 135public PartBuilder ExportProperties<T>(Predicate<PropertyInfo> propertyFilter, 136Action<PropertyInfo, ExportBuilder> exportConfiguration) 146public PartBuilder ImportProperties(Predicate<PropertyInfo> propertyFilter) 153public PartBuilder ImportProperties(Predicate<PropertyInfo> propertyFilter, 154Action<PropertyInfo, ImportBuilder> importConfiguration) 163public PartBuilder ImportProperties<T>(Predicate<PropertyInfo> propertyFilter) 170public PartBuilder ImportProperties<T>(Predicate<PropertyInfo> propertyFilter, 171Action<PropertyInfo, ImportBuilder> importConfiguration) 421foreach (PropertyInfo pi in type.GetProperties()) 424PropertyInfo declaredPi = pi.DeclaringType.UnderlyingSystemType.GetProperty(pi.Name, pi.PropertyType); 430foreach (Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportBuilder>, Type> importSpecification in _propertyImports) 470foreach (Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportBuilder>, Type> exportSpecification in _propertyExports)
System\ComponentModel\Composition\Registration\PartBuilderOfT.cs (6)
14private readonly PropertyInfo _propertyInfo; 27public bool VerifyPropertyInfo(PropertyInfo pi) 32public void ConfigureImport(PropertyInfo _, ImportBuilder importBuilder) 37public void ConfigureExport(PropertyInfo _, ExportBuilder exportBuilder) 42private static PropertyInfo SelectProperties(Expression<Func<T, object>> propertyFilter) 52return (PropertyInfo)memberInfo;
System.ComponentModel.TypeConverter (12)
src\runtime\src\libraries\Common\src\System\Drawing\ColorTable.cs (1)
26foreach (PropertyInfo prop in typeWithColors.GetProperties(BindingFlags.Public | BindingFlags.Static))
System\ComponentModel\ComponentResourceManager.cs (1)
171PropertyInfo? prop;
System\ComponentModel\Design\Serialization\InstanceDescriptor.cs (3)
75else if (member is PropertyInfo pi) 136else if (MemberInfo is PropertyInfo) 138return ((PropertyInfo)MemberInfo).GetValue(null, translatedArguments);
System\ComponentModel\ReflectPropertyDescriptor.cs (3)
69private PropertyInfo? _propInfo; // the property info 120PropertyInfo propInfo, 427PropertyInfo? p = t.GetProperty(name, bindingFlags, binder: null, PropertyType, Type.EmptyTypes, null);
System\ComponentModel\ReflectTypeDescriptionProvider.cs (2)
1355PropertyInfo[] propertyInfos = TrimSafeReflectionHelper.GetProperties(type, bindingFlags); 1362PropertyInfo propertyInfo = propertyInfos[idx];
System\ComponentModel\TrimSafeReflectionHelper.cs (2)
13public static PropertyInfo[] GetProperties(Type type, BindingFlags bindingAttr) => type.GetProperties(bindingAttr); 14public static PropertyInfo? GetProperty(Type type, string name, BindingFlags bindingAttr) => type.GetProperty(name, bindingAttr);
System.Composition.Convention (44)
System\Composition\Convention\ConventionBuilder.cs (2)
183if (mi != null && (mi is ConstructorInfo || mi is TypeInfo || mi is PropertyInfo || mi is MethodInfo)) 218else if (member is PropertyInfo || member is ConstructorInfo || member is MethodInfo)
System\Composition\Convention\PartConventionBuilder.cs (35)
33private readonly List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportConventionBuilder>, Type>> _propertyExports; 34private readonly List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportConventionBuilder>>> _propertyImports; 44_propertyExports = new List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportConventionBuilder>, Type>>(); 45_propertyImports = new List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportConventionBuilder>>>(); 179public PartConventionBuilder ExportProperties(Predicate<PropertyInfo> propertyFilter) 192public PartConventionBuilder ExportProperties(Predicate<PropertyInfo> propertyFilter, 193Action<PropertyInfo, ExportConventionBuilder> exportConfiguration) 201private PartConventionBuilder ExportPropertiesImpl(Predicate<PropertyInfo> propertyFilter, 202Action<PropertyInfo, ExportConventionBuilder> exportConfiguration) 214public PartConventionBuilder ExportProperties<T>(Predicate<PropertyInfo> propertyFilter) 228public PartConventionBuilder ExportProperties<T>(Predicate<PropertyInfo> propertyFilter, 229Action<PropertyInfo, ExportConventionBuilder> exportConfiguration) 237private PartConventionBuilder ExportPropertiesImpl<T>(Predicate<PropertyInfo> propertyFilter, 238Action<PropertyInfo, ExportConventionBuilder> exportConfiguration) 249public PartConventionBuilder ImportProperties(Predicate<PropertyInfo> propertyFilter) 262public PartConventionBuilder ImportProperties(Predicate<PropertyInfo> propertyFilter, 263Action<PropertyInfo, ImportConventionBuilder> importConfiguration) 271private PartConventionBuilder ImportPropertiesImpl(Predicate<PropertyInfo> propertyFilter, 272Action<PropertyInfo, ImportConventionBuilder> importConfiguration) 284public PartConventionBuilder ImportProperties<T>(Predicate<PropertyInfo> propertyFilter) 298public PartConventionBuilder ImportProperties<T>(Predicate<PropertyInfo> propertyFilter, 299Action<PropertyInfo, ImportConventionBuilder> importConfiguration) 307private PartConventionBuilder ImportPropertiesImpl<T>(Predicate<PropertyInfo> propertyFilter, 308Action<PropertyInfo, ImportConventionBuilder> importConfiguration) 310Predicate<PropertyInfo> typedFilter = pi => pi.PropertyType.Equals(typeof(T)) && (propertyFilter == null || propertyFilter(pi)); 666foreach (PropertyInfo pi in type.GetRuntimeProperties()) 673PropertyInfo underlyingPi = null; 676foreach (Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportConventionBuilder>> importSpecification in _propertyImports) 713foreach (Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportConventionBuilder>, Type> exportSpecification in _propertyExports)
System\Composition\Convention\PartConventionBuilderOfT.cs (7)
69private readonly PropertyInfo _propertyInfo; 83public bool VerifyPropertyInfo(PropertyInfo pi) 88public void ConfigureImport(PropertyInfo _, ImportConventionBuilder importBuilder) 93public void ConfigureExport(PropertyInfo _, ExportConventionBuilder exportBuilder) 98private static PropertyInfo SelectProperties(Expression<Func<T, object>> propertySelector) 105var memberInfo = ((MemberExpression)expr).Member as PropertyInfo;
System.Composition.Hosting (1)
System\Composition\Hosting\Providers\Metadata\MetadataViewProvider.cs (1)
52foreach (var prop in typeof(TMetadata).GetTypeInfo().DeclaredProperties
System.Composition.TypedParts (12)
System\Composition\CompositionContextExtensions.cs (1)
53foreach (var pi in objType.GetRuntimeProperties())
System\Composition\TypedParts\ActivationFeatures\PropertyImportSite.cs (3)
13private readonly PropertyInfo _pi; 15public PropertyImportSite(PropertyInfo pi) 20public PropertyInfo Property { get { return _pi; } }
System\Composition\TypedParts\ActivationFeatures\PropertyInjectionFeature.cs (1)
85var property = d.Key;
System\Composition\TypedParts\ContractHelpers.cs (1)
71foreach (var prop in attrType
System\Composition\TypedParts\Discovery\DiscoveredPropertyExport.cs (3)
15private readonly PropertyInfo _property; 17public DiscoveredPropertyExport(CompositionContract contract, IDictionary<string, object> metadata, PropertyInfo property) 40var property = closedPartType.AsType().GetRuntimeProperty(_property.Name);
System\Composition\TypedParts\Discovery\TypeInspector.cs (3)
78foreach (var property in partTypeAsType.GetRuntimeProperties() 156foreach (var prop in attrType 164private static void CheckPropertyExportCompatibility(TypeInfo partType, PropertyInfo property, TypeInfo contractType)
System.Configuration.ConfigurationManager (9)
System\Configuration\ApplicationSettingsBase.cs (5)
438private SettingsProperty CreateSetting(PropertyInfo propertyInfo) 551PropertyInfo[] properties = SettingsFilter(type.GetProperties(BindingFlags.Instance | BindingFlags.Public)); 713private static PropertyInfo[] SettingsFilter(PropertyInfo[] allProps) 715var settingProps = new List<PropertyInfo>();
System\Configuration\ConfigurationElement.cs (3)
751foreach (PropertyInfo propertyInformation in type.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)) 760private static ConfigurationProperty CreateConfigurationPropertyFromAttributes(PropertyInfo propertyInformation) 870foreach (PropertyInfo pi in GetType().GetProperties())
System\Configuration\ConfigurationProperty.cs (1)
68internal ConfigurationProperty(PropertyInfo info)
System.Data.Common (2)
System\Data\Common\SqlUDTStorage.cs (1)
45PropertyInfo? propInfo = type.GetProperty("Null", BindingFlags.Public | BindingFlags.Static);
System\Data\DataColumn.cs (1)
661PropertyInfo propInfo = _dataType.GetProperty("Null", System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static)!;
System.Diagnostics.DiagnosticSource (7)
System\Diagnostics\DsesFilterAndTransform.cs (7)
771PropertyInfo? propertyInfo = typeInfo.GetDeclaredProperty(propertyName); 774foreach (PropertyInfo pi in typeInfo.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static)) 818private static PropertyFetch CreatePropertyFetch(Type type, PropertyInfo propertyInfo) 842public RefTypedFetchProperty(Type type, PropertyInfo property) : base(type) 861public ValueTypedFetchProperty(Type type, PropertyInfo property) : base(type) 884public ReflectionPropertyFetch(Type type, PropertyInfo property) : base(type) 1023foreach (PropertyInfo property in curTypeInfo.GetProperties(BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic))
System.DirectoryServices.AccountManagement (2)
System\DirectoryServices\AccountManagement\AD\ADStoreCtx_Query.cs (2)
32System.Reflection.PropertyInfo[] propertyInfoList = p.GetProperties(); 34foreach (System.Reflection.PropertyInfo pInfo in propertyInfoList)
System.Drawing.Primitives (1)
src\runtime\src\libraries\Common\src\System\Drawing\ColorTable.cs (1)
26foreach (PropertyInfo prop in typeWithColors.GetProperties(BindingFlags.Public | BindingFlags.Static))
System.Linq.Expressions (73)
System\Dynamic\Utils\ExpressionUtils.cs (1)
204if (member.Member is PropertyInfo prop)
System\Linq\Expressions\Compiler\LambdaCompiler.Address.cs (4)
261var property = node.Member as PropertyInfo; 284PropertyInfo pi = (PropertyInfo)node.Member;
System\Linq\Expressions\Compiler\LambdaCompiler.Expressions.cs (12)
819Debug.Assert(member is PropertyInfo); 820var prop = (PropertyInfo)member; 863Debug.Assert(member is PropertyInfo); 864var prop = (PropertyInfo)member; 966Debug.Assert(binding.Member is PropertyInfo); 967EmitCall(objectType, (binding.Member as PropertyInfo)!.GetSetMethod(nonPublic: true)!); 974if (binding.Member is PropertyInfo && type.IsValueType) 992if (binding.Member is PropertyInfo && type.IsValueType) 1104Debug.Assert(member is FieldInfo || member is PropertyInfo); 1105return member is FieldInfo fi ? fi.FieldType : (member as PropertyInfo)!.PropertyType;
System\Linq\Expressions\Compiler\StackSpiller.Bindings.cs (1)
49if (_binding.Member is PropertyInfo property && property.PropertyType.IsValueType)
System\Linq\Expressions\Compiler\StackSpiller.cs (1)
392node.Member is PropertyInfo)
System\Linq\Expressions\Expression.cs (2)
255PropertyInfo? indexer = ((IndexExpression)expression).Indexer; 263if (member is PropertyInfo prop)
System\Linq\Expressions\Expression.DebuggerProxy.cs (1)
175public PropertyInfo? Indexer => _node.Indexer;
System\Linq\Expressions\IndexExpression.cs (17)
25PropertyInfo? indexer, 67/// Gets the <see cref="PropertyInfo"/> for the property if the expression represents an indexed property, returns null otherwise. 69public PropertyInfo? Indexer { get; } 138public static IndexExpression MakeIndex(Expression instance, PropertyInfo? indexer, IEnumerable<Expression>? arguments) 217PropertyInfo pi = FindInstanceProperty(instance.Type, propertyName, arguments); 227private static PropertyInfo FindInstanceProperty( 234PropertyInfo? pi = FindProperty(type, propertyName, arguments, flags); 270private static PropertyInfo? FindProperty( 276PropertyInfo? property = null; 278foreach (PropertyInfo pi in type.GetProperties(flags)) 296private static bool IsCompatible(PropertyInfo pi, Expression[]? args) 345/// <param name="indexer">The <see cref="PropertyInfo"/> that represents the property to index.</param> 348public static IndexExpression Property(Expression? instance, PropertyInfo indexer, params Expression[]? arguments) 357/// <param name="indexer">The <see cref="PropertyInfo"/> that represents the property to index.</param> 360public static IndexExpression Property(Expression? instance, PropertyInfo indexer, IEnumerable<Expression>? arguments) => 363private static IndexExpression MakeIndexProperty(Expression? instance, PropertyInfo indexer, string paramName, ReadOnlyCollection<Expression> argList) 374private static void ValidateIndexedProperty(Expression? instance, PropertyInfo indexer, string paramName, ref ReadOnlyCollection<Expression> argList)
System\Linq\Expressions\Interpreter\LightCompiler.cs (11)
664if (refMember is PropertyInfo pi) 2324Debug.Assert(member.Member is PropertyInfo); 2325var property = (PropertyInfo)member.Member; 2483var pi = (PropertyInfo)member; 2746if (memberMember.Member is PropertyInfo && type.IsValueType) 2763var pi = member as PropertyInfo; 3213private readonly PropertyInfo _property; 3215public PropertyByRefUpdater(LocalDefinition? obj, PropertyInfo property, int argumentIndex)
System\Linq\Expressions\MemberAssignment.cs (2)
75/// <param name="propertyAccessor">The <see cref="PropertyInfo"/> for the property which is being assigned to.</param> 99case PropertyInfo pi:
System\Linq\Expressions\MemberExpression.cs (12)
33internal static PropertyExpression Make(Expression? expression, PropertyInfo property) 48return fi == null ? (MemberExpression)Make(expression, (PropertyInfo)member) : Make(expression, fi); 105private readonly PropertyInfo _property; 106public PropertyExpression(Expression? expression, PropertyInfo member) 211PropertyInfo? pi = expression.Type.GetProperty(propertyName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.IgnoreCase | BindingFlags.FlattenHierarchy) 235PropertyInfo? pi = type.GetProperty(propertyName, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.IgnoreCase | BindingFlags.FlattenHierarchy) 250public static MemberExpression Property(Expression? expression, PropertyInfo property) 308private static PropertyInfo GetProperty(MethodInfo mi, string? paramName, int index = -1) 315PropertyInfo[] props = type.GetProperties(flags); 316foreach (PropertyInfo pi in props) 364PropertyInfo? pi = expression.Type.GetProperty(propertyOrFieldName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.IgnoreCase | BindingFlags.FlattenHierarchy); 394if (member is PropertyInfo pi)
System\Linq\Expressions\MemberListBinding.cs (4)
66/// <paramref name="member"/> does not represent a field or property.-or-The <see cref="FieldInfo.FieldType"/> or <see cref="PropertyInfo.PropertyType"/> of the field or property that <paramref name="member"/> represents does not implement <see cref="Collections.IEnumerable"/>.</exception> 79/// <paramref name="member"/> does not represent a field or property.-or-The <see cref="FieldInfo.FieldType"/> or <see cref="PropertyInfo.PropertyType"/> of the field or property that <paramref name="member"/> represents does not implement <see cref="Collections.IEnumerable"/>.</exception> 98/// <paramref name="propertyAccessor"/> does not represent a property accessor method.-or-The <see cref="PropertyInfo.PropertyType"/> of the property that the method represented by <paramref name="propertyAccessor"/> accesses does not implement <see cref="IEnumerable"/>.</exception> 112/// <paramref name="propertyAccessor"/> does not represent a property accessor method.-or-The <see cref="PropertyInfo.PropertyType"/> of the property that the method represented by <paramref name="propertyAccessor"/> accesses does not implement <see cref="IEnumerable"/>.</exception>
System\Linq\Expressions\MemberMemberBinding.cs (3)
97/// the Member property set to the <see cref="PropertyInfo"/> that represents the property accessed in <paramref name="propertyAccessor"/>, 113/// the Member property set to the <see cref="PropertyInfo"/> that represents the property accessed in <paramref name="propertyAccessor"/>, 135case PropertyInfo pi:
System\Linq\Expressions\NewExpression.cs (2)
319if (member is PropertyInfo pi) 340PropertyInfo prop = GetProperty(method, paramName, index);
System.Net.Http (2)
src\runtime\src\libraries\Common\src\System\Net\Security\SslClientAuthenticationOptionsExtensions.cs (2)
42PropertyInfo[] properties = typeof(SslClientAuthenticationOptions).GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly)!; 44foreach (PropertyInfo pi in properties)
System.Net.Security (1)
src\runtime\src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (1)
162PropertyInfo? taskResultProperty = taskOfHttpResponseMessageType?.GetProperty("Result");
System.Net.Sockets (1)
System\Net\Sockets\Socket.Unix.cs (1)
275foreach (PropertyInfo pi in typeof(Socket).GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly))
System.Private.CoreLib (110)
Internal\Reflection\Augments\ReflectionAugments.cs (2)
205public static PropertyInfo GetImplicitlyOverriddenBaseClassProperty(PropertyInfo p)
Internal\Reflection\Extensions\NonPortable\CustomAttributeInheritanceRules.cs (6)
65PropertyInfo? propertyInfo = element as PropertyInfo; 183private sealed class PropertyCustomAttributeSearcher : CustomAttributeSearcher<PropertyInfo> 185protected sealed override IEnumerable<CustomAttributeData> GetDeclaredCustomAttributes(PropertyInfo element) 190public sealed override PropertyInfo GetParent(PropertyInfo e)
Internal\Reflection\Extensions\NonPortable\CustomAttributeInstantiator.cs (1)
109PropertyInfo? propertyInfo = walk.GetProperty(name, BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly);
src\runtime\src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (10)
635public sealed override PropertyInfo? SelectProperty(BindingFlags bindingAttr, PropertyInfo[] match, Type? returnType, 650PropertyInfo[] candidates = (PropertyInfo[])match.Clone(); 743PropertyInfo bestMatch = candidates[currentMin]; 835public static PropertyInfo? ExactPropertyBinding(PropertyInfo[] match, Type? returnType, Type[]? types) 839PropertyInfo? bestMatch = null; 1077private static int FindMostSpecificProperty(PropertyInfo cur1, PropertyInfo cur2)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (1)
3397PropertyInfo p = attributeType.GetProperty(namedArgument.MemberInfo.Name, BindingFlags.Public | BindingFlags.Instance)!;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\PropertyAnalysis.cs (2)
15internal readonly PropertyInfo propertyInfo; 22PropertyInfo propertyInfo,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\PropertyValue.cs (8)
14/// To get the value of a property quickly, use a delegate produced by <see cref="GetPropertyGetter(PropertyInfo)"/>. 158public static Func<PropertyValue, PropertyValue> GetPropertyGetter(PropertyInfo property) 172private static Func<PropertyValue, PropertyValue> GetBoxedValueTypePropertyGetter(PropertyInfo property) 193private static Func<PropertyValue, PropertyValue> GetReferenceTypePropertyGetter(PropertyInfo property) 201public abstract Func<PropertyValue, PropertyValue> GetPropertyGetter(PropertyInfo property); 205protected static Delegate GetGetMethod(PropertyInfo property, Type propertyType) 213private static Func<TContainer, TProperty> GetGetMethod<TProperty>(PropertyInfo property) where TProperty : struct => 216public override Func<PropertyValue, PropertyValue> GetPropertyGetter(PropertyInfo property)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\Statics.cs (2)
325PropertyInfo propInfo, 331public static AttributeType? GetCustomAttribute<AttributeType>(PropertyInfo propInfo)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TypeAnalysis.cs (1)
30foreach (PropertyInfo propertyInfo in dataType.GetProperties())
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Binder.cs (2)
16public abstract PropertyInfo? SelectProperty(BindingFlags bindingAttr, PropertyInfo[] match, Type? returnType, Type[]? indexes, ParameterModifier[]? modifiers);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeNamedArgument.cs (2)
23PropertyInfo property => property.PropertyType, 65((PropertyInfo)_memberInfo).PropertyType;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (2)
436protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, 443public override PropertyInfo[] GetProperties(BindingFlags bindingAttr)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilderInstantiation.cs (2)
195protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) { throw new NotSupportedException(); } 198public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) { throw new NotSupportedException(); }
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\IReflect.cs (3)
39PropertyInfo? GetProperty(string name, BindingFlags bindingAttr); 44PropertyInfo? GetProperty(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[] types, ParameterModifier[]? modifiers); 49PropertyInfo[] GetProperties(BindingFlags bindingAttr);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\ModifiedType.cs (2)
141protected override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, 146public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_ModifiedType);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\NullabilityInfoContext.cs (5)
12/// <see cref="ParameterInfo"/>, <see cref="FieldInfo"/>, <see cref="PropertyInfo"/> and <see cref="EventInfo"/>. 184/// Populates <see cref="NullabilityInfo" /> for the given <see cref="PropertyInfo" />. 191public NullabilityInfo Create(PropertyInfo propertyInfo) 418else if (metaMember is PropertyInfo property) 440private static Type GetPropertyMetaType(PropertyInfo property)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\ParameterInfo.cs (1)
91args = ((PropertyInfo)MemberImpl).GetIndexParameters();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\PropertyInfo.cs (4)
63public static bool operator ==(PropertyInfo? left, PropertyInfo? right) 81public static bool operator !=(PropertyInfo? left, PropertyInfo? right) => !(left == right);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\RuntimeReflectionExtensions.cs (2)
36public static IEnumerable<PropertyInfo> GetRuntimeProperties( 76public static PropertyInfo? GetRuntimeProperty(
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureType.cs (2)
140public sealed override PropertyInfo[] GetProperties(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType); 152protected sealed override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\TypeDelegator.cs (2)
111protected override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, 121public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) => typeImpl.GetProperties(bindingAttr);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\TypeInfo.cs (2)
31public virtual PropertyInfo? GetDeclaredProperty(string name) => GetProperty(name, DeclaredOnlyLookup); 95public virtual IEnumerable<PropertyInfo> DeclaredProperties
src\runtime\src\libraries\System.Private.CoreLib\src\System\Type.cs (10)
411public PropertyInfo? GetProperty(string name) => GetProperty(name, DefaultLookup); 414public PropertyInfo? GetProperty(string name, BindingFlags bindingAttr) 424public PropertyInfo? GetProperty(string name, Type? returnType) 432public PropertyInfo? GetProperty(string name, Type[] types) => GetProperty(name, null, types); 435public PropertyInfo? GetProperty(string name, Type? returnType, Type[] types) => GetProperty(name, returnType, types, null); 438public PropertyInfo? GetProperty(string name, Type? returnType, Type[] types, ParameterModifier[]? modifiers) => GetProperty(name, DefaultLookup, null, returnType, types, modifiers); 441public PropertyInfo? GetProperty(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[] types, ParameterModifier[]? modifiers) 450protected abstract PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers); 453public PropertyInfo[] GetProperties() => GetProperties(DefaultLookup); 456public abstract PropertyInfo[] GetProperties(BindingFlags bindingAttr);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Type.Helpers.cs (2)
180PropertyInfo?[]? p = null; 327if (p[i] is PropertyInfo pi)
System\Reflection\Emit\CustomAttributeBuilder.cs (2)
18public CustomAttributeBuilder(ConstructorInfo con, object[] constructorArgs, PropertyInfo[] namedProperties, object[] propertyValues) 23public CustomAttributeBuilder(ConstructorInfo con, object[] constructorArgs, PropertyInfo[] namedProperties, object[] propertyValues, FieldInfo[] namedFields, object[] fieldValues)
System\Reflection\Runtime\BindingFlagSupport\PropertyPolicies.cs (13)
14internal sealed class PropertyPolicies : MemberPolicies<PropertyInfo> 22public sealed override IEnumerable<PropertyInfo> GetDeclaredMembers(Type type) 27public sealed override IEnumerable<PropertyInfo> CoreGetDeclaredMembers(RuntimeTypeInfo type, NameFilter? optionalNameFilter, RuntimeTypeInfo reflectedType) 34public sealed override void GetMemberAttributes(PropertyInfo member, out MethodAttributes visibility, out bool isStatic, out bool isVirtual, out bool isNewSlot) 57public sealed override bool ImplicitlyOverrides(PropertyInfo? baseMember, PropertyInfo? derivedMember) 68public sealed override bool IsSuppressedByMoreDerivedMember(PropertyInfo member, PropertyInfo[] priorMembers, int startIndex, int endIndex) 73PropertyInfo prior = priorMembers[i]; 87public sealed override bool OkToIgnoreAmbiguity(PropertyInfo m1, PropertyInfo m2) 92private static MethodInfo? GetAccessorMethod(PropertyInfo property) 103private static MethodInfo? GetMostAccessibleAccessor(PropertyInfo property)
System\Reflection\Runtime\TypeInfos\NativeFormat\NativeFormatRuntimeTypeInfo.CoreGetDeclared.cs (1)
76internal sealed override IEnumerable<PropertyInfo> CoreGetDeclaredProperties(NameFilter optionalNameFilter, RuntimeTypeInfo reflectedType, RuntimeTypeInfo contextTypeInfo)
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.BindingFlags.cs (9)
99public PropertyInfo[] GetProperties(BindingFlags bindingAttr) => Query<PropertyInfo>(PropertyPolicies.Instance, bindingAttr).ToArray(); 101public PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers) 111return Query<PropertyInfo>(PropertyPolicies.Instance, name, bindingAttr).Disambiguate(); 116QueryResult<PropertyInfo> queryResult = Query<PropertyInfo>(PropertyPolicies.Instance, name, bindingAttr); 117ListBuilder<PropertyInfo> candidates = default; 118foreach (PropertyInfo candidate in queryResult) 133PropertyInfo firstCandidate = candidates[0];
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.CoreGetDeclared.cs (3)
102internal IEnumerable<PropertyInfo> CoreGetDeclaredProperties(NameFilter optionalNameFilter, RuntimeTypeInfo reflectedType) 110return Array.Empty<PropertyInfo>(); 133internal abstract IEnumerable<PropertyInfo> CoreGetDeclaredProperties(NameFilter optionalNameFilter, RuntimeTypeInfo reflectedType, RuntimeTypeInfo contextTypeInfo);
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.GetMember.cs (1)
45QueryResult<PropertyInfo> properties;
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.InvokeMember.cs (2)
308PropertyInfo[] semiFinalists = (PropertyInfo[])GetMember(name, MemberTypes.Property, bindingFlags);
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.TypeComponentsCache.cs (1)
89perNameCaches[MemberTypeIndex.Property] = new PerNameQueryCache<PropertyInfo>(type, ignoreCase: ignoreCase);
System\RuntimeType.NativeAot.cs (2)
754protected override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) 758public override PropertyInfo[] GetProperties(BindingFlags bindingAttr)
System.Private.DataContractSerialization (52)
System\Runtime\Serialization\AccessorBuilder.cs (6)
44if (memberInfo is PropertyInfo propInfo) 72var createGetterGeneric = s_createGetterInternal.MakeGenericMethod(declaringType, propertyType).CreateDelegate<Func<PropertyInfo, Getter>>(); 99if (memberInfo is PropertyInfo propInfo) 129var createSetterGeneric = s_createSetterInternal.MakeGenericMethod(propInfo.DeclaringType!, propInfo.PropertyType).CreateDelegate<Func<PropertyInfo, Setter>>(); 165private static Getter CreateGetterInternal<DeclaringType, PropertyType>(PropertyInfo propInfo) 188private static Setter CreateSetterInternal<DeclaringType, PropertyType>(PropertyInfo propInfo)
System\Runtime\Serialization\ClassDataContract.cs (3)
828if (member is PropertyInfo property) 879PropertyInfo? property = member as PropertyInfo;
System\Runtime\Serialization\CodeGenerator.cs (2)
585else if (memberInfo is PropertyInfo property) 617else if (memberInfo is PropertyInfo property)
System\Runtime\Serialization\DataMember.cs (5)
172else if (MemberInfo is PropertyInfo prop) 253PropertyInfo property = (PropertyInfo)memberInfo; 278PropertyInfo property = (PropertyInfo)memberInfo;
System\Runtime\Serialization\Json\JsonFormatGeneratorStatics.cs (15)
19private static PropertyInfo? s_collectionItemNameProperty; 39private static PropertyInfo? s_localNameProperty; 41private static PropertyInfo? s_namespaceProperty; 45private static PropertyInfo? s_nodeTypeProperty; 57private static PropertyInfo? s_typeHandleProperty; 61private static PropertyInfo? s_useSimpleDictionaryFormatReadProperty; 63private static PropertyInfo? s_useSimpleDictionaryFormatWriteProperty; 96public static PropertyInfo CollectionItemNameProperty 112public static PropertyInfo ExtensionDataProperty => field ??= typeof(IExtensibleDataObject).GetProperty("ExtensionData")!; 216public static PropertyInfo LocalNameProperty 228public static PropertyInfo NamespaceProperty 264public static PropertyInfo NodeTypeProperty 339public static PropertyInfo TypeHandleProperty 363public static PropertyInfo UseSimpleDictionaryFormatReadProperty 375public static PropertyInfo UseSimpleDictionaryFormatWriteProperty
System\Runtime\Serialization\Json\JsonFormatWriterGenerator.cs (3)
162private void ThrowIfCannotSerializeReadOnlyTypes(PropertyInfo serializationExceptionMessageProperty) 439PropertyInfo genericDictionaryKeyProperty = genericDictionaryKeyValueType.GetProperty(JsonGlobals.KeyString)!; 440PropertyInfo genericDictionaryValueProperty = genericDictionaryKeyValueType.GetProperty(JsonGlobals.ValueString)!;
System\Runtime\Serialization\XmlFormatGeneratorStatics.cs (17)
71internal static PropertyInfo ExtensionDataProperty => field ??= typeof(IExtensibleDataObject).GetProperty("ExtensionData")!; 191private static PropertyInfo? s_nodeTypeProperty; 192internal static PropertyInfo NodeTypeProperty 868private static PropertyInfo? s_namespaceProperty; 869internal static PropertyInfo NamespaceProperty 912private static PropertyInfo? s_childElementNamespacesProperty; 913internal static PropertyInfo ChildElementNamespacesProperty 927private static PropertyInfo? s_collectionItemNameProperty; 928internal static PropertyInfo CollectionItemNameProperty 941private static PropertyInfo? s_childElementNamespaceProperty; 942internal static PropertyInfo ChildElementNamespaceProperty 1054private static PropertyInfo? s_serializeReadOnlyTypesProperty; 1055internal static PropertyInfo SerializeReadOnlyTypesProperty 1068private static PropertyInfo? s_classSerializationExceptionMessageProperty; 1069internal static PropertyInfo ClassSerializationExceptionMessageProperty 1082private static PropertyInfo? s_collectionSerializationExceptionMessageProperty; 1083internal static PropertyInfo CollectionSerializationExceptionMessageProperty
System\Runtime\Serialization\XmlFormatWriterGenerator.cs (1)
195private void ThrowIfCannotSerializeReadOnlyTypes(PropertyInfo serializationExceptionMessageProperty)
System.Private.Reflection.Execution (2)
Internal\Reflection\Execution\TypeLoader\ConstraintValidatorSupport.cs (2)
170public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) { Debug.Assert(false); throw NotImplemented.ByDesign; } 188protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers) { Debug.Assert(false); throw NotImplemented.ByDesign; }
System.Private.Windows.Core.TestUtilities (8)
DebuggerAttributes.cs (6)
14public IEnumerable<PropertyInfo> Properties { get; set; } 27foreach (PropertyInfo pi in info.Properties) 50IEnumerable<PropertyInfo> properties = GetDebuggerVisibleProperties(proxyType); 74public static IEnumerable<PropertyInfo> GetDebuggerVisibleProperties(Type debuggerAttributeType) 77IEnumerable<PropertyInfo> visibleProperties = debuggerAttributeType.GetProperties() 215private static PropertyInfo GetProperty(object obj, string propertyName)
TestAccessor.cs (2)
167case PropertyInfo propertyInfo: 198PropertyInfo propertyInfo => propertyInfo.GetValue(_instance),
System.Private.Xml (52)
System\Xml\Serialization\CodeGenerator.cs (11)
496private static MethodInfo? GetPropertyMethodFromBaseType(PropertyInfo propertyInfo, bool isGetter) 501PropertyInfo? currentProperty; 552System.Diagnostics.Debug.Assert(memberInfo is PropertyInfo); 553PropertyInfo property = (PropertyInfo)memberInfo; 585System.Diagnostics.Debug.Assert(memberInfo is PropertyInfo); 586PropertyInfo property = (PropertyInfo)memberInfo; 620System.Diagnostics.Debug.Assert(memberInfo is PropertyInfo); 621PropertyInfo property = (PropertyInfo)memberInfo;
System\Xml\Serialization\Models.cs (9)
171if (!(members[i] is PropertyInfo)) 179if (members[i] is PropertyInfo) 193else if (memberInfo is PropertyInfo) 194model = GetPropertyModel((PropertyInfo)memberInfo); 231private FieldModel? GetPropertyModel(PropertyInfo propertyInfo) 247internal static bool CheckPropertyRead(PropertyInfo propertyInfo) 315PropertyInfo? specifiedProperty = memberInfo.DeclaringType.GetProperty($"{memberInfo.Name}Specified"); 329if (memberInfo is PropertyInfo) 331_readOnly = !((PropertyInfo)memberInfo).CanWrite;
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (7)
617if (memberInfo is PropertyInfo propInfo) 633if (memberInfo is PropertyInfo propInfo) 662if (memberInfo is PropertyInfo propertyInfo) 1068else if (memberInfo is PropertyInfo propertyInfo) 1664var pi = member.Mapping.MemberInfo as PropertyInfo; 2125if (memberInfo is PropertyInfo propInfo)
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (5)
821if (memberInfo is PropertyInfo memberProperty) 1469if (memberInfo is PropertyInfo propInfo && propInfo.GetMethod == null) 1477if (mi is PropertyInfo pi && pi.GetMethod != null && pi.PropertyType == propInfo.PropertyType) 1496if (memberInfo is PropertyInfo propInfo && propInfo.SetMethod == null) 1504if (mi is PropertyInfo pi && pi.SetMethod != null && pi.PropertyType == propInfo.PropertyType)
System\Xml\Serialization\SoapReflectionImporter.cs (1)
389if (!(memberInfo is FieldInfo) && !(memberInfo is PropertyInfo))
System\Xml\Serialization\SourceInfo.cs (1)
177((FieldInfo)MemberInfo).FieldType : ((PropertyInfo)MemberInfo).PropertyType;
System\Xml\Serialization\Types.cs (10)
1142PropertyInfo? propertyInfo = memberInfo as PropertyInfo; 1168private static bool CanWriteProperty(PropertyInfo propertyInfo, TypeDesc typeDesc) 1260foreach (PropertyInfo info in currentType.GetProperties(DeclaredOnlyLookup)) 1272&& memberInfoToBeReplaced is PropertyInfo 1273&& ((PropertyInfo)memberInfoToBeReplaced).GetMethod!.IsPublic 1371PropertyInfo? p = enumerator.ReturnType.GetProperty("Current"); 1393internal static PropertyInfo GetDefaultIndexer( 1409PropertyInfo? indexer = null; 1416if (defaultMembers[i] is PropertyInfo defaultProp)
System\Xml\Serialization\XmlReflectionImporter.cs (2)
853if (!(memberInfo is FieldInfo || memberInfo is PropertyInfo)) 1479PropertyInfo? info = structModel.Type.GetProperty(choice.MemberName, BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static);
System\Xml\Serialization\XmlSerializationILGen.cs (1)
586Type memType = (memInfo is FieldInfo) ? ((FieldInfo)memInfo).FieldType : ((PropertyInfo)memInfo).PropertyType;
System\Xml\Serialization\XmlSerializationReaderILGen.cs (1)
2792ilg.ConvertValue(stackType, memInfo is FieldInfo ? ((FieldInfo)memInfo).FieldType : ((PropertyInfo)memInfo).PropertyType);
System\Xml\Serialization\XmlSerializationWriter.cs (3)
1734typeof(FieldInfo).FullName, typeof(PropertyInfo).FullName)); 1825if (memberInfos[i] is PropertyInfo) 1885PropertyInfo defaultIndexer = TypeScope.GetDefaultIndexer(type, null);
System\Xml\Serialization\XmlSerializationWriterILGen.cs (1)
2513PropertyInfo propInfo = CodeGenerator.GetVariableType(fixup).GetProperty(vars[1])!;
System.Reflection (1)
System.Reflection.cs (1)
29[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.PropertyInfo))]
System.Reflection.Context (44)
System\Reflection\Context\Custom\AttributeUtils.cs (1)
101PropertyInfo provider = property.UnderlyingProperty;
System\Reflection\Context\Custom\CustomPropertyInfo.cs (1)
10public CustomPropertyInfo(PropertyInfo template, CustomReflectionContext context)
System\Reflection\Context\Custom\CustomType.cs (19)
45public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) 48PropertyInfo[] properties = base.GetProperties(bindingAttr); 58List<PropertyInfo> results = new List<PropertyInfo>(properties); 69IEnumerable<PropertyInfo> newProperties = baseType.NewProperties; 73foreach (PropertyInfo prop in newProperties) 83protected override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) 85PropertyInfo? property = base.GetPropertyImpl(name, bindingAttr, binder, returnType, types, modifiers); 102List<PropertyInfo> matchingProperties = new List<PropertyInfo>(); 114foreach (PropertyInfo newDeclaredProperty in type.NewProperties) 124foreach (PropertyInfo newBaseProperty in type.NewProperties) 156foreach (PropertyInfo prop in NewProperties) 169foreach (PropertyInfo prop in baseType.NewProperties) 171PropertyInfo inheritedProperty = new InheritedPropertyInfo(prop, this); 223foreach (PropertyInfo newDeclaredProperty in NewProperties) 242foreach (PropertyInfo newBaseProperty in baseType.NewProperties) 246PropertyInfo inheritedProperty = new InheritedPropertyInfo(newBaseProperty, this); 283private IEnumerable<PropertyInfo> NewProperties => field ??= ReflectionContext.GetNewPropertiesForType(this);
System\Reflection\Context\CustomReflectionContext.cs (8)
99protected virtual IEnumerable<PropertyInfo> AddProperties(Type type) 114/// Objects that are returned by this method are not complete <see cref="PropertyInfo"/> objects, and should be used only in the context of the <see cref="AddProperties(Type)"/> method. 116protected PropertyInfo CreateProperty( 145/// Objects that are returned by this method are not complete <see cref="PropertyInfo"/> objects, and should be used only in the context of the <see cref="AddProperties(Type)"/> method. 147protected PropertyInfo CreateProperty( 167internal IEnumerable<PropertyInfo> GetNewPropertiesForType(CustomType type) 174IEnumerable<PropertyInfo> newProperties = AddProperties(type.UnderlyingType); 177foreach (PropertyInfo prop in newProperties)
System\Reflection\Context\CustomReflectionContext.Projector.cs (3)
144public override PropertyInfo? ProjectProperty(PropertyInfo? value) 251output = ProjectProperty((PropertyInfo)value);
System\Reflection\Context\Delegation\DelegatingPropertyInfo.cs (2)
12public DelegatingPropertyInfo(PropertyInfo property) 64public PropertyInfo UnderlyingProperty { get; }
System\Reflection\Context\Delegation\DelegatingType.cs (3)
376public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) 381protected override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) 384PropertyInfo? property;
System\Reflection\Context\Projection\ProjectingPropertyInfo.cs (1)
14public ProjectingPropertyInfo(PropertyInfo property, Projector projector)
System\Reflection\Context\Projection\ProjectingType.cs (3)
233PropertyInfo[] properties = GetProperties(bindingAttr); 282public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) 287protected override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers)
System\Reflection\Context\Projection\Projector.cs (2)
62public abstract PropertyInfo? ProjectProperty(PropertyInfo? value);
System\Reflection\Context\Virtual\InheritedPropertyInfo.cs (1)
15public InheritedPropertyInfo(PropertyInfo baseProperty, Type reflectedType)
System.Reflection.DispatchProxy (4)
src\runtime\src\libraries\Common\src\System\Reflection\Emit\IgnoreAccessChecksToAttributeBuilder.cs (2)
83PropertyInfo allowMultipleProperty = 91new PropertyInfo[] { allowMultipleProperty },
System\Reflection\DispatchProxyGenerator.cs (2)
334foreach (PropertyInfo pi in iface.GetRuntimeProperties()) 384foreach (PropertyInfo pi in iface.GetRuntimeProperties())
System.Reflection.Emit (25)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (2)
436protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, 443public override PropertyInfo[] GetProperties(BindingFlags bindingAttr)
System\Reflection\Emit\EnumBuilderImpl.cs (2)
132public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) => throw new NotSupportedException(); 134protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder,
System\Reflection\Emit\GenericTypeParameterBuilderImpl.cs (2)
124protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(); 126public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) => throw new NotSupportedException();
System\Reflection\Emit\ILGeneratorImpl.cs (1)
581PropertyInfo argCountProperty = typeof(SignatureHelper).GetProperty("ArgumentCount", BindingFlags.NonPublic | BindingFlags.Instance)!;
System\Reflection\Emit\TypeBuilderImpl.cs (18)
999private PropertyInfo[] GetProperties(string name, BindingFlags bindingAttr) 1003PropertyInfo[] candidates = GetProperties(bindingAttr); 1004List<PropertyInfo> properties = new List<PropertyInfo>(); 1005foreach (PropertyInfo property in candidates) 1017public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) 1021List<PropertyInfo> candidates = new List<PropertyInfo>(_propertyDefinitions.Count); 1040protected override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, 1045List<PropertyInfo> candidates = GetPropertyCandidates(name, bindingAttr, types); 1053PropertyInfo firstCandidate = candidates[0]; 1077private List<PropertyInfo> GetPropertyCandidates(string name, BindingFlags bindingAttr, Type[]? types) 1079PropertyInfo[] properties = GetProperties(bindingAttr); 1081List<PropertyInfo> candidates = new List<PropertyInfo>(properties.Length); 1084PropertyInfo propertyInfo = properties[i]; 1171PropertyInfo[] properties = []; 1331PropertyInfo[] properties = GetProperties(bindingAttr);
System.Reflection.MetadataLoadContext (49)
System\Reflection\DefaultBinder.cs (10)
147public sealed override PropertyInfo? SelectProperty(BindingFlags bindingAttr, PropertyInfo[] match, Type? returnType, 163PropertyInfo[] candidates = (PropertyInfo[])match.Clone(); 260PropertyInfo bestMatch = candidates[currentMin]; 316public static PropertyInfo? ExactPropertyBinding(PropertyInfo[] match, Type? returnType, Type[]? types) 320PropertyInfo? bestMatch = null; 536private static int FindMostSpecificProperty(PropertyInfo cur1, PropertyInfo cur2)
System\Reflection\Runtime\BindingFlagSupport\MemberPolicies.cs (1)
204else if (t.Equals(typeof(PropertyInfo)))
System\Reflection\Runtime\BindingFlagSupport\PropertyPolicies.cs (13)
12internal sealed class PropertyPolicies : MemberPolicies<PropertyInfo> 14public sealed override IEnumerable<PropertyInfo> GetDeclaredMembers(TypeInfo typeInfo) 19public sealed override IEnumerable<PropertyInfo> CoreGetDeclaredMembers(RuntimeTypeInfo type, NameFilter? filter, RuntimeTypeInfo reflectedType) 26public sealed override void GetMemberAttributes(PropertyInfo member, out MethodAttributes visibility, out bool isStatic, out bool isVirtual, out bool isNewSlot) 49public sealed override bool ImplicitlyOverrides(PropertyInfo? baseMember, PropertyInfo? derivedMember) 60public sealed override bool IsSuppressedByMoreDerivedMember(PropertyInfo member, PropertyInfo[] priorMembers, int startIndex, int endIndex) 65PropertyInfo prior = priorMembers[i]; 79public sealed override bool OkToIgnoreAmbiguity(PropertyInfo m1, PropertyInfo m2) 84private static MethodInfo? GetAccessorMethod(PropertyInfo property) => 87private static MethodInfo? GetMostAccessibleAccessor(PropertyInfo property)
System\Reflection\TypeLoading\RuntimeTypeInfo.BindingFlags.cs (9)
106public sealed override PropertyInfo[] GetProperties(BindingFlags bindingAttr) => Query<PropertyInfo>(bindingAttr).ToArray(); 108protected sealed override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) 118return Query<PropertyInfo>(name, bindingAttr).Disambiguate(); 123QueryResult<PropertyInfo> queryResult = Query<PropertyInfo>(name, bindingAttr); 124ListBuilder<PropertyInfo> candidates = default; 125foreach (PropertyInfo candidate in queryResult) 139PropertyInfo firstCandidate = candidates[0];
System\Reflection\TypeLoading\RuntimeTypeInfo.GetMember.cs (1)
47if ((results = QuerySpecificMemberTypeIfRequested(type, optionalName, bindingAttr, predicate, MemberTypes.Property, out QueryResult<PropertyInfo> properties)) != null)
System\Reflection\TypeLoading\RuntimeTypeInfo.TypeComponentsCache.cs (1)
91perNameCaches[MemberTypeIndex.Property] = new PerNameQueryCache<PropertyInfo>(type, ignoreCase: ignoreCase, immediateTypeOnly: immediateTypeOnly);
System\Reflection\TypeLoading\Types\Ecma\EcmaDefinitionType.BindingFlags.cs (1)
66internal sealed override IEnumerable<PropertyInfo> SpecializeProperties(NameFilter? filter, Type reflectedType, RoInstantiationProviderType declaringType)
System\Reflection\TypeLoading\Types\RoConstructedGenericType.cs (1)
143internal sealed override IEnumerable<PropertyInfo> GetPropertiesCore(NameFilter? filter, Type reflectedType) => _genericTypeDefinition.SpecializeProperties(filter, reflectedType, this);
System\Reflection\TypeLoading\Types\RoDefinitionType.cs (2)
240internal sealed override IEnumerable<PropertyInfo> GetPropertiesCore(NameFilter? filter, Type reflectedType) => SpecializeProperties(filter, reflectedType, this); 247internal abstract IEnumerable<PropertyInfo> SpecializeProperties(NameFilter? filter, Type reflectedType, RoInstantiationProviderType declaringType);
System\Reflection\TypeLoading\Types\RoExceptionType.cs (1)
49internal sealed override IEnumerable<PropertyInfo> SpecializeProperties(NameFilter? filter, Type reflectedType, RoInstantiationProviderType declaringType) => throw null!;
System\Reflection\TypeLoading\Types\RoFunctionPointerType.cs (2)
201internal sealed override IEnumerable<PropertyInfo> GetPropertiesCore(NameFilter? filter, Type reflectedType) => Array.Empty<PropertyInfo>();
System\Reflection\TypeLoading\Types\RoGenericParameterType.cs (2)
92internal sealed override IEnumerable<PropertyInfo> GetPropertiesCore(NameFilter? filter, Type reflectedType) => Array.Empty<PropertyInfo>();
System\Reflection\TypeLoading\Types\RoHasElementType.cs (2)
84internal sealed override IEnumerable<PropertyInfo> GetPropertiesCore(NameFilter? filter, Type reflectedType) => Array.Empty<PropertyInfo>();
System\Reflection\TypeLoading\Types\RoModifiedType.cs (1)
200internal override IEnumerable<PropertyInfo> GetPropertiesCore(NameFilter? filter, Type reflectedType) => throw new NotSupportedException(SR.NotSupported_ModifiedType);
System\Reflection\TypeLoading\Types\RoStubType.cs (1)
81internal sealed override IEnumerable<PropertyInfo> GetPropertiesCore(NameFilter? filter, Type reflectedType) => throw null!;
System\Reflection\TypeLoading\Types\RoType.cs (1)
400internal abstract IEnumerable<PropertyInfo> GetPropertiesCore(NameFilter? filter, Type reflectedType);
System.Reflection.TypeExtensions (12)
System\Reflection\TypeExtensions.cs (12)
290public static PropertyInfo[] GetProperties( 299public static PropertyInfo[] GetProperties( 309public static PropertyInfo? GetProperty( 319public static PropertyInfo? GetProperty( 330public static PropertyInfo? GetProperty( 341public static PropertyInfo? GetProperty( 549public static MethodInfo[] GetAccessors(this PropertyInfo property) 557public static MethodInfo[] GetAccessors(this PropertyInfo property, bool nonPublic) 565public static MethodInfo? GetGetMethod(this PropertyInfo property) 573public static MethodInfo? GetGetMethod(this PropertyInfo property, bool nonPublic) 581public static MethodInfo? GetSetMethod(this PropertyInfo property) 589public static MethodInfo? GetSetMethod(this PropertyInfo property, bool nonPublic)
System.Runtime (1)
src\runtime\artifacts\obj\System.Runtime\Release\net11.0\System.Runtime.Forwards.cs (1)
502[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.PropertyInfo))]
System.Runtime.InteropServices (2)
System\Runtime\InteropServices\Marshalling\ComImportInteropInterfaceDetailsStrategy.cs (2)
137new PropertyInfo[] { s_attributeUsageAllowMultipleProperty }, 171private static readonly PropertyInfo s_attributeUsageAllowMultipleProperty = typeof(AttributeUsageAttribute).GetProperty(nameof(AttributeUsageAttribute.AllowMultiple))!;
System.Security.Cryptography (1)
src\runtime\src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (1)
162PropertyInfo? taskResultProperty = taskOfHttpResponseMessageType?.GetProperty("Result");
System.ServiceModel.Primitives (17)
Extensions\ReflectionExtensions.cs (1)
35public static PropertyInfo GetProperty(this Type type, string name, BindingFlags bindingAttr)
System\ServiceModel\Channels\ServiceChannelProxy.cs (1)
300public PropertyInfo TaskProperty { get; private set; }
System\ServiceModel\Description\TypeLoader.cs (5)
1347if (!(memberInfo is FieldInfo || memberInfo is PropertyInfo)) 1351PropertyInfo property = memberInfo as PropertyInfo; 1397if (memberInfo is PropertyInfo) 1399memberType = ((PropertyInfo)memberInfo).PropertyType;
System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (1)
621part.Type = (member.MemberType == MemberTypes.Property) ? ((PropertyInfo)member).PropertyType : ((FieldInfo)member).FieldType;
System\ServiceModel\Dispatcher\OperationFormatter.cs (4)
651PropertyInfo propertyInfo = memberInfo as PropertyInfo; 665PropertyInfo propertyInfo = memberInfo as PropertyInfo;
System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (1)
31_taskTResultGetMethod = ((PropertyInfo)taskMethod.ReturnType.GetMember(ResultMethodName)[0]).GetGetMethod();
System\ServiceModel\Dispatcher\XmlSerializerOperationFormatter.cs (4)
352PropertyInfo property = member as PropertyInfo; 425PropertyInfo property = member as PropertyInfo;
System.Text.Json (27)
src\runtime\src\libraries\System.Text.Json\Common\ReflectionExtensions.cs (1)
219public static bool IsVirtual(this PropertyInfo propertyInfo)
System\Text\Json\Serialization\Converters\FSharp\FSharpUnionConverter.cs (3)
72PropertyInfo prop = uc.Fields[i]; 562PropertyInfo propertyInfo, 590private static JsonConverter ResolveCustomConverter(JsonConverterAttribute converterAttribute, Type fieldType, PropertyInfo propertyInfo, JsonSerializerOptions options)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Converters.cs (1)
135Debug.Assert(memberInfo is FieldInfo or PropertyInfo);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (6)
169foreach (PropertyInfo propertyInfo in currentType.GetProperties(AllInstanceMembers)) 309private static bool PropertyIsOverriddenAndIgnored(PropertyInfo propertyInfo, Dictionary<string, JsonPropertyInfo>? ignoredMembers) 394case PropertyInfo propertyInfo: 473Debug.Assert(memberInfo is FieldInfo or PropertyInfo); 477case PropertyInfo propertyInfo: 541nullabilityInfo = nullabilityCtx.Create((PropertyInfo)memberInfo);
System\Text\Json\Serialization\Metadata\FSharpCoreReflectionProxy.cs (4)
200PropertyInfo[] fields = (PropertyInfo[])getFields.Invoke(caseInfo, null)!; 378PropertyInfo[] fields, 393public PropertyInfo[] Fields { get; }
System\Text\Json\Serialization\Metadata\MemberAccessor.cs (2)
24public abstract Func<object, TProperty> CreatePropertyGetter<TProperty>(PropertyInfo propertyInfo); 26public abstract Action<object, TProperty> CreatePropertySetter<TProperty>(PropertyInfo propertyInfo);
System\Text\Json\Serialization\Metadata\ReflectionEmitCachingMemberAccessor.cs (4)
66public override Func<object, TProperty> CreatePropertyGetter<TProperty>(PropertyInfo propertyInfo) => 69valueFactory: key => _sourceAccessor.CreatePropertyGetter<TProperty>((PropertyInfo)key.member!)); 71public override Action<object, TProperty> CreatePropertySetter<TProperty>(PropertyInfo propertyInfo) => 74valueFactory: key => _sourceAccessor.CreatePropertySetter<TProperty>((PropertyInfo)key.member!));
System\Text\Json\Serialization\Metadata\ReflectionEmitMemberAccessor.cs (4)
346public override Func<object, TProperty> CreatePropertyGetter<TProperty>(PropertyInfo propertyInfo) => 349private static DynamicMethod CreatePropertyGetter(PropertyInfo propertyInfo, Type runtimePropertyType) 392public override Action<object, TProperty> CreatePropertySetter<TProperty>(PropertyInfo propertyInfo) => 395private static DynamicMethod CreatePropertySetter(PropertyInfo propertyInfo, Type runtimePropertyType)
System\Text\Json\Serialization\Metadata\ReflectionMemberAccessor.cs (2)
143public override Func<object, TProperty> CreatePropertyGetter<TProperty>(PropertyInfo propertyInfo) 153public override Action<object, TProperty> CreatePropertySetter<TProperty>(PropertyInfo propertyInfo)
System.Windows.Controls.Ribbon (1)
Microsoft\Windows\Controls\Ribbon\RibbonMenuButton.cs (1)
1472PropertyInfo property = type.GetProperty("HasPushedMenuMode", BindingFlags.NonPublic | BindingFlags.Instance);
System.Windows.Forms (25)
System\Windows\Forms\Accessibility\AccessibleObject.cs (3)
2925PropertyInfo? IReflect.GetProperty(string name, BindingFlags bindingAttr) 2929PropertyInfo? IReflect.GetProperty( 2939PropertyInfo[] IReflect.GetProperties(BindingFlags bindingAttr)
System\Windows\Forms\ActiveX\AxHost.cs (4)
128private Dictionary<string, PropertyInfo>? _propertyInfos; 2576PropertyInfo[] propInfos = GetType().GetProperties(BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.Instance); 2578foreach (PropertyInfo propInfo in propInfos) 2599_propertyInfos.TryGetValue(propName, out PropertyInfo? propInfo);
System\Windows\Forms\DataBinding\BindingManagerBase.cs (3)
112foreach (PropertyInfo property in listType.GetProperties()) 132foreach (PropertyInfo property in listType.GetProperties()) 176foreach (PropertyInfo property in listType.GetProperties())
System\Windows\Forms\DataBinding\ListBindingHelper.cs (6)
228PropertyInfo? indexer = GetTypedIndexer(listType); 326PropertyInfo? indexer = GetTypedIndexer(type); 539private static PropertyInfo? GetTypedIndexer(Type type) 541PropertyInfo? indexer = null; 548PropertyInfo[] props = type.GetProperties(BindingFlags.Public | BindingFlags.Instance); 588PropertyInfo? indexer = GetTypedIndexer(targetType);
System\Windows\Forms\Input\CursorConverter.cs (9)
57PropertyInfo[] props = GetProperties(); 58foreach (var prop in props) 102PropertyInfo[] props = GetProperties(); 105PropertyInfo prop = props[i]; 122PropertyInfo[] props = GetProperties(); 123foreach (PropertyInfo prop in props) 147private static PropertyInfo[] GetProperties() 163PropertyInfo[] props = GetProperties(); 166PropertyInfo prop = props[i];
System.Windows.Forms.Design (15)
System\ComponentModel\Design\CollectionEditor.cs (2)
176PropertyInfo[] properties = TypeDescriptor.GetReflectionType(CollectionType).GetProperties(BindingFlags.Public | BindingFlags.Instance); 178foreach (var property in properties)
System\ComponentModel\Design\DesignerActionList.cs (3)
31ReadOnlyCollection<PropertyInfo> originalProperties = Array.AsReadOnly( 52PropertyInfo[] properties = GetType().GetProperties(BindingFlags.InvokeMethod | BindingFlags.Instance | BindingFlags.DeclaredOnly | BindingFlags.Public); 53foreach (PropertyInfo info in properties)
System\ComponentModel\Design\DesignerHost.cs (3)
1213PropertyInfo? IReflect.GetProperty(string name, BindingFlags bindingAttr) => typeof(IDesignerHost).GetProperty(name, bindingAttr); 1216PropertyInfo? IReflect.GetProperty(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[] types, ParameterModifier[]? modifiers) => 1220PropertyInfo[] IReflect.GetProperties(BindingFlags bindingAttr) => typeof(IDesignerHost).GetProperties(bindingAttr);
System\ComponentModel\Design\InheritanceService.cs (1)
120PropertyInfo? fieldProp = reflect.GetProperty(propAttr.PropertyName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.ModifiersInheritedExtenderProvider.cs (1)
114PropertyInfo? prop = TypeDescriptor.GetReflectionType(baseType).GetProperty(name, BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static);
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (3)
1511PropertyInfo? propInfo = GetReflectionTypeHelper(manager, target).GetProperty(propertyReferenceEx.PropertyName, BindingFlags.GetProperty | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); 1521PropertyInfo? prop = GetReflectionTypeFromTypeHelper(manager, targetAsType).GetProperty(propertyReferenceEx.PropertyName, BindingFlags.GetProperty | BindingFlags.Static | BindingFlags.Public); 2008else if (descriptor.MemberInfo is PropertyInfo propertyInfo)
System\Drawing\Design\ColorEditor.ColorUI.cs (2)
123PropertyInfo[] props = enumType.GetProperties(); 129PropertyInfo prop = props[i];
System.Windows.Forms.Primitives (2)
Windows\Win32\System\Ole\ClassPropertyDispatchAdapter.cs (2)
44foreach (var property in properties) 320private static (string Name, int DispId, FDEX_PROP_FLAGS Flags) GetPropertyInfo(PropertyInfo info)
System.Xaml (34)
System\Windows\Markup\StaticExtension.cs (1)
136PropertyInfo prop = currentType.GetProperty(name, BindingFlags.Public | BindingFlags.Static);
System\Xaml\Schema\TypeReflector.cs (19)
439internal PropertyInfo LookupProperty(string name) 442PropertyInfo pi = GetNonIndexerProperty(name); 464internal void LookupAllMembers(out ICollection<PropertyInfo> newProperties, 470PropertyInfo[] propList = UnderlyingType.GetProperties(AllProperties_BF); 478internal IList<PropertyInfo> LookupRemainingProperties() 482PropertyInfo[] propList = UnderlyingType.GetProperties(AllProperties_BF); 486private IList<PropertyInfo> FilterProperties(PropertyInfo[] propList, List<XamlMember> knownMembers, bool skipKnownNegatives) 488Dictionary<string, PropertyInfo> result = new Dictionary<string, PropertyInfo>(propList.Length); 491PropertyInfo currentProp = propList[i]; 511PropertyInfo shadowedProp; 536List<PropertyInfo> filteredResult = new List<PropertyInfo>(result.Count); 537foreach (PropertyInfo property in result.Values) 602private PropertyInfo GetNonIndexerProperty(string name) 605PropertyInfo mostDerived = null; 607foreach (PropertyInfo pi in infos) 621private static bool IsPrivate(PropertyInfo pi)
System\Xaml\XamlMember.cs (9)
42public XamlMember(PropertyInfo propertyInfo, XamlSchemaContext schemaContext) 47public XamlMember(PropertyInfo propertyInfo, XamlSchemaContext schemaContext, XamlMemberInvoker invoker) 52internal XamlMember(PropertyInfo propertyInfo, XamlSchemaContext schemaContext, XamlMemberInvoker invoker, MemberReflector reflector) 773PropertyInfo pi = UnderlyingMember as PropertyInfo; 787PropertyInfo pi = UnderlyingMember as PropertyInfo; 1005PropertyInfo pi = underlyingMember as PropertyInfo;
System\Xaml\XamlSchemaContext.cs (1)
628internal virtual XamlMember GetProperty(PropertyInfo pi)
System\Xaml\XamlType.cs (4)
1066ICollection<PropertyInfo> properties; 1073foreach (PropertyInfo pi in properties) 1110PropertyInfo pi = _reflector.LookupProperty(name); 1657IList<PropertyInfo> excludedMembers = _reflector.LookupRemainingProperties();
WindowsFormsIntegration (3)
System\Windows\Integration\PropertyMap.cs (2)
155PropertyInfo property = GetProperty(propertyName); 175private PropertyInfo GetProperty(string propertyName)
System\Windows\Integration\WindowsFormsHostPropertyMap.cs (1)
109PropertyInfo propertyInfo = childControl.GetType().GetProperty("RightToLeftLayout", memberAccess);