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)
24internal 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
1590 references to PropertyInfo
aspire (1)
Commands\SettingsSchemaBuilder.cs (1)
87foreach (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.Cli.Tests (3)
DotNet\ProcessInvocationOptionsTests.cs (3)
54foreach (var property in GetSettableProperties()) 64foreach (var property in GetSettableProperties()) 70private static IEnumerable<PropertyInfo> GetSettableProperties() =>
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.Components.Tests (1)
Shared\DashboardPageTestContext.cs (1)
15private static readonly Lazy<(PropertyInfo ValueProperty, MethodInfo Callback)> s_virtualizeReflection = new(() =>
Aspire.Hosting.Browsers.Tests (1)
ConsoleLoggingTestHelpers.cs (1)
57var timeProviderProperty = typeof(ResourceLoggerService).GetProperty("TimeProvider", BindingFlags.Instance | BindingFlags.NonPublic)
Aspire.Hosting.CodeGeneration.Go (10)
AtsGoCodeGenerator.ApiProjection.cs (1)
1185if (context.Properties.TryGetValue(capability.CapabilityId, out var property))
AtsGoCodeGenerator.cs (1)
291|| context.Properties.TryGetValue(capability.CapabilityId, out var property)
src\Shared\CodeGeneration\AtsTypeSystemCompatibility.cs (8)
15private static readonly PropertyInfo? s_isExperimentalProperty = 17private static readonly PropertyInfo? s_handleIsObsoleteProperty = 19private static readonly PropertyInfo? s_dtoIsObsoleteProperty = 21private static readonly PropertyInfo? s_dtoPropertyIsObsoleteProperty = 23private static readonly PropertyInfo? s_enumIsObsoleteProperty = 25private static readonly PropertyInfo? s_enumValueIsObsoleteProperty = 27private static readonly PropertyInfo? s_exportedValueIsObsoleteProperty = 69private static bool ReadObsolete(PropertyInfo? property, object value, MemberInfo? fallbackMember) =>
Aspire.Hosting.CodeGeneration.Java (5)
JavaLanguageSupport.cs (5)
220var upToDateCheckProperty = commandSpec.GetType().GetProperty(nameof(CommandSpec.UpToDateCheck)); 229var inputsProperty = upToDateCheckType.GetProperty(nameof(CommandUpToDateCheck.Inputs)); 230var outputsProperty = upToDateCheckType.GetProperty(nameof(CommandUpToDateCheck.Outputs)); 231var fileExtensionsProperty = upToDateCheckType.GetProperty(nameof(CommandUpToDateCheck.FileExtensions)); 232var stampFileProperty = upToDateCheckType.GetProperty(nameof(CommandUpToDateCheck.StampFile));
Aspire.Hosting.CodeGeneration.TypeScript (9)
src\Shared\CodeGeneration\AtsTypeSystemCompatibility.cs (8)
15private static readonly PropertyInfo? s_isExperimentalProperty = 17private static readonly PropertyInfo? s_handleIsObsoleteProperty = 19private static readonly PropertyInfo? s_dtoIsObsoleteProperty = 21private static readonly PropertyInfo? s_dtoPropertyIsObsoleteProperty = 23private static readonly PropertyInfo? s_enumIsObsoleteProperty = 25private static readonly PropertyInfo? s_enumValueIsObsoleteProperty = 27private static readonly PropertyInfo? s_exportedValueIsObsoleteProperty = 69private static bool ReadObsolete(PropertyInfo? property, object value, MemberInfo? fallbackMember) =>
TypeScriptApiProjector.cs (1)
1550if (context.Properties.TryGetValue(capability.CapabilityId, out var property))
Aspire.Hosting.CodeGeneration.TypeScript.Tests (2)
AtsTypeScriptCodeGeneratorTests.cs (2)
2382var envVarsProperty = envCallbackContextType.GetProperty("EnvironmentVariables"); 2392var typesProperty = unionAttr.GetType().GetProperty("Types");
Aspire.Hosting.Native.CodeGeneration (17)
src\Aspire.Hosting.RemoteHost\AtsCapabilityScanner.cs (17)
57public Dictionary<string, PropertyInfo> Properties { get; init; } = new(); 150var allProperties = new Dictionary<string, PropertyInfo>(); 384var properties = new Dictionary<string, PropertyInfo>(); 1163foreach (var prop in type.GetProperties(BindingFlags.Public | BindingFlags.Instance)) 1244private static bool IsOptionalDtoProperty(PropertyInfo property) 1294foreach (var property in type.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static)) 1429foreach (var property in typeRef.ClrType.GetProperties(BindingFlags.Public | BindingFlags.Instance)) 1619public Dictionary<string, PropertyInfo> Properties { get; init; } = new(); 1631var properties = new Dictionary<string, PropertyInfo>(); 1649foreach (var property in contextType.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static)) 2033private static bool IsInheritedPropertyExportedByBaseType(Type contextType, PropertyInfo property) 2657private static bool CanWriteAfterInitialization(PropertyInfo property) 3335private static bool HasExportIgnoreAttribute(PropertyInfo property) 3370private static AspireExportData? GetAspireExportAttribute(PropertyInfo property) 3386private static AspireUnionData? GetAspireUnionAttribute(PropertyInfo property) 3470if (typeInfo.Properties[i].AttributeProvider is PropertyInfo propertyInfo && 3927PropertyInfo property when property.DeclaringType is not null => $"P:{GetXmlDocumentationTypeName(property.DeclaringType)}.{property.Name}",
Aspire.Hosting.RemoteHost (26)
Ats\CapabilityDispatcher.cs (5)
149&& result.Properties.TryGetValue(capability.CapabilityId, out var property)) 178private void RegisterContextTypeProperty(AtsCapabilityInfo capability, PropertyInfo property) 181var prop = property; // Capture for closure 712var resultProperty = taskType.GetProperty("Result"); 905private static IReadOnlyList<Type>? GetUnionMemberClrTypes(PropertyInfo property, AtsCapabilityInfo capability, string parameterName)
AtsCapabilityScanner.cs (17)
57public Dictionary<string, PropertyInfo> Properties { get; init; } = new(); 150var allProperties = new Dictionary<string, PropertyInfo>(); 384var properties = new Dictionary<string, PropertyInfo>(); 1163foreach (var prop in type.GetProperties(BindingFlags.Public | BindingFlags.Instance)) 1244private static bool IsOptionalDtoProperty(PropertyInfo property) 1294foreach (var property in type.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static)) 1429foreach (var property in typeRef.ClrType.GetProperties(BindingFlags.Public | BindingFlags.Instance)) 1619public Dictionary<string, PropertyInfo> Properties { get; init; } = new(); 1631var properties = new Dictionary<string, PropertyInfo>(); 1649foreach (var property in contextType.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static)) 2033private static bool IsInheritedPropertyExportedByBaseType(Type contextType, PropertyInfo property) 2657private static bool CanWriteAfterInitialization(PropertyInfo property) 3335private static bool HasExportIgnoreAttribute(PropertyInfo property) 3370private static AspireExportData? GetAspireExportAttribute(PropertyInfo property) 3386private static AspireUnionData? GetAspireUnionAttribute(PropertyInfo property) 3470if (typeInfo.Properties[i].AttributeProvider is PropertyInfo propertyInfo && 3927PropertyInfo property when property.DeclaringType is not null => $"P:{GetXmlDocumentationTypeName(property.DeclaringType)}.{property.Name}",
AtsContextFilter.cs (4)
155if (context.Properties.TryGetValue(capability.CapabilityId, out var property)) 298if (context.Properties.TryGetValue(capability.CapabilityId, out var property)) 511if (context.Properties.TryGetValue(capability.CapabilityId, out var property)) 658if (context.Properties.TryGetValue(capability.CapabilityId, out var property))
Aspire.Hosting.RemoteHost.Tests (3)
AtsContextFilterTests.cs (1)
90var property = typeof(AtsContext).GetProperty(nameof(AtsContext.Capabilities))!;
AttributeDataReaderTests.cs (2)
57var property = typeof(OfficialResource).GetProperty(nameof(OfficialResource.InternalProp))!; 66var property = typeof(ThirdPartyResource).GetProperty(nameof(ThirdPartyResource.InternalProp))!;
Aspire.Hosting.Tests (19)
ApplicationModel\Docker\DockerfileBuilderCallbackContextTests.cs (1)
78foreach (var property in properties)
Backchannel\BackchannelContractTests.cs (4)
119foreach (var prop in type.GetProperties(BindingFlags.Public | BindingFlags.Instance)) 198var expectedValues = new Dictionary<PropertyInfo, object?>(); 200foreach (var property in requestType.GetProperties(BindingFlags.Public | BindingFlags.Instance)) 337private static object CreateNonDefaultValue(Type requestType, PropertyInfo property, object? defaultValue)
ExecutableResourceBuilderExtensionTests.cs (1)
87var property = typeof(ExecutableAnnotation).GetProperty(nameof(ExecutableAnnotation.WorkingDirectoryExplicitlySet));
FileSystemServiceTests.cs (1)
26var property = typeof(IDistributedApplicationBuilder).GetProperty(nameof(IDistributedApplicationBuilder.FileSystemService));
Pipelines\CorePipelineApiTests.cs (1)
50var property = typeof(IDistributedApplicationBuilder).GetProperty(nameof(IDistributedApplicationBuilder.Pipeline))!;
ResourceNotificationTests.cs (10)
1728var subscription = typeof(ResourceNotificationService).GetProperty("OnResourceUpdated", BindingFlags.Instance | BindingFlags.NonPublic); 2027var property = GetContentProperty( 2049var property = GetContentProperty(typeof(ResourcePropertySnapshot), propertyName); 2098foreach (var property in GetContentProperties(type, excludedPropertyNames)) 2106private static PropertyInfo GetContentProperty(Type type, string propertyName, params string[] excludedPropertyNames) 2111private static PropertyInfo[] GetContentProperties(Type type, params string[] excludedPropertyNames) 2137private static CustomResourceSnapshot MutateProperty(CustomResourceSnapshot snapshot, PropertyInfo property) 2146private static ResourcePropertySnapshot MutateProperty(ResourcePropertySnapshot snapshot, PropertyInfo property) 2155private static void EnsurePropertyCanBeMutated(PropertyInfo property) 2165private static object? CreateDifferentValue(PropertyInfo property, object? currentValue)
WithEndpointTests.cs (1)
107var isProxiedProperty = typeof(EndpointAnnotation).GetProperty(nameof(EndpointAnnotation.IsProxied), BindingFlags.Public | BindingFlags.Instance);
Aspire.Hosting.Yarp (1)
YarpEnvConfigGenerator.cs (1)
93foreach (var property in obj.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance))
Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration.Tests (1)
ConformanceTests.cs (1)
62var minBackoffDurationProperty = options.GetType().GetProperty("MinBackoffDuration", BindingFlags.Instance | BindingFlags.NonPublic);
Aspire.StackExchange.Redis (5)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Shared\PropertyFetcher.cs (5)
103var property = type.DeclaredProperties.FirstOrDefault(p => string.Equals(p.Name, propertyName, StringComparison.OrdinalIgnoreCase)) ?? type.GetProperty(propertyName); 106static PropertyFetch? CreateFetcherForProperty(PropertyInfo? propertyInfo) 130static PropertyFetch? DynamicInstantiationHelper(Type declaringType, PropertyInfo propertyInfo) 167private static PropertyFetchInstantiated<TDeclaredObject> CreateInstantiated<TDeclaredObject>(PropertyInfo propertyInfo) 181public PropertyFetchInstantiated(PropertyInfo property)
Aspire.TypeSystem (7)
AtsContext.cs (1)
99public Dictionary<string, PropertyInfo> Properties { get; } = new();
AttributeDataReader.cs (6)
40public static AspireExportData? GetAspireExportData(PropertyInfo property) 60public static bool HasAspireExportIgnoreData(PropertyInfo property) 88public static AspireValueData? GetAspireValueData(PropertyInfo property) 102public static AspireUnionData? GetAspireUnionData(PropertyInfo property) 137public static bool HasExperimentalData(PropertyInfo property) 152public static ObsoleteData? GetObsoleteData(PropertyInfo property)
Client.TypedClient.IntegrationTests (2)
TypedProxyDuplexTests.4.1.0.cs (2)
429PropertyInfo operationsProperty = typeof(DispatchRuntime).GetProperty("Operations", InstanceMembers); 438PropertyInfo parameterInspectorsProperty = operation.GetType().GetProperty("ParameterInspectors", InstanceMembers);
dotnet-format (1)
Analyzers\Extensions.cs (1)
152var notificationProperty = option.GetType().GetProperty("Notification");
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)
1015PropertyInfo 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;
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");
GenerateDocumentationAndConfigFiles (1)
src\roslyn\src\RoslynAnalyzers\Utilities\Workspaces\SyntaxNodeExtensions.cs (1)
21var property = typeof(Simplifier).GetTypeInfo().GetDeclaredProperty("AddImportsAnnotation");
GetDocument.Insider (1)
src\10222489d73ec07f\HostFactoryResolver.cs (1)
193var servicesProperty = hostType.GetProperty("Services", DeclaredOnlyLookup);
Infrastructure.Common (1)
xunit\ConditionAttribute.cs (1)
116PropertyInfo pi = ti.GetDeclaredProperty(name);
Infrastructure.Tests (1)
PowerShellScripts\SplitTestMatrixByDepsTests.cs (1)
265foreach (var prop in entry.GetType().GetProperties())
Microsoft.AspNetCore.Components (26)
CascadingParameterState.cs (1)
131foreach (var prop in candidateProps)
DefaultComponentPropertyActivator.cs (1)
52foreach (var property in MemberAssignment.GetPropertiesIncludingInherited(type, InjectablePropertyBindingFlags))
PersistentState\PersistentServicesRegistry.cs (2)
188foreach (var propertyInfo in GetCandidateBindableProperties(targetType)) 253internal static IEnumerable<PropertyInfo> GetCandidateBindableProperties(
PersistentState\PersistentValueProviderComponentSubscription.cs (2)
238var propertyInfo = GetPropertyInfo(type, propertyName); 247static PropertyInfo? GetPropertyInfo([DynamicallyAccessedMembers(LinkerFlags.Component)] Type type, string propertyName)
Reflection\ComponentProperties.cs (5)
197internal static IEnumerable<PropertyInfo> GetCandidateBindableProperties([DynamicallyAccessedMembers(Component)] Type targetType) 206var propertyInfo = targetType.GetProperty(parameterName, BindablePropertyFlags); 260foreach (var property in targetType.GetProperties(BindablePropertyFlags)) 278private static void ThrowForInvalidCaptureUnmatchedValuesParameterType(Type targetType, PropertyInfo propertyInfo) 297foreach (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 (19)
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;
Forms\ClientValidationCache.cs (1)
219var property = containerType.GetProperty(propertyName, BindingFlags.Public | BindingFlags.Instance);
SessionCascadingValueSupplier.cs (1)
64var propertyInfo = type.GetProperty(propertyName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
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 (7)
EditContextDataAnnotationsExtensions.cs (4)
46private static readonly ConcurrentDictionary<(Type ModelType, string FieldName), PropertyInfo?> _propertyInfoCache = new(); 87else if (TryGetValidatableProperty(fieldIdentifier, out var propertyInfo)) 246private async Task ValidateFieldWithValidatorAsync(FieldIdentifier fieldIdentifier, PropertyInfo propertyInfo, CancellationToken cancellationToken) 332private static bool TryGetValidatableProperty(in FieldIdentifier fieldIdentifier, [NotNullWhen(true)] out PropertyInfo? propertyInfo)
FieldIdentifier.cs (1)
296PropertyInfo property => property.GetValue(target),
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (2)
192foreach (var property in runtimeProperties) 285PropertyInfo property => closure => (TResult)property.GetValue(closure)!,
Microsoft.AspNetCore.Components.Web (3)
JSComponents\JSComponentInterop.cs (1)
221foreach (var propertyInfo in candidateProperties)
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (2)
192foreach (var property in runtimeProperties) 285PropertyInfo property => closure => (TResult)property.GetValue(closure)!,
Microsoft.AspNetCore.Grpc.JsonTranscoding (5)
Internal\Json\MessageTypeInfoResolver.cs (1)
103var property = field.ContainingType.ClrType.GetProperty(field.PropertyName);
parent\Shared\ServiceDescriptorHelpers.cs (4)
57var property = serviceReflectionType.GetProperty("Descriptor", BindingFlags.Public | BindingFlags.Static); 425var propertyInfo = bodyDescriptor.ContainingType.ClrType.GetProperty(propertyName); 593public PropertyInfo? PropertyInfo { get; } 601PropertyInfo? propertyInfo = null,
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")!; 1586private static Expression GetValueFromProperty(MemberExpression sourceExpression, PropertyInfo itemProperty, string key, Type? returnType = null) 1992private 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)
314var lookupTable = new Dictionary<ParameterLookupKey, PropertyInfo>(properties.Length); 333if (!lookupTable.TryGetValue(key, out var property)) 723public ConstructorParameter(ParameterInfo parameter, PropertyInfo propertyInfo) 730public PropertyInfo PropertyInfo { get; }
src\aspnetcore\src\Shared\PropertyAsParameterInfo.cs (4)
16private readonly PropertyInfo _underlyingProperty; 22public PropertyAsParameterInfo(PropertyInfo propertyInfo, NullabilityInfoContext? nullabilityContext = null) 39public PropertyAsParameterInfo(PropertyInfo property, ParameterInfo parameterInfo, NullabilityInfoContext? nullabilityContext = null) 121foreach (var property in properties)
Microsoft.AspNetCore.Identity.EntityFrameworkCore (6)
IdentityUserContext.cs (6)
223foreach (var p in personalDataProps) 272foreach (var p in tokenProps) 334foreach (var p in personalDataProps) 382foreach (var p in tokenProps) 429foreach (var p in personalDataProps) 477foreach (var p in tokenProps)
Microsoft.AspNetCore.Identity.UI (2)
Areas\Identity\Pages\V4\Account\Manage\DownloadPersonalData.cshtml.cs (1)
64foreach (var p in personalDataProps)
Areas\Identity\Pages\V5\Account\Manage\DownloadPersonalData.cshtml.cs (1)
64foreach (var p in personalDataProps)
Microsoft.AspNetCore.InternalTesting (1)
xunit\ConditionalTheoryDiscoverer.cs (1)
63var property = type.GetProperty("Skip");
Microsoft.AspNetCore.Mvc.Abstractions (9)
ModelBinding\Metadata\ModelMetadataIdentity.cs (3)
47PropertyInfo propertyInfo, 151public 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)
314var lookupTable = new Dictionary<ParameterLookupKey, PropertyInfo>(properties.Length); 333if (!lookupTable.TryGetValue(key, out var property)) 723public ConstructorParameter(ParameterInfo parameter, PropertyInfo propertyInfo) 730public 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)
16private readonly PropertyInfo _underlyingProperty; 22public PropertyAsParameterInfo(PropertyInfo propertyInfo, NullabilityInfoContext? nullabilityContext = null) 39public PropertyAsParameterInfo(PropertyInfo property, ParameterInfo parameterInfo, NullabilityInfoContext? nullabilityContext = null) 121foreach (var property in properties)
Microsoft.AspNetCore.Mvc.Core (43)
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\DefaultModelMetadata.cs (1)
573var propertyInfo = typeof(IUnion).GetProperty(nameof(IUnion.Value))!;
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.Testing (1)
src\10222489d73ec07f\HostFactoryResolver.cs (1)
193var servicesProperty = hostType.GetProperty("Services", DeclaredOnlyLookup);
Microsoft.AspNetCore.Mvc.ViewFeatures (13)
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 (3)
33public IDictionary<PropertyInfo, object> OriginalValues { get; } = new Dictionary<PropertyInfo, object>(); 120private static bool ValidateProperty(TempDataSerializer tempDataSerializer, List<string> errorMessages, PropertyInfo 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.OpenApi (14)
Extensions\TypeExtensions.cs (1)
108if (jsonPropertyInfo.AttributeProvider is not PropertyInfo 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\ParameterBindingMethodCache.cs (4)
314var lookupTable = new Dictionary<ParameterLookupKey, PropertyInfo>(properties.Length); 333if (!lookupTable.TryGetValue(key, out var property)) 723public ConstructorParameter(ParameterInfo parameter, PropertyInfo propertyInfo) 730public PropertyInfo PropertyInfo { get; }
src\aspnetcore\src\Shared\PropertyAsParameterInfo.cs (4)
16private readonly PropertyInfo _underlyingProperty; 22public PropertyAsParameterInfo(PropertyInfo propertyInfo, NullabilityInfoContext? nullabilityContext = null) 39public PropertyAsParameterInfo(PropertyInfo property, ParameterInfo parameterInfo, NullabilityInfoContext? nullabilityContext = null) 121foreach (var property in properties)
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.Server.IntegrationTesting (1)
Common\DeploymentParameters.cs (1)
77foreach (var propertyInfo in typeof(DeploymentParameters).GetProperties())
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.AspNetCore.TestHost (1)
src\10222489d73ec07f\HostFactoryResolver.cs (1)
193var servicesProperty = hostType.GetProperty("Services", DeclaredOnlyLookup);
Microsoft.AspNetCore.Watch.BrowserRefresh (2)
src\sdk\src\Dotnet.Watch\Web.Middleware\BrowserToolsForwarder.cs (2)
47private static readonly PropertyInfo? s_collectHttpResponseDetails = 50private static readonly PropertyInfo? s_httpStatusCode =
Microsoft.Build (6)
BackEnd\Components\Logging\LoggingService.cs (4)
106private static readonly Lazy<PropertyInfo> s_projectStartedEventArgsGlobalProperties = new Lazy<PropertyInfo>(() => typeof(ProjectStartedEventArgs).GetProperty("GlobalProperties", BindingFlags.Public | BindingFlags.Instance), LazyThreadSafetyMode.PublicationOnly); 115private 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)
62PropertyInfo[] infos = TaskType.GetProperties(BindingFlags.Instance | BindingFlags.Public);
Instance\TaskFactories\TaskHostTask.cs (1)
299PropertyInfo parameter = _taskType.Type.GetProperty(property.Name, BindingFlags.Instance | BindingFlags.Public);
Microsoft.Build.Framework (14)
Loader\LoadedType.cs (5)
51parameterTypeForExpansionResolver: (Func<PropertyInfo, Type?>?)null) 64Func<PropertyInfo, (Type? TypeForExpansion, string? DeclaredTypeName)>? parameterTypeInfoResolver) => 84Func<PropertyInfo, Type?>? parameterTypeForExpansionResolver) 108Func<PropertyInfo, (Type? TypeForExpansion, string? DeclaredTypeName)>? parameterTypeInfoResolver) 172PropertyInfo[] props = type.GetProperties(BindingFlags.Instance | BindingFlags.Public);
Loader\TypeLoader.cs (1)
309private static (Type TypeForExpansion, string DeclaredTypeName) ReadParameterTypeInfo(PropertyInfo propertyInfo)
ReflectableTaskPropertyInfo.cs (8)
22private PropertyInfo _propertyInfo; 57internal ReflectableTaskPropertyInfo(PropertyInfo propertyInfo) 73PropertyInfo propertyInfo, 103internal ReflectableTaskPropertyInfo(PropertyInfo propertyInfo, bool output, bool required, Type parameterTypeForExpansion) 108internal ReflectableTaskPropertyInfo(PropertyInfo propertyInfo, bool output, bool required, Type parameterTypeForExpansion, string declaredTypeName) 134internal PropertyInfo Reflection 140PropertyInfo foundProperty = null; 141foreach (PropertyInfo propertyInfo in _taskType.GetProperties(BindingFlags.Instance | BindingFlags.Public))
Microsoft.Build.Tasks.Core (4)
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)
Microsoft.CodeAnalysis.Analyzers (1)
src\roslyn\src\RoslynAnalyzers\Utilities\Workspaces\SyntaxNodeExtensions.cs (1)
21var property = typeof(Simplifier).GetTypeInfo().GetDeclaredProperty("AddImportsAnnotation");
Microsoft.CodeAnalysis.ExternalAccess.Extensions (1)
Internal\ExtensionMessageHandlerWrapper.cs (1)
18private readonly PropertyInfo _responseTaskResultProperty;
Microsoft.CodeAnalysis.NetAnalyzers (4)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Lightup\LightupHelpers.cs (3)
25if (!TryGetProperty<T, TProperty>(type, propertyName, out var property)) 69if (!TryGetProperty<T, TProperty>(type, propertyName, out var property)) 184private static bool TryGetProperty<T, TProperty>([NotNullWhen(true)] Type? type, string propertyName, [NotNullWhen(true)] out PropertyInfo? propertyInfo)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Workspaces\SyntaxNodeExtensions.cs (1)
20var 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)
346var 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)
347var 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.Caching.Hybrid (1)
Internal\DefaultJsonSerializerFactory.cs (1)
101foreach (var prop in props)
Microsoft.Extensions.Caching.Hybrid.Tests (3)
FactoryOptionsTests.cs (3)
394foreach (var prop in contextProps) 403foreach (var prop in contextProps) 405PropertyInfo optionsProp = typeof(HybridCacheEntryOptions).GetProperty(prop.Name, BindingFlags.Public | BindingFlags.Instance)!;
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 (54)
ConfigurationBinder.cs (54)
29private readonly Dictionary<PropertyInfo, PropertyInfo>? _effectiveGetProperties; 30private readonly Dictionary<PropertyInfo, PropertyInfo>? _effectiveSetProperties; 31private readonly Dictionary<PropertyInfo, string>? _configurationKeyNames; 32private readonly HashSet<PropertyInfo>? _ignoredProperties; 35List<PropertyInfo> properties, 36Dictionary<PropertyInfo, PropertyInfo>? effectiveGetProperties, 37Dictionary<PropertyInfo, PropertyInfo>? effectiveSetProperties, 38Dictionary<PropertyInfo, string>? configurationKeyNames, 39HashSet<PropertyInfo>? ignoredProperties) 48public List<PropertyInfo> Properties { get; } 50public PropertyInfo? GetEffectiveGetProperty(PropertyInfo property) 57return _effectiveGetProperties?.TryGetValue(property, out PropertyInfo? getProperty) is true 62public PropertyInfo? GetEffectiveSetProperty(PropertyInfo property) 69return _effectiveSetProperties?.TryGetValue(property, out PropertyInfo? setProperty) is true 74public string GetConfigurationKeyName(PropertyInfo property) 81public bool IsIgnored(PropertyInfo property) => 285foreach (PropertyInfo property in modelProperties.Properties) 307foreach (PropertyInfo property in modelProperties.Properties) 338private static void ResetPropertyValue(PropertyInfo property, in PropertyBindingData properties, object instance, BinderOptions options) 340PropertyInfo? getProperty = properties.GetEffectiveGetProperty(property); 341PropertyInfo? setProperty = properties.GetEffectiveSetProperty(property); 357private static void BindProperty(PropertyInfo property, in PropertyBindingData properties, object instance, IConfiguration config, BinderOptions options) 359PropertyInfo? getProperty = properties.GetEffectiveGetProperty(property); 369PropertyInfo? setProperty = properties.GetEffectiveSetProperty(property); 701foreach (PropertyInfo property in properties.Properties) 782PropertyInfo keyMethod = kvpType.GetProperty("Key", DeclaredOnlyLookup)!; 783PropertyInfo valueMethod = kvpType.GetProperty("Value", DeclaredOnlyLookup)!; 844PropertyInfo indexerProperty = dictionaryType.GetProperty("Item", DeclaredOnlyLookup)!; 1191var allProperties = new List<PropertyInfo>(); 1192Dictionary<PropertyInfo, PropertyInfo>? effectiveGetProperties = null; 1193Dictionary<PropertyInfo, PropertyInfo>? effectiveSetProperties = null; 1194Dictionary<PropertyInfo, string>? configurationKeyNames = null; 1195HashSet<PropertyInfo>? ignoredProperties = null; 1205PropertyInfo[] properties = baseType.GetProperties(DeclaredOnlyLookup); 1207foreach (PropertyInfo property in properties) 1215PropertyInfo? getProperty = GetEffectiveProperty(property, getter: true); 1216PropertyInfo? setProperty = GetEffectiveProperty(property, getter: false); 1293private static PropertyInfo? GetEffectiveProperty(PropertyInfo property, bool getter) 1311PropertyInfo? candidate = GetDeclaredProperty(baseType, property.Name); 1333PropertyInfo? getProperty, 1334PropertyInfo? setProperty, 1346PropertyInfo property, 1364PropertyInfo? candidate = GetDeclaredProperty(baseType, property.Name); 1391private static PropertyInfo? GetDeclaredProperty(Type type, string name) => 1401PropertyInfo property,
Microsoft.Extensions.Diagnostics.HealthChecks.ResourceUtilization (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.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.Documents.Abstractions.Tests (2)
DocumentReferencesTests.cs (2)
36var property = type.GetProperty("Sources")!; 60var indexer = typeof(ExtractionDocumentTableCellCollection).GetProperty("Item")!;
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.Http.Resilience.Tests (1)
Polly\HttpRetryResiliencePipelineBuilderExtensionsTests.cs (1)
176foreach (var property in properties.Where(p => p.Name != nameof(HttpRetryStrategyOptions.ShouldHandle)))
Microsoft.Extensions.Options.DataAnnotations (2)
DataAnnotationValidateOptions.Async.cs (1)
118foreach (PropertyInfo propertyInfo in options.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public))
DataAnnotationValidateOptions.cs (1)
103foreach (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.VectorData.Abstractions (10)
ProviderServices\CollectionModel.cs (1)
210MemberExpression { Member: PropertyInfo clrProperty } member when member.Expression == expression.Parameters[0]
ProviderServices\CollectionModelBuilder.cs (4)
113foreach (var clrProperty in recordType.GetProperties()) 124var clrProperty = recordType.GetProperty(property.ModelName) 178/// As part of building the model, this method processes a single property, accepting both a CLR <see cref="PropertyInfo"/> 183protected virtual void ProcessProperty(PropertyInfo? clrProperty, VectorStoreProperty? definitionProperty)
ProviderServices\Filter\FilterTranslatorBase.cs (2)
316case PropertyInfo { GetMethod.IsStatic: false } propertyInfo when baseValue is null: 319case PropertyInfo propertyInfo:
ProviderServices\PropertyModel.cs (3)
55public PropertyInfo? PropertyInfo { get; set; } 99/// Configures the property accessors using a CLR <see cref="System.Reflection.PropertyInfo"/> for POCO mapping. 103internal void ConfigurePocoAccessors(PropertyInfo propertyInfo)
Microsoft.Extensions.VectorData.Abstractions.Tests (6)
PropertyModelTests.cs (6)
83var propertyInfo = typeof(NrtTestRecord).GetProperty(nameof(NrtTestRecord.NonNullableString))!; 91var propertyInfo = typeof(NrtTestRecord).GetProperty(nameof(NrtTestRecord.NullableString))!; 99var propertyInfo = typeof(NrtTestRecord).GetProperty(nameof(NrtTestRecord.NonNullableByteArray))!; 107var propertyInfo = typeof(NrtTestRecord).GetProperty(nameof(NrtTestRecord.NullableByteArray))!; 115var propertyInfo = typeof(NrtTestRecord).GetProperty(nameof(NrtTestRecord.NonNullableInt))!; 119var nullablePropertyInfo = typeof(NrtTestRecord).GetProperty(nameof(NrtTestRecord.NullableInt))!;
Microsoft.Extensions.VectorData.ConformanceTests (7)
TypeTests\DataTypeTests.cs (7)
164var property = typeof(TRecord).GetProperty(propertyName) 224private static bool IsPropertyNullable(PropertyInfo property) 240private async Task InsertData<TTestType>(PropertyInfo property, TTestType mainValue, TTestType otherValue) 273var propertyInfo = typeof(TRecord).GetProperty(property.Name) 301var pocoProperty = typeof(TRecord).GetProperty(propertyName); 344PropertyInfo property, 407var pocoProperty = typeof(TRecord).GetProperty(propertyName);
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.JSInterop (1)
Infrastructure\TaskGenericsUtil.cs (1)
79private sealed class ReflectionTaskResultGetter(PropertyInfo resultProperty) : ITaskResultGetter
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 (2)
CollectionsDataViewTest.cs (1)
71foreach (var property in typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance))
FastTreeSumupParityTests.cs (1)
145var handlerProp = typeof(IntArray).GetProperty("SumupHandler", BindingFlags.NonPublic | 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)
486var versionCheckProperty = properties.FirstOrDefault(p => string.Equals(p.Name, _versionCheckPropertyName, StringComparison.OrdinalIgnoreCase)); 492var makeRunsettingsCompatibleProperty = properties.FirstOrDefault(p => string.Equals(p.Name, _makeRunsettingsCompatiblePropertyName, StringComparison.OrdinalIgnoreCase));
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 (3)
OutOfProcTaskAppDomainWrapperBase.cs (3)
401PropertyInfo paramInfo = null; 453PropertyInfo[] finalPropertyValues = wrappedTask.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public); 456foreach (PropertyInfo value in finalPropertyValues)
mscorlib (1)
parent\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 (108)
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 (1)
139PropertyInfo propertyInfo = ownerType.GetProperty(localName, 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)
48var otherPropertyInfo = validationContext.ObjectType.GetRuntimeProperty(OtherProperty); 72private string? GetDisplayNameForProperty(PropertyInfo property)
System\ComponentModel\DataAnnotations\LocalizableString.cs (1)
126var property = _resourceType.GetRuntimeProperty(_propertyValue);
System\ComponentModel\DataAnnotations\MaxLengthAttribute.cs (1)
135PropertyInfo? property = value.GetType().GetRuntimeProperty("Count");
System\ComponentModel\DataAnnotations\ValidationAttribute.cs (1)
273var 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)
28return ((PropertyInfo)member).PropertyType; 288foreach (PropertyInfo pi in attrType.GetProperties()) 473List<PropertyInfo> properties = metadataViewType.GetAllProperties().
System\ComponentModel\Composition\MetadataViewGenerator.cs (1)
216foreach (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)
27private readonly List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportBuilder>, Type>> _propertyExports; 28private readonly List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportBuilder>, Type>> _propertyImports; 39_propertyExports = new List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportBuilder>, Type>>(); 40_propertyImports = new List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportBuilder>, Type>>(); 109public PartBuilder ExportProperties(Predicate<PropertyInfo> propertyFilter) 116public PartBuilder ExportProperties(Predicate<PropertyInfo> propertyFilter, 117Action<PropertyInfo, ExportBuilder> exportConfiguration) 127public PartBuilder ExportProperties<T>(Predicate<PropertyInfo> propertyFilter) 134public PartBuilder ExportProperties<T>(Predicate<PropertyInfo> propertyFilter, 135Action<PropertyInfo, ExportBuilder> exportConfiguration) 145public PartBuilder ImportProperties(Predicate<PropertyInfo> propertyFilter) 152public PartBuilder ImportProperties(Predicate<PropertyInfo> propertyFilter, 153Action<PropertyInfo, ImportBuilder> importConfiguration) 162public PartBuilder ImportProperties<T>(Predicate<PropertyInfo> propertyFilter) 169public PartBuilder ImportProperties<T>(Predicate<PropertyInfo> propertyFilter, 170Action<PropertyInfo, ImportBuilder> importConfiguration) 420foreach (PropertyInfo pi in type.GetProperties()) 423PropertyInfo declaredPi = pi.DeclaringType.UnderlyingSystemType.GetProperty(pi.Name, pi.PropertyType); 429foreach (Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportBuilder>, Type> importSpecification in _propertyImports) 469foreach (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)
31private readonly List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportConventionBuilder>, Type>> _propertyExports; 32private readonly List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportConventionBuilder>>> _propertyImports; 42_propertyExports = new List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportConventionBuilder>, Type>>(); 43_propertyImports = new List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportConventionBuilder>>>(); 177public PartConventionBuilder ExportProperties(Predicate<PropertyInfo> propertyFilter) 190public PartConventionBuilder ExportProperties(Predicate<PropertyInfo> propertyFilter, 191Action<PropertyInfo, ExportConventionBuilder> exportConfiguration) 199private PartConventionBuilder ExportPropertiesImpl(Predicate<PropertyInfo> propertyFilter, 200Action<PropertyInfo, ExportConventionBuilder> exportConfiguration) 212public PartConventionBuilder ExportProperties<T>(Predicate<PropertyInfo> propertyFilter) 226public PartConventionBuilder ExportProperties<T>(Predicate<PropertyInfo> propertyFilter, 227Action<PropertyInfo, ExportConventionBuilder> exportConfiguration) 235private PartConventionBuilder ExportPropertiesImpl<T>(Predicate<PropertyInfo> propertyFilter, 236Action<PropertyInfo, ExportConventionBuilder> exportConfiguration) 247public PartConventionBuilder ImportProperties(Predicate<PropertyInfo> propertyFilter) 260public PartConventionBuilder ImportProperties(Predicate<PropertyInfo> propertyFilter, 261Action<PropertyInfo, ImportConventionBuilder> importConfiguration) 269private PartConventionBuilder ImportPropertiesImpl(Predicate<PropertyInfo> propertyFilter, 270Action<PropertyInfo, ImportConventionBuilder> importConfiguration) 282public PartConventionBuilder ImportProperties<T>(Predicate<PropertyInfo> propertyFilter) 296public PartConventionBuilder ImportProperties<T>(Predicate<PropertyInfo> propertyFilter, 297Action<PropertyInfo, ImportConventionBuilder> importConfiguration) 305private PartConventionBuilder ImportPropertiesImpl<T>(Predicate<PropertyInfo> propertyFilter, 306Action<PropertyInfo, ImportConventionBuilder> importConfiguration) 308Predicate<PropertyInfo> typedFilter = pi => pi.PropertyType.Equals(typeof(T)) && (propertyFilter == null || propertyFilter(pi)); 664foreach (PropertyInfo pi in type.GetRuntimeProperties()) 671PropertyInfo underlyingPi = null; 674foreach (Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportConventionBuilder>> importSpecification in _propertyImports) 711foreach (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)
763PropertyInfo? propertyInfo = typeInfo.GetDeclaredProperty(propertyName); 766foreach (PropertyInfo pi in typeInfo.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static)) 810private static PropertyFetch CreatePropertyFetch(Type type, PropertyInfo propertyInfo) 834public RefTypedFetchProperty(Type type, PropertyInfo property) : base(type) 853public ValueTypedFetchProperty(Type type, PropertyInfo property) : base(type) 876public ReflectionPropertyFetch(Type type, PropertyInfo property) : base(type) 1015foreach (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) 2343Debug.Assert(member.Member is PropertyInfo); 2344var property = (PropertyInfo)member.Member; 2502var pi = (PropertyInfo)member; 2765if (memberMember.Member is PropertyInfo && type.IsValueType) 2782var pi = member as PropertyInfo; 3232private readonly PropertyInfo _property; 3234public 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.Security (1)
src\runtime\src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (1)
162PropertyInfo? taskResultProperty = taskOfHttpResponseMessageType?.GetProperty("Result");
System.Private.CoreLib (110)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Attribute.cs (10)
149private static Attribute[] InternalGetCustomAttributes(PropertyInfo element, Type type, bool inherit) 163PropertyInfo? baseProp = GetParentDefinition(element, indexParamTypes); 186private static bool InternalIsDefined(PropertyInfo element, Type attributeType, bool inherit) 202PropertyInfo? baseProp = GetParentDefinition(element, indexParamTypes); 219private static PropertyInfo? GetParentDefinition(PropertyInfo property, Type[] propertyParameters) 513private static Type[] GetIndexParameterTypes(PropertyInfo element) 595MemberTypes.Property => InternalGetCustomAttributes((PropertyInfo)element, attributeType, inherit), 612MemberTypes.Property => InternalGetCustomAttributes((PropertyInfo)element, typeof(Attribute), inherit), 634MemberTypes.Property => InternalIsDefined((PropertyInfo)element, attributeType, inherit),
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)
3394PropertyInfo 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)"/>. 179public static Func<PropertyValue, PropertyValue> GetPropertyGetter(PropertyInfo property) 193private static Func<PropertyValue, PropertyValue> GetBoxedValueTypePropertyGetter(PropertyInfo property) 214private static Func<PropertyValue, PropertyValue> GetReferenceTypePropertyGetter(PropertyInfo property) 222public abstract Func<PropertyValue, PropertyValue> GetPropertyGetter(PropertyInfo property); 226protected static Delegate GetGetMethod(PropertyInfo property, Type propertyType) 234private static Func<TContainer, TProperty> GetGetMethod<TProperty>(PropertyInfo property) where TProperty : struct => 237public 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)
438protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, 445public 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\RuntimeCustomAttributeData.cs (2)
249PropertyInfo[] properties = m_ctor.DeclaringType.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); 263foreach (PropertyInfo pi in properties)
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)
114protected override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, 124public 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 (10)
13internal sealed class PropertyPolicies : MemberPolicies<PropertyInfo> 19public sealed override IEnumerable<PropertyInfo> CoreGetDeclaredMembers(RuntimeTypeInfo type, NameFilter? optionalNameFilter, RuntimeTypeInfo reflectedType) 26public sealed override void GetMemberAttributes(PropertyInfo member, out MethodAttributes visibility, out bool isStatic, out bool isVirtual, out bool isNewSlot) 53public sealed override bool IsSuppressedByMoreDerivedMember(PropertyInfo member, PropertyInfo[] priorMembers, int startIndex, int endIndex) 58PropertyInfo prior = priorMembers[i]; 72public sealed override bool OkToIgnoreAmbiguity(PropertyInfo m1, PropertyInfo m2) 77private static MethodInfo? GetAccessorMethod(PropertyInfo property) 88private 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)
98public PropertyInfo[] GetProperties(BindingFlags bindingAttr) => Query<PropertyInfo>(PropertyPolicies.Instance, bindingAttr).ToArray(); 100public PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers) 110return Query<PropertyInfo>(PropertyPolicies.Instance, name, bindingAttr).Disambiguate(); 115QueryResult<PropertyInfo> queryResult = Query<PropertyInfo>(PropertyPolicies.Instance, name, bindingAttr); 116ListBuilder<PropertyInfo> candidates = default; 117foreach (PropertyInfo candidate in queryResult) 132PropertyInfo 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)
46QueryResult<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)
763protected override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) 767public 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)
833if (member is PropertyInfo property) 884PropertyInfo? 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)
72internal static PropertyInfo ExtensionDataProperty => field ??= typeof(IExtensibleDataObject).GetProperty("ExtensionData")!; 192private static PropertyInfo? s_nodeTypeProperty; 193internal static PropertyInfo NodeTypeProperty 860private static PropertyInfo? s_namespaceProperty; 861internal static PropertyInfo NamespaceProperty 904private static PropertyInfo? s_childElementNamespacesProperty; 905internal static PropertyInfo ChildElementNamespacesProperty 919private static PropertyInfo? s_collectionItemNameProperty; 920internal static PropertyInfo CollectionItemNameProperty 933private static PropertyInfo? s_childElementNamespaceProperty; 934internal static PropertyInfo ChildElementNamespaceProperty 1046private static PropertyInfo? s_serializeReadOnlyTypesProperty; 1047internal static PropertyInfo SerializeReadOnlyTypesProperty 1060private static PropertyInfo? s_classSerializationExceptionMessageProperty; 1061internal static PropertyInfo ClassSerializationExceptionMessageProperty 1074private static PropertyInfo? s_collectionSerializationExceptionMessageProperty; 1075internal 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 (53)
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 (8)
626if (memberInfo is PropertyInfo propInfo) 642if (memberInfo is PropertyInfo propInfo) 671if (memberInfo is PropertyInfo propertyInfo) 1166else if (memberInfo is PropertyInfo propertyInfo) 1759var pi = member.Mapping.MemberInfo as PropertyInfo; 1907if (memberInfo is PropertyInfo pi && pi.GetSetMethod(nonPublic: true) == null) 2262if (memberInfo is PropertyInfo propInfo)
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (5)
979if (memberInfo is PropertyInfo memberProperty) 1631if (memberInfo is PropertyInfo propInfo && propInfo.GetMethod == null) 1639if (mi is PropertyInfo pi && pi.GetMethod != null && pi.PropertyType == propInfo.PropertyType) 1658if (memberInfo is PropertyInfo propInfo && propInfo.SetMethod == null) 1666if (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)) 1480PropertyInfo? 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)
2909ilg.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)
2556PropertyInfo 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); 239foreach (PropertyInfo newDeclaredProperty in NewProperties) 258foreach (PropertyInfo newBaseProperty in baseType.NewProperties) 262PropertyInfo inheritedProperty = new InheritedPropertyInfo(newBaseProperty, this); 299private IEnumerable<PropertyInfo> NewProperties => field ??= ReflectionContext.GetNewPropertiesForType(this);
System\Reflection\Context\CustomReflectionContext.cs (8)
139protected virtual IEnumerable<PropertyInfo> AddProperties(Type type) 154/// 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. 156protected PropertyInfo CreateProperty( 185/// 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. 187protected PropertyInfo CreateProperty( 207internal IEnumerable<PropertyInfo> GetNewPropertiesForType(CustomType type) 214IEnumerable<PropertyInfo> newProperties = AddProperties(type.UnderlyingType); 217foreach (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)
454public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) 459protected override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) 462PropertyInfo? property;
System\Reflection\Context\Projection\ProjectingPropertyInfo.cs (1)
14public ProjectingPropertyInfo(PropertyInfo property, Projector projector)
System\Reflection\Context\Projection\ProjectingType.cs (3)
257PropertyInfo[] properties = GetProperties(bindingAttr); 313public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) 318protected 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)
438protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, 445public 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)
125protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(); 127public 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)
1000private PropertyInfo[] GetProperties(string name, BindingFlags bindingAttr) 1004PropertyInfo[] candidates = GetProperties(bindingAttr); 1005List<PropertyInfo> properties = new List<PropertyInfo>(); 1006foreach (PropertyInfo property in candidates) 1018public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) 1022List<PropertyInfo> candidates = new List<PropertyInfo>(_propertyDefinitions.Count); 1041protected override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, 1046List<PropertyInfo> candidates = GetPropertyCandidates(name, bindingAttr, types); 1054PropertyInfo firstCandidate = candidates[0]; 1078private List<PropertyInfo> GetPropertyCandidates(string name, BindingFlags bindingAttr, Type[]? types) 1080PropertyInfo[] properties = GetProperties(bindingAttr); 1082List<PropertyInfo> candidates = new List<PropertyInfo>(properties.Length); 1085PropertyInfo propertyInfo = properties[i]; 1172PropertyInfo[] properties = []; 1332PropertyInfo[] 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\net12.0\System.Runtime.Forwards.cs (1)
509[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.ServiceModel.Primitives.Tests (1)
Channels\TransactionFlowBindingElementTest.cs (1)
516var prop = s_formatterType.GetProperty(propertyName,
System.Text.Json (37)
parent\Common\ReflectionExtensions.cs (1)
222public 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)
147Debug.Assert(memberInfo is FieldInfo or PropertyInfo);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (6)
611foreach (PropertyInfo propertyInfo in currentType.GetProperties(AllInstanceMembers)) 751private static bool PropertyIsOverriddenAndIgnored(PropertyInfo propertyInfo, Dictionary<string, JsonPropertyInfo>? ignoredMembers) 836case PropertyInfo propertyInfo: 915Debug.Assert(memberInfo is FieldInfo or PropertyInfo); 919case PropertyInfo propertyInfo: 983nullabilityInfo = nullabilityCtx.Create((PropertyInfo)memberInfo);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Union.cs (4)
147PropertyInfo? valueProperty = GetUnionValueProperty(); 216PropertyInfo valueProperty, 417private static PropertyInfo? GetUnionValueProperty() 419PropertyInfo? valueProperty = typeof(TUnion).GetProperty("Value", BindingFlags.Public | BindingFlags.Instance);
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 (3)
64public abstract Func<object, TProperty> CreatePropertyGetter<TProperty>(PropertyInfo propertyInfo); 66public abstract Func<TDeclaringType, TProperty> CreatePropertyGetter<TDeclaringType, TProperty>(PropertyInfo propertyInfo); 68public abstract Action<object, TProperty> CreatePropertySetter<TProperty>(PropertyInfo propertyInfo);
System\Text\Json\Serialization\Metadata\ReflectionEmitCachingMemberAccessor.cs (6)
71public override Func<object, TProperty> CreatePropertyGetter<TProperty>(PropertyInfo propertyInfo) => 74valueFactory: key => _sourceAccessor.CreatePropertyGetter<TProperty>((PropertyInfo)key.member!)); 76public override Func<TDeclaringType, TProperty> CreatePropertyGetter<TDeclaringType, TProperty>(PropertyInfo propertyInfo) => 79valueFactory: key => _sourceAccessor.CreatePropertyGetter<TDeclaringType, TProperty>((PropertyInfo)key.member!)); 81public override Action<object, TProperty> CreatePropertySetter<TProperty>(PropertyInfo propertyInfo) => 84valueFactory: key => _sourceAccessor.CreatePropertySetter<TProperty>((PropertyInfo)key.member!));
System\Text\Json\Serialization\Metadata\ReflectionEmitMemberAccessor.cs (6)
409public override Func<object, TProperty> CreatePropertyGetter<TProperty>(PropertyInfo propertyInfo) => 412public override Func<TDeclaringType, TProperty> CreatePropertyGetter<TDeclaringType, TProperty>(PropertyInfo propertyInfo) => 415private static DynamicMethod CreatePropertyGetter(PropertyInfo propertyInfo, Type runtimePropertyType) 458private static DynamicMethod CreatePropertyGetter(PropertyInfo propertyInfo, Type declaringType, Type runtimePropertyType) 509public override Action<object, TProperty> CreatePropertySetter<TProperty>(PropertyInfo propertyInfo) => 512private static DynamicMethod CreatePropertySetter(PropertyInfo propertyInfo, Type runtimePropertyType)
System\Text\Json\Serialization\Metadata\ReflectionMemberAccessor.cs (3)
180public override Func<object, TProperty> CreatePropertyGetter<TProperty>(PropertyInfo propertyInfo) 193public override Func<TDeclaringType, TProperty> CreatePropertyGetter<TDeclaringType, TProperty>(PropertyInfo propertyInfo) 208public 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);