7 types derived from PropertyInfo
PresentationFramework (1)
MS\Internal\Data\IndexerPropertyInfo.cs (1)
14internal class IndexerPropertyInfo : PropertyInfo
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\PropertyBuilder.cs (1)
6public abstract class PropertyBuilder : PropertyInfo
src\System\Reflection\RuntimePropertyInfo.cs (1)
13internal sealed unsafe 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)
51internal abstract class LeveledPropertyInfo : PropertyInfo
System.Xaml.Tests (1)
System\Xaml\XamlMemberTests.cs (1)
2364private class CustomPropertyInfo : PropertyInfo
1755 references to PropertyInfo
Aspire.Azure.Messaging.EventHubs.Tests (1)
AspireEventHubsExtensionsTests.cs (1)
663var consumerGroupProperty = settings.GetType().GetProperty("ConsumerGroup");
Aspire.Confluent.Kafka (5)
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\Shared\PropertyFetcher.AOT.cs (5)
101var property = type.DeclaredProperties.FirstOrDefault(p => string.Equals(p.Name, propertyName, StringComparison.OrdinalIgnoreCase)) ?? type.GetProperty(propertyName); 104static PropertyFetch? CreateFetcherForProperty(PropertyInfo? propertyInfo) 140static PropertyFetch? DynamicInstantiationHelper(Type declaringType, PropertyInfo propertyInfo) 175private static PropertyFetchInstantiated<TDeclaredObject> CreateInstantiated<TDeclaredObject>(PropertyInfo propertyInfo) 189public PropertyFetchInstantiated(PropertyInfo property)
Aspire.Microsoft.Data.SqlClient (5)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\DiagnosticSourceInstrumentation\PropertyFetcher.cs (5)
97var property = type.DeclaredProperties.FirstOrDefault(p => string.Equals(p.Name, propertyName, StringComparison.OrdinalIgnoreCase)) ?? type.GetProperty(propertyName); 100static PropertyFetch? CreateFetcherForProperty(PropertyInfo? propertyInfo) 136static PropertyFetch? DynamicInstantiationHelper(Type declaringType, PropertyInfo propertyInfo) 171private static PropertyFetch CreateInstantiated<TDeclaredObject>(PropertyInfo propertyInfo) 185public PropertyFetchInstantiated(PropertyInfo property)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (5)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\DiagnosticSourceInstrumentation\PropertyFetcher.cs (5)
97var property = type.DeclaredProperties.FirstOrDefault(p => string.Equals(p.Name, propertyName, StringComparison.OrdinalIgnoreCase)) ?? type.GetProperty(propertyName); 100static PropertyFetch? CreateFetcherForProperty(PropertyInfo? propertyInfo) 136static PropertyFetch? DynamicInstantiationHelper(Type declaringType, PropertyInfo propertyInfo) 171private static PropertyFetch CreateInstantiated<TDeclaredObject>(PropertyInfo propertyInfo) 185public PropertyFetchInstantiated(PropertyInfo property)
Aspire.StackExchange.Redis (5)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Shared\PropertyFetcher.AOT.cs (5)
103var property = type.DeclaredProperties.FirstOrDefault(p => string.Equals(p.Name, propertyName, StringComparison.OrdinalIgnoreCase)) ?? type.GetProperty(propertyName); 106static PropertyFetch? CreateFetcherForProperty(PropertyInfo? propertyInfo) 142static PropertyFetch? DynamicInstantiationHelper(Type declaringType, PropertyInfo propertyInfo) 177private static PropertyFetchInstantiated<TDeclaredObject> CreateInstantiated<TDeclaredObject>(PropertyInfo propertyInfo) 191public PropertyFetchInstantiated(PropertyInfo property)
BasicTestApp (1)
FormsTest\CustomFieldCssClassProvider.cs (1)
18var propertyInfo = fieldIdentifier.Model.GetType().GetProperty(fieldIdentifier.FieldName);
dotnet-svcutil.xmlserializer (3)
Microsoft\Tools\ServiceModel\SvcUtil\XmlSerializerGenerator.cs (3)
134PropertyInfo contractTypeProperty = contractDescriptionType.GetProperty("ContractType"); 155PropertyInfo getBehaviorsProperty = operationType.GetProperty("Behaviors"); 204PropertyInfo operationsProperty = contractDescriptionType.GetProperty("Operations");
dotnet-svcutil-lib (95)
CodeDomFixup\CodeDomVisitors\PropertyFieldNameScope.cs (1)
16foreach (PropertyInfo property in type.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance | BindingFlags.FlattenHierarchy))
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeGenerator.cs (8)
734private static MethodInfo GetPropertyMethodFromBaseType(PropertyInfo propertyInfo, bool isGetter) 739PropertyInfo currentProperty; 791PropertyInfo property = (PropertyInfo)memberInfo; 828PropertyInfo property = (PropertyInfo)memberInfo; 867PropertyInfo property = (PropertyInfo)memberInfo;
FrameworkFork\Microsoft.Xml\Xml\Serialization\Models.cs (9)
154if (!(members[i] is PropertyInfo)) 162if (members[i] is PropertyInfo) 175else if (memberInfo is PropertyInfo) 176model = GetPropertyModel((PropertyInfo)memberInfo); 214private FieldModel GetPropertyModel(PropertyInfo propertyInfo) 230internal static bool CheckPropertyRead(PropertyInfo propertyInfo) 297PropertyInfo specifiedProperty = memberInfo.DeclaringType.GetProperty(memberInfo.Name + "Specified"); 311if (memberInfo is PropertyInfo) 313_readOnly = !((PropertyInfo)memberInfo).CanWrite;
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapReflectionImporter.cs (1)
418if (memberInfo is FieldInfo || memberInfo is PropertyInfo)
FrameworkFork\Microsoft.Xml\Xml\Serialization\SourceInfo.cs (1)
175((FieldInfo)MemberInfo).FieldType : ((PropertyInfo)MemberInfo).PropertyType;
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (10)
1121PropertyInfo propertyInfo = memberInfo as PropertyInfo; 1134private static bool CanWriteProperty(PropertyInfo propertyInfo, TypeDesc typeDesc) 1221foreach (PropertyInfo info in currentInfo.DeclaredProperties) 1318PropertyInfo p = enumerator.ReturnType.GetProperty("Current"); 1340internal static PropertyInfo GetDefaultIndexer(Type type, string memberInfo) 1355PropertyInfo indexer = null; 1362if (defaultMembers[i] is PropertyInfo) 1364PropertyInfo defaultProp = (PropertyInfo)defaultMembers[i];
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (2)
850if (memberInfo is FieldInfo || memberInfo is PropertyInfo) 1464PropertyInfo info = structModel.Type.GetProperty(choice.MemberName, BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationILGen.cs (1)
577Type memType = memInfo is FieldInfo ? ((FieldInfo)memInfo).FieldType : ((PropertyInfo)memInfo).PropertyType;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (3)
3908typeof(FieldInfo).FullName, typeof(PropertyInfo).FullName, 3999if (memberInfo is PropertyInfo) 4058PropertyInfo defaultIndexer = TypeScope.GetDefaultIndexer(type, null);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriterILGen.cs (1)
2612PropertyInfo propInfo = initValue.ILG.GetVariableType(fixup).GetProperty(vars[1]);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ClassDataContract.cs (5)
958if (member is PropertyInfo) 960PropertyInfo property = (PropertyInfo)member; 1011PropertyInfo property = member as PropertyInfo;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeGenerator.cs (6)
706else if (memberInfo is PropertyInfo) 708PropertyInfo property = memberInfo as PropertyInfo; 749else if (memberInfo is PropertyInfo) 751PropertyInfo property = memberInfo as PropertyInfo;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataMember.cs (5)
263return ((PropertyInfo)MemberInfo).PropertyType; 321PropertyInfo property = (PropertyInfo)memberInfo; 346PropertyInfo property = (PropertyInfo)memberInfo;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ExceptionDataContract.cs (8)
279PropertyInfo publicProperty = member as PropertyInfo; 365PropertyInfo[] props = type.GetProperties(); 366foreach (PropertyInfo prop in props) 435private bool PropertyIsSystemExceptionProperty(PropertyInfo prop) 437PropertyInfo[] props = Globals.TypeOfException.GetProperties(); 438foreach (PropertyInfo propInfo in props) 471PropertyInfo messageProperty = exceptionType.GetProperty("Message");
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlFormatGeneratorStatics.cs (16)
199private static PropertyInfo s_nodeTypeProperty; 200internal static PropertyInfo NodeTypeProperty 871private static PropertyInfo s_namespaceProperty; 872internal static PropertyInfo NamespaceProperty 919private static PropertyInfo s_childElementNamespacesProperty; 920internal static PropertyInfo ChildElementNamespacesProperty 935private static PropertyInfo s_collectionItemNameProperty; 936internal static PropertyInfo CollectionItemNameProperty 951private static PropertyInfo s_childElementNamespaceProperty; 952internal static PropertyInfo ChildElementNamespaceProperty 1044private static PropertyInfo s_serializeReadOnlyTypesProperty; 1045internal static PropertyInfo SerializeReadOnlyTypesProperty 1060private static PropertyInfo s_classSerializationExceptionMessageProperty; 1061internal static PropertyInfo ClassSerializationExceptionMessageProperty 1076private static PropertyInfo s_collectionSerializationExceptionMessageProperty; 1077internal static PropertyInfo CollectionSerializationExceptionMessageProperty
FrameworkFork\System.ServiceModel\Extensions\ReflectionExtensions.cs (1)
30public static PropertyInfo GetProperty(this Type type, string name, BindingFlags bindingAttr)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannelProxy.cs (1)
298public PropertyInfo TaskProperty { get; private set; }
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\OperationGenerator.cs (2)
1008PropertyInfo property = member as PropertyInfo;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\TypeLoader.cs (5)
1312if (!(memberInfo is FieldInfo || memberInfo is PropertyInfo)) 1316PropertyInfo property = memberInfo as PropertyInfo; 1359if (memberInfo is PropertyInfo) 1361memberType = ((PropertyInfo)memberInfo).PropertyType;
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\OperationFormatter.cs (4)
599PropertyInfo propertyInfo = memberInfo as PropertyInfo; 613PropertyInfo propertyInfo = memberInfo as PropertyInfo;
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (1)
36_taskTResultGetMethod = ((PropertyInfo)taskMethod.ReturnType.GetMember(ResultMethodName)[0]).GetGetMethod();
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\XmlSerializerOperationFormatter.cs (4)
291PropertyInfo property = member as PropertyInfo; 348PropertyInfo property = member as PropertyInfo;
GetDocument.Insider (1)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.5.25256.101\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
192var servicesProperty = hostType.GetProperty("Services", DeclaredOnlyLookup);
Infrastructure.Common (1)
xunit\ConditionAttribute.cs (1)
116PropertyInfo pi = ti.GetDeclaredProperty(name);
Metrics (6)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (2)
162private static readonly PropertyInfo? s_syntaxTreeDiagnosticOptionsProperty = 165private static readonly PropertyInfo? s_compilationOptionsSyntaxTreeOptionsProviderProperty =
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (3)
60if (!TryGetProperty<T, TProperty>(type, propertyName, out var property)) 104if (!TryGetProperty<T, TProperty>(type, propertyName, out var property)) 219private static bool TryGetProperty<T, TProperty>([NotNullWhen(true)] Type? type, string propertyName, [NotNullWhen(true)] out PropertyInfo? propertyInfo)
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxNodeExtensions.cs (1)
21var property = typeof(Simplifier).GetTypeInfo().GetDeclaredProperty("AddImportsAnnotation");
Metrics.Legacy (6)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (2)
162private static readonly PropertyInfo? s_syntaxTreeDiagnosticOptionsProperty = 165private static readonly PropertyInfo? s_compilationOptionsSyntaxTreeOptionsProviderProperty =
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (3)
60if (!TryGetProperty<T, TProperty>(type, propertyName, out var property)) 104if (!TryGetProperty<T, TProperty>(type, propertyName, out var property)) 219private static bool TryGetProperty<T, TProperty>([NotNullWhen(true)] Type? type, string propertyName, [NotNullWhen(true)] out PropertyInfo? propertyInfo)
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxNodeExtensions.cs (1)
21var property = typeof(Simplifier).GetTypeInfo().GetDeclaredProperty("AddImportsAnnotation");
Microsoft.AspNetCore.Components (25)
CascadingParameterState.cs (1)
120foreach (var prop in candidateProps)
ComponentFactory.cs (1)
104foreach (var property in MemberAssignment.GetPropertiesIncludingInherited(type, _injectablePropertyBindingFlags))
PersistentState\PersistentServicesRegistry.cs (2)
167foreach (var propertyInfo in GetCandidateBindableProperties(targetType)) 218internal static IEnumerable<PropertyInfo> GetCandidateBindableProperties(
Reflection\ComponentProperties.cs (5)
178internal static IEnumerable<PropertyInfo> GetCandidateBindableProperties([DynamicallyAccessedMembers(Component)] Type targetType) 187var propertyInfo = targetType.GetProperty(parameterName, BindablePropertyFlags); 241foreach (var property in targetType.GetProperties(BindablePropertyFlags)) 259private static void ThrowForInvalidCaptureUnmatchedValuesParameterType(Type targetType, PropertyInfo propertyInfo) 278foreach (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))
Reflection\PropertyGetter.cs (1)
21public PropertyGetter(Type targetType, PropertyInfo property)
Reflection\PropertySetter.cs (1)
21public PropertySetter(Type targetType, PropertyInfo property)
SupplyParameterFromPersistentComponentStateValueProvider.cs (2)
80var propertyInfo = GetPropertyInfo(type, propertyName); 87static PropertyInfo? GetPropertyInfo([DynamicallyAccessedMembers(LinkerFlags.Component)] Type type, string propertyName)
Microsoft.AspNetCore.Components.Endpoints (13)
FormMapping\Metadata\FormDataMetadataFactory.cs (1)
189var property = propertyHelper.Property;
FormMapping\Metadata\FormDataPropertyMetadata.cs (2)
7internal class FormDataPropertyMetadata(PropertyInfo property, FormDataTypeMetadata propertyTypeInfo) : IFormDataValue 9public PropertyInfo Property => property;
src\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.Components.Forms (4)
EditContextDataAnnotationsExtensions.cs (3)
64private static readonly ConcurrentDictionary<(Type ModelType, string FieldName), PropertyInfo?> _propertyInfoCache = new(); 89if (TryGetValidatableProperty(fieldIdentifier, out var propertyInfo)) 157private static bool TryGetValidatableProperty(in FieldIdentifier fieldIdentifier, [NotNullWhen(true)] out PropertyInfo? propertyInfo)
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (1)
188foreach (var property in runtimeProperties)
Microsoft.AspNetCore.Components.Web (2)
JSComponents\JSComponentInterop.cs (1)
204foreach (var propertyInfo in candidateProperties)
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (1)
188foreach (var property in runtimeProperties)
Microsoft.AspNetCore.Grpc.JsonTranscoding (4)
src\Grpc\JsonTranscoding\src\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.Grpc.JsonTranscoding.Tests (1)
Infrastructure\TestHelpers.cs (1)
37var property = typeToConvert.GetProperty("Descriptor", BindingFlags.Static | BindingFlags.Public, binder: null, typeof(MessageDescriptor), Type.EmptyTypes, modifiers: null);
Microsoft.AspNetCore.Grpc.Swagger (7)
Internal\GrpcDataContractResolver.cs (1)
111var propertyInfo = messageDescriptor.ClrType.GetProperty(propertyName);
Internal\GrpcJsonTranscodingDescriptionProvider.cs (2)
108var propertyInfo = field.ContainingType.ClrType.GetProperty(parameterName); 150var propertyInfo = field.ContainingType.ClrType.GetProperty(field.PropertyName);
src\Grpc\JsonTranscoding\src\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.Hosting.Tests (1)
HostingApplicationDiagnosticsTests.cs (1)
1086var property = o.GetType().GetTypeInfo().GetProperty(name, BindingFlags.Instance | BindingFlags.Public);
Microsoft.AspNetCore.Http.Abstractions (11)
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)
Validation\ValidatablePropertyInfo.cs (1)
65var property = DeclaringType.GetProperty(Name) ?? throw new InvalidOperationException($"Property '{Name}' not found on type '{DeclaringType.Name}'.");
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")!; 1553private static Expression GetValueFromProperty(MemberExpression sourceExpression, PropertyInfo itemProperty, string key, Type? returnType = null) 1959private static Expression BindParameterFromProperty(ParameterInfo parameter, MemberExpression property, PropertyInfo itemProperty, string key, RequestDelegateFactoryContext factoryContext, string source)
src\Components\Endpoints\src\FormMapping\Metadata\FormDataMetadataFactory.cs (1)
189var property = propertyHelper.Property;
src\Components\Endpoints\src\FormMapping\Metadata\FormDataPropertyMetadata.cs (2)
7internal class FormDataPropertyMetadata(PropertyInfo property, FormDataTypeMetadata propertyTypeInfo) : IFormDataValue 9public PropertyInfo Property => property;
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\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (2)
32private static PropertyInfo _fsharpOptionOfTaskCreationOptionsNoneProperty; 33private static PropertyInfo _fsharpOptionOfCancellationTokenNoneProperty;
src\Shared\ParameterBindingMethodCache.cs (4)
325var lookupTable = new Dictionary<ParameterLookupKey, PropertyInfo>(properties.Length); 344if (!lookupTable.TryGetValue(key, out var property)) 734public ConstructorParameter(ParameterInfo parameter, PropertyInfo propertyInfo) 741public PropertyInfo PropertyInfo { get; }
src\Shared\PropertyAsParameterInfo.cs (4)
17private readonly PropertyInfo _underlyingProperty; 23public PropertyAsParameterInfo(PropertyInfo propertyInfo, NullabilityInfoContext? nullabilityContext = null) 40public PropertyAsParameterInfo(PropertyInfo property, ParameterInfo parameterInfo, NullabilityInfoContext? nullabilityContext = null) 122foreach (var property in properties)
Microsoft.AspNetCore.Http.Extensions.Tests (15)
PropertyAsParameterInfoTests.cs (13)
14var propertyInfo = GetProperty(typeof(ArgumentList), nameof(ArgumentList.NoAttribute)); 26var propertyInfo = GetProperty(typeof(ArgumentList), nameof(ArgumentList.NoAttribute)); 39var propertyInfo = GetProperty(typeof(ArgumentList), nameof(ArgumentList.WithTestAttribute)); 50var propertyInfo = GetProperty(typeof(ArgumentList), nameof(ArgumentList.NoAttribute)); 62var propertyInfo = GetProperty(typeof(ArgumentList), nameof(ArgumentList.WithTestAttribute)); 74var propertyInfo = GetProperty(typeof(ArgumentList), nameof(ArgumentList.WithTestAttribute)); 90var propertyInfo = GetProperty(typeof(ArgumentList), nameof(ArgumentList.WithTestAttribute)); 110var propertyInfo = GetProperty(typeof(ArgumentList), nameof(ArgumentList.WithTestAttribute)); 130var propertyInfo = GetProperty(typeof(DerivedArgumentList), nameof(DerivedArgumentList.WithTestAttribute)); 141var propertyInfo = GetProperty(typeof(ArgumentList), nameof(ArgumentList.NoAttribute)); 152var propertyInfo = GetProperty(typeof(ArgumentList), nameof(ArgumentList.NoAttribute)); 168var propertyInfo = GetProperty(typeof(ArgumentList), nameof(ArgumentList.NoAttribute)); 176private static PropertyInfo GetProperty(Type containerType, string propertyName)
ValidationsGenerator\ValidationsGeneratorTestBase.cs (2)
92var valueProperty = optionsType.GetProperty("Value"); 375var servicesProperty = hostType.GetProperty("Services", DeclaredOnlyLookup);
Microsoft.AspNetCore.Http.Tests (3)
CookieOptionsTests.cs (1)
34foreach (var property in properties)
DefaultHttpContextTests.cs (2)
391private static void TestFeatureProperties(object value, IFeatureCollection features, IEnumerable<PropertyInfo> properties) 393foreach (var property in properties)
Microsoft.AspNetCore.Identity.EntityFrameworkCore (4)
IdentityUserContext.cs (4)
186foreach (var p in personalDataProps) 234foreach (var p in tokenProps) 279foreach (var p in personalDataProps) 327foreach (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)
55var property = type.GetProperty("Skip");
Microsoft.AspNetCore.Mvc.Abstractions (9)
ModelBinding\Metadata\ModelMetadataIdentity.cs (3)
67PropertyInfo propertyInfo, 171public PropertyInfo? PropertyInfo => FieldInfo as PropertyInfo;
ModelBinding\ModelMetadataProvider.cs (2)
48/// <param name="propertyInfo">The <see cref="PropertyInfo"/>.</param> 51public virtual ModelMetadata GetMetadataForProperty(PropertyInfo propertyInfo, Type modelType)
src\Shared\ParameterBindingMethodCache.cs (4)
325var lookupTable = new Dictionary<ParameterLookupKey, PropertyInfo>(properties.Length); 344if (!lookupTable.TryGetValue(key, out var property)) 734public ConstructorParameter(ParameterInfo parameter, PropertyInfo propertyInfo) 741public PropertyInfo PropertyInfo { get; }
Microsoft.AspNetCore.Mvc.Abstractions.Test (5)
ModelBinding\ModelMetadataTest.cs (5)
271var property = typeof(string).GetProperty(nameof(string.Length)); 310var property = typeof(string).GetProperty(nameof(string.Length)); 325var property = typeof(string).GetProperty(nameof(string.Length)); 355var property = typeof(string).GetProperty(nameof(string.Length)); 458public TestModelMetadata(PropertyInfo propertyInfo, Type modelType, Type containerType)
Microsoft.AspNetCore.Mvc.ApiExplorer (5)
EndpointMetadataApiDescriptionProvider.cs (1)
461if (parameterInfo.Member is PropertyInfo propertyInfo && propertyInfo.DeclaringType is not null)
src\Shared\PropertyAsParameterInfo.cs (4)
17private readonly PropertyInfo _underlyingProperty; 23public PropertyAsParameterInfo(PropertyInfo propertyInfo, NullabilityInfoContext? nullabilityContext = null) 40public PropertyAsParameterInfo(PropertyInfo property, ParameterInfo parameterInfo, NullabilityInfoContext? nullabilityContext = null) 122foreach (var property in properties)
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
DefaultApiDescriptionProviderTest.cs (1)
2339foreach (var property in controllerType.GetProperties())
Microsoft.AspNetCore.Mvc.Core (42)
ApplicationModels\DefaultApplicationModelProvider.cs (5)
65var propertyInfo = propertyHelper.Property; 207/// Creates a <see cref="PropertyModel"/> for the given <see cref="PropertyInfo"/>. 209/// <param name="propertyInfo">The <see cref="PropertyInfo"/>.</param> 210/// <returns>A <see cref="PropertyModel"/> for the given <see cref="PropertyInfo"/>.</returns> 211internal PropertyModel CreatePropertyModel(PropertyInfo propertyInfo)
ApplicationModels\PropertyModel.cs (2)
22PropertyInfo propertyInfo, 59public PropertyInfo PropertyInfo { get; }
Controllers\ControllerBoundPropertyDescriptor.cs (2)
16/// Gets or sets the <see cref="System.Reflection.PropertyInfo"/> for this property. 18public PropertyInfo PropertyInfo { get; set; } = default!;
Infrastructure\IPropertyInfoParameterDescriptor.cs (2)
17/// Gets the <see cref="System.Reflection.PropertyInfo"/>. 19PropertyInfo PropertyInfo { get; }
ModelBinding\Metadata\DefaultModelMetadataProvider.cs (2)
124public override ModelMetadata GetMetadataForProperty(PropertyInfo propertyInfo, Type modelType) 176private ModelMetadataCacheEntry GetCacheEntry(PropertyInfo property, Type modelType)
ModelBinding\Metadata\ModelAttributes.cs (6)
97/// <see cref="TypeAttributes"/> contains attributes retrieved from <see cref="PropertyInfo.PropertyType"/>. 108/// <param name="property">A <see cref="PropertyInfo"/> for which attributes need to be resolved. 113public static ModelAttributes GetAttributesForProperty(Type type, PropertyInfo property) 123/// <param name="property">A <see cref="PropertyInfo"/> for which attributes need to be resolved. 129public static ModelAttributes GetAttributesForProperty(Type containerType, PropertyInfo property, Type modelType) 140var metadataProperty = metadataType.GetRuntimeProperty(property.Name);
ModelBinding\ModelBindingHelper.cs (1)
302if (memberExpression.Member is PropertyInfo memberInfo)
ModelBinding\ParameterBinder.cs (1)
259var propertyInfo = propertyInfoParameter.PropertyInfo;
src\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\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (2)
32private static PropertyInfo _fsharpOptionOfTaskCreationOptionsNoneProperty; 33private static PropertyInfo _fsharpOptionOfCancellationTokenNoneProperty;
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\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.Core.Test (39)
ApplicationModels\ActionModelTest.cs (1)
85foreach (var property in typeof(ActionModel).GetProperties())
ApplicationModels\AttributeRouteModelTests.cs (1)
26foreach (var property in typeof(AttributeRouteModel).GetProperties())
ApplicationModels\ControllerActionDescriptorBuilderTest.cs (1)
21var propertyInfo = controller.ControllerType.AsType().GetProperty("BoundProperty");
ApplicationModels\ControllerModelTest.cs (1)
87foreach (var property in typeof(ControllerModel).GetProperties())
ApplicationModels\DefaultApplicationModelProviderTest.cs (6)
1336var propertyInfo = typeof(BindPropertyController).GetProperty(nameof(BindPropertyController.Property)); 1355var propertyInfo = typeof(BindPropertyController).GetProperty(nameof(BindPropertyController.BinderType)); 1369var propertyInfo = typeof(BindPropertyController).GetProperty(nameof(BindPropertyController.BinderSource)); 1389var propertyInfo = typeof(DerivedFromBindPropertyController).GetProperty( 1411var derivedPropertyInfo = typeof(UserController).GetProperty(nameof(UserController.DerivedProperty)); 1412var basePropertyInfo = typeof(UserController).GetProperty(nameof(ControllerBase.ControllerContext));
ApplicationModels\ParameterModelTest.cs (1)
31foreach (var property in typeof(ParameterModel).GetProperties())
ApplicationModels\PropertyModelTest.cs (1)
27foreach (var property in typeof(PropertyModel).GetProperties())
DependencyInjection\ApplicationModelConventionExtensionsTest.cs (2)
94var property1 = controllerType1.GetProperty(nameof(HelloController.Property1)); 114var property2 = controllerType2.GetProperty(nameof(WorldController.Property2));
ModelBinding\Binders\FormFileModelBinderTest.cs (2)
85var propertyInfo = typeof(NestedFormFiles).GetProperty(propertyName); 127var propertyInfo = typeof(NestedFormFiles).GetProperty(propertyName);
ModelBinding\Metadata\DefaultModelMetadataProviderTest.cs (3)
353var property = typeof(TestContainer) 403var property = typeof(TestContainer) 419var property = typeof(TestContainer)
ModelBinding\Metadata\DefaultModelMetadataTest.cs (4)
463var prop1 = typeof(Exception).GetProperty(nameof(Exception.Message)); 464var prop2 = typeof(Exception).GetProperty(nameof(Exception.StackTrace)); 1009var property = GetType() 1074var property = typeof(TypeWithProperties).GetProperty(nameof(TypeWithProperties.PublicGetPublicSetProperty));
ModelBinding\Metadata\ModelAttributesTest.cs (9)
16var property = modelType.GetRuntimeProperties().FirstOrDefault(p => p.Name == nameof(BaseModel.BaseProperty)); 34var property = modelType.GetRuntimeProperties().FirstOrDefault(p => p.Name == nameof(BaseModel.TestProperty)); 64var property = modelType.GetRuntimeProperties().FirstOrDefault(p => p.Name == nameof(BaseModel.BaseProperty)); 82var property = modelType.GetRuntimeProperties().FirstOrDefault(p => p.Name == nameof(BaseModel.TestProperty)); 102var property = modelType.GetRuntimeProperties().FirstOrDefault(p => p.Name == nameof(BaseModel.VirtualProperty)); 120var property = modelType.GetRuntimeProperties().FirstOrDefault(p => p.Name == nameof(BaseModel.RouteValue)); 159var property = typeof(MergedAttributes).GetRuntimeProperty(nameof(MergedAttributes.Property)); 270var property = typeof(MergedAttributes) 295var property = modelType.GetRuntimeProperties().FirstOrDefault(p => p.Name == nameof(BaseModel.RouteValue));
ModelBinding\ParameterBinderTest.cs (2)
418var property = typeof(TestController).GetProperty(nameof(TestController.Model)); 472var property = typeof(TestControllerWithValidatedProperties).GetProperty(nameof(TestControllerWithValidatedProperties.Model));
RequestFormLimitsAttributeTest.cs (5)
19foreach (var property in formOptionsProperties) 21var formLimitAttributeProperty = formLimitsAttributeProperties 40foreach (var formOptionsProperty in formOptionsProperties) 42var formLimitsAttributeProperty = formLimitsAttributeProperties 83private PropertyInfo[] GetProperties(Type type)
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
TestModelMetadataProvider.cs (1)
120var property = containerType.GetRuntimeProperty(propertyName);
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
DataAnnotationsMetadataProvider.cs (1)
339var property = context.Key.PropertyInfo;
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (21)
DataAnnotationsMetadataProviderTest.cs (21)
1111var property = typeof(string).GetProperty(nameof(string.Length)); 1132var property = typeof(string).GetProperty(nameof(string.Length)); 1231var property = modelType.GetProperty(propertyName); 1250var property = modelType.GetProperty(nameof(DerivedTypeWithAllNonNullProperties_WithNullableProperties.Property1)); 1269var property = modelType.GetProperty(nameof(DerivedTypeWithAllNonNullProperties_WithNullableProperties.Property2)); 1290var property = modelType.GetProperty(propertyName); 1310var property = modelType.GetProperty(nameof(DerivedTypeWithNullableProperties_WithNonNullProperties.Property2)); 1329var property = modelType.GetProperty(nameof(DerivedTypeWithNullableProperties_ShadowedProperty.Property1)); 1348var property = modelType.GetProperty(nameof(TypeImplementIInterfaceWithNonNullProperty.Property)); 1367var property = modelType.GetProperty(nameof(TypeImplementIInterfaceWithNonNullProperty_AsNullable.Property)); 1428var property = modelType.GetProperty(nameof(TypeWithAllNonNullProperties.Property1)); 1455var property = typeof(string).GetProperty(nameof(string.Length)); 1483var property = typeof(string).GetProperty(nameof(string.Length)); 1505var property = typeof(string).GetProperty(nameof(string.Length)); 1525var property = typeof(string).GetProperty(nameof(string.Length)); 1545var property = typeof(string).GetProperty(nameof(string.Length)); 1566var property = typeof(string).GetProperty(nameof(string.Length)); 1584var property = type.GetProperty(nameof(NullableReferenceTypes.NonNullableReferenceType)); 1600var property = type.GetProperty(nameof(KeyValuePair<string, object>.Key)); 1617var property = type.GetProperty(nameof(KeyValuePair<string, object>.Key))!; 1636var property = type.GetProperty(nameof(NullableReferenceTypes.NullableReferenceType));
Microsoft.AspNetCore.Mvc.IntegrationTests (5)
BindPropertyIntegrationTest.cs (1)
186var propertyInfo = typeof(TestPage).GetProperty(nameof(TestPage.BindRequiredProperty));
ValidationIntegrationTests.cs (2)
2310var propertyInfo = modelType.GetProperty(nameof(Validation_TopLevelPropertyController.Model)); 2364var propertyInfo = modelType.GetProperty(nameof(Validation_TopLevelProperty_ValidationOnPropertyController.Model));
ValidationWithRecordIntegrationTests.cs (2)
2101var propertyInfo = modelType.GetProperty(nameof(Validation_TopLevelPropertyController.Model)); 2152var propertyInfo = modelType.GetProperty(nameof(Validation_TopLevelProperty_ValidationOnPropertyController.Model));
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.RazorPages.Test (8)
Filters\PageSaveTempDataPropertyFilterFactoryTest.cs (1)
18var property = typeof(TestPageModel).GetProperty(nameof(TestPageModel.Property1));
Filters\PageSaveTempDataPropertyFilterTest.cs (4)
96var testProperty = pageType.GetProperty(nameof(TestPageModel.Test)); 97var test2Property = pageType.GetProperty(nameof(TestPageModel.Test2)); 198var property1 = pageModelType.GetProperty(nameof(TestPageModel.Test)); 199var property2 = pageModelType.GetProperty(nameof(TestPageModel.Test2));
Infrastructure\CompiledPageActionDescriptorFactoryTest.cs (3)
263var propertyInfo = GetType().GetProperty(nameof(TestProperty), BindingFlags.Instance | BindingFlags.NonPublic); 297var propertyInfo = GetType().GetProperty(nameof(TestProperty), BindingFlags.Instance | BindingFlags.NonPublic); 327var propertyInfo = GetType().GetProperty(nameof(TestProperty), BindingFlags.Instance | BindingFlags.NonPublic);
Microsoft.AspNetCore.Mvc.Testing (1)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.5.25256.101\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
192var 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.Mvc.ViewFeatures.Test (21)
Filters\ControllerSaveTempDataPropertyFilterFactoryTest.cs (1)
15var property = typeof(StringController).GetProperty(nameof(StringController.StringProp));
Filters\ControllerSaveTempDataPropertyFilterTest.cs (8)
29var property1 = controllerType.GetProperty(nameof(TestController.Test)); 30var property2 = controllerType.GetProperty(nameof(TestController.Test2)); 75var property1 = controllerType.GetProperty(nameof(TestController.Test)); 76var property2 = controllerType.GetProperty(nameof(TestController.Test2)); 118var property1 = controllerType.GetProperty(nameof(TestController.Test)); 119var property2 = controllerType.GetProperty(nameof(TestController.Test2)); 157var property1 = controllerType.GetProperty(nameof(TestController.Test)); 158var property2 = controllerType.GetProperty(nameof(TestController.Test2));
Filters\LifecyclePropertyTest.cs (5)
12var propertyInfo = typeof(TestSubject).GetProperty(nameof(TestSubject.TestProperty)); 27var propertyInfo = typeof(TestSubject).GetProperty(nameof(TestSubject.TestProperty)); 42var propertyInfo = typeof(TestSubject).GetProperty(nameof(TestSubject.TestProperty)); 57var propertyInfo = typeof(TestSubject).GetProperty(nameof(TestSubject.ValueTypeProperty)); 72var propertyInfo = typeof(TestSubject).GetProperty(nameof(TestSubject.NullableProperty));
Filters\TempDataApplicationModelProviderTest.cs (2)
68var expected = type.GetProperty(nameof(TestController_OneTempDataProperty.Test2)); 89var expected = typeof(TestController_OneTempDataProperty).GetProperty(nameof(TestController_OneTempDataProperty.Test2));
Filters\ViewDataAttributeApplicationModelProviderTest.cs (1)
49var expected = typeof(TestController_OneViewDataProperty).GetProperty(nameof(TestController_OneViewDataProperty.Test2));
HtmlAttributePropertyHelperTest.cs (4)
16var property = anonymous.GetType().GetTypeInfo().DeclaredProperties.First(); 31var property = anonymous.GetType().GetTypeInfo().DeclaredProperties.First(); 46var property = anonymous.GetType().GetTypeInfo().DeclaredProperties.First(); 61var property = anonymous.GetType().GetTypeInfo().DeclaredProperties.First();
Microsoft.AspNetCore.OpenApi (13)
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\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (2)
32private static PropertyInfo _fsharpOptionOfTaskCreationOptionsNoneProperty; 33private static PropertyInfo _fsharpOptionOfCancellationTokenNoneProperty;
src\Shared\ParameterBindingMethodCache.cs (4)
325var lookupTable = new Dictionary<ParameterLookupKey, PropertyInfo>(properties.Length); 344if (!lookupTable.TryGetValue(key, out var property)) 734public ConstructorParameter(ParameterInfo parameter, PropertyInfo propertyInfo) 741public PropertyInfo PropertyInfo { get; }
src\Shared\PropertyAsParameterInfo.cs (4)
17private readonly PropertyInfo _underlyingProperty; 23public PropertyAsParameterInfo(PropertyInfo propertyInfo, NullabilityInfoContext? nullabilityContext = null) 40public PropertyAsParameterInfo(PropertyInfo property, ParameterInfo parameterInfo, NullabilityInfoContext? nullabilityContext = null) 122foreach (var property in properties)
Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests (1)
SnapshotTestHelper.cs (1)
383var servicesProperty = hostType.GetProperty("Services", DeclaredOnlyLookup);
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiDocumentServiceTestsBase.cs (1)
209foreach (var property in controllerType.GetProperties())
Microsoft.AspNetCore.Routing (10)
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\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.Shared.Tests (34)
PropertyActivatorTest.cs (5)
18var property = typeInfo.GetDeclaredProperty("IntProperty"); 41var property = typeInfo.GetDeclaredProperty("IntProperty"); 57var expectedPropertyInfo = typeInfo.GetDeclaredProperty("ActivatableProperty"); 81var expectedPropertyInfo = typeInfo.GetDeclaredProperty("IntProperty"); 105var expectedPropertyInfo = typeInfo.GetDeclaredProperty("Public");
PropertyHelperTest.cs (8)
19var property = PropertyHelper.GetProperties(anonymous.GetType()).First().Property; 34var property = PropertyHelper.GetProperties(anonymous.GetType()).First().Property; 49var property = PropertyHelper.GetProperties(anonymous.GetType()).First().Property; 97var property = PropertyHelper.GetProperties(anonymous.GetType()).First().Property; 439var publicProperty = typeInfo.GetDeclaredProperty("PropA"); 440var protectedProperty = typeInfo.GetDeclaredProperty("PropProtected"); 459var property = typeInfo.GetDeclaredProperty("PropA"); 475var property = typeInfo.GetDeclaredProperty("PropB");
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\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (2)
32private static PropertyInfo _fsharpOptionOfTaskCreationOptionsNoneProperty; 33private static PropertyInfo _fsharpOptionOfCancellationTokenNoneProperty;
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\Shared\PropertyHelper\PropertyHelper.cs (10)
52public PropertyHelper(PropertyInfo property) 59/// Gets the backing <see cref="PropertyInfo"/>. 61public PropertyInfo Property { get; } 159public static Func<object, object?> MakeFastPropertyGetter(PropertyInfo propertyInfo) 179public static Func<object, object?> MakeNullSafeFastPropertyGetter(PropertyInfo propertyInfo) 191PropertyInfo propertyInfo, 272public static Action<object, object?> MakeFastPropertySetter(PropertyInfo propertyInfo) 461var declaredProperty = currentType.GetProperty(propertyHelper.Name, DeclaredOnlyLookup); 525foreach (var property in type.GetProperties(Everything)) 537private static bool IsInterestingProperty(PropertyInfo property)
Microsoft.AspNetCore.SignalR.Client.Tests (2)
HttpConnectionFactoryTests.cs (2)
110foreach (var property in properties) 117foreach (var property in properties)
Microsoft.AspNetCore.SignalR.Core (6)
Internal\TypedClientBuilder.cs (1)
19private static readonly PropertyInfo CancellationTokenNoneProperty = typeof(CancellationToken).GetProperty("None", BindingFlags.Public | BindingFlags.Static)!;
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\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (2)
32private static PropertyInfo _fsharpOptionOfTaskCreationOptionsNoneProperty; 33private static PropertyInfo _fsharpOptionOfCancellationTokenNoneProperty;
Microsoft.AspNetCore.TestHost (1)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.5.25256.101\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
192var servicesProperty = hostType.GetProperty("Services", DeclaredOnlyLookup);
Microsoft.Build (19)
BackEnd\Components\Logging\LoggingService.cs (4)
97private static readonly Lazy<PropertyInfo> s_projectStartedEventArgsGlobalProperties = new Lazy<PropertyInfo>(() => typeof(ProjectStartedEventArgs).GetProperty("GlobalProperties", BindingFlags.Public | BindingFlags.Instance), LazyThreadSafetyMode.PublicationOnly); 106private static readonly Lazy<PropertyInfo> s_projectStartedEventArgsToolsVersion = new Lazy<PropertyInfo>(() => typeof(ProjectStartedEventArgs).GetProperty("ToolsVersion", BindingFlags.Public | BindingFlags.Instance), LazyThreadSafetyMode.PublicationOnly);
BackEnd\Components\RequestBuilder\IntrinsicTasks\IntrinsicTaskFactory.cs (1)
63PropertyInfo[] infos = TaskType.GetProperties(BindingFlags.Instance | BindingFlags.Public);
Instance\ReflectableTaskPropertyInfo.cs (4)
22private PropertyInfo _propertyInfo; 45internal ReflectableTaskPropertyInfo(PropertyInfo propertyInfo) 60internal ReflectableTaskPropertyInfo(PropertyInfo propertyInfo, bool output, bool required, bool isAssignableToITaskItemType) 74internal PropertyInfo Reflection
Instance\TaskFactories\TaskHostTask.cs (1)
226PropertyInfo parameter = _taskType.Type.GetProperty(property.Name, BindingFlags.Instance | BindingFlags.Public);
LoadedType.cs (1)
70PropertyInfo[] props = type.GetProperties(BindingFlags.Instance | BindingFlags.Public);
PrintLineDebugger.cs (3)
25private static readonly Lazy<PropertyInfo> CommonWriterProperty = new Lazy<PropertyInfo>( 30var propertyInfo = commonWriterType.GetProperty("Writer", BindingFlags.Public | BindingFlags.Static);
Utilities\NuGetFrameworkWrapper.cs (5)
37private PropertyInfo FrameworkProperty; 38private PropertyInfo VersionProperty; 39private PropertyInfo PlatformProperty; 40private PropertyInfo PlatformVersionProperty; 41private PropertyInfo AllFrameworkVersionsProperty;
Microsoft.Build.Engine.OM.UnitTests (4)
Construction\ElementLocationPublic_Tests.cs (1)
125foreach (var property in element.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance))
PrintLineDebugger.cs (3)
25private static readonly Lazy<PropertyInfo> CommonWriterProperty = new Lazy<PropertyInfo>( 30var propertyInfo = commonWriterType.GetProperty("Writer", BindingFlags.Public | BindingFlags.Static);
Microsoft.Build.Engine.UnitTests (6)
BackEnd\AssemblyTaskFactory_Tests.cs (1)
216PropertyInfo[] comparisonInfo = comparisonType.Type.GetProperties(BindingFlags.Instance | BindingFlags.Public);
BackEnd\TaskBuilderTestTask.cs (1)
1304PropertyInfo[] infos = _type.GetProperties(BindingFlags.Instance | BindingFlags.Public);
BackEnd\TranslationHelpers.cs (1)
128foreach (var prop in left.GetType().GetProperties())
Construction\ElementLocation_Tests.cs (1)
432foreach (var property in node.GetType().GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance))
Evaluation\ProjectSdkImplicitImport_Tests.cs (1)
836PropertyInfo parsedSdkInfo = typeof(ProjectImportElement).GetProperty("SdkReference", BindingFlags.Instance | BindingFlags.NonPublic);
Telemetry\OpenTelemetryManager_Tests.cs (1)
136var defaultSourceProp = typeof(OpenTelemetryManager)
Microsoft.Build.Tasks.Core (3)
PrintLineDebugger.cs (3)
25private static readonly Lazy<PropertyInfo> CommonWriterProperty = new Lazy<PropertyInfo>( 30var propertyInfo = commonWriterType.GetProperty("Writer", BindingFlags.Public | BindingFlags.Static);
Microsoft.Build.Tasks.UnitTests (2)
ToolTaskExtension_Tests.cs (2)
39PropertyInfo logShared = typeof(ToolTask).GetProperty("LogShared", BindingFlags.Instance | BindingFlags.NonPublic); 45PropertyInfo logPrivate = typeof(ToolTask).GetProperty("LogPrivate", BindingFlags.Instance | BindingFlags.NonPublic);
Microsoft.Build.Utilities.Core (3)
PrintLineDebugger.cs (3)
25private static readonly Lazy<PropertyInfo> CommonWriterProperty = new Lazy<PropertyInfo>( 30var propertyInfo = commonWriterType.GetProperty("Writer", BindingFlags.Public | BindingFlags.Static);
Microsoft.CodeAnalysis.Analyzers (6)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (2)
162private static readonly PropertyInfo? s_syntaxTreeDiagnosticOptionsProperty = 165private static readonly PropertyInfo? s_compilationOptionsSyntaxTreeOptionsProviderProperty =
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (3)
60if (!TryGetProperty<T, TProperty>(type, propertyName, out var property)) 104if (!TryGetProperty<T, TProperty>(type, propertyName, out var property)) 219private static bool TryGetProperty<T, TProperty>([NotNullWhen(true)] Type? type, string propertyName, [NotNullWhen(true)] out PropertyInfo? propertyInfo)
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxNodeExtensions.cs (1)
21var property = typeof(Simplifier).GetTypeInfo().GetDeclaredProperty("AddImportsAnnotation");
Microsoft.CodeAnalysis.AnalyzerUtilities (5)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (2)
162private static readonly PropertyInfo? s_syntaxTreeDiagnosticOptionsProperty = 165private static readonly PropertyInfo? s_compilationOptionsSyntaxTreeOptionsProviderProperty =
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (3)
60if (!TryGetProperty<T, TProperty>(type, propertyName, out var property)) 104if (!TryGetProperty<T, TProperty>(type, propertyName, out var property)) 219private static bool TryGetProperty<T, TProperty>([NotNullWhen(true)] Type? type, string propertyName, [NotNullWhen(true)] out PropertyInfo? propertyInfo)
Microsoft.CodeAnalysis.BannedApiAnalyzers (5)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (2)
162private static readonly PropertyInfo? s_syntaxTreeDiagnosticOptionsProperty = 165private static readonly PropertyInfo? s_compilationOptionsSyntaxTreeOptionsProviderProperty =
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (3)
60if (!TryGetProperty<T, TProperty>(type, propertyName, out var property)) 104if (!TryGetProperty<T, TProperty>(type, propertyName, out var property)) 219private static bool TryGetProperty<T, TProperty>([NotNullWhen(true)] Type? type, string propertyName, [NotNullWhen(true)] out PropertyInfo? propertyInfo)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenFunctionPointersTests.cs (1)
985var prop = c.GetProperty("Prop");
Microsoft.CodeAnalysis.EditorFeatures (3)
artifacts\obj\Microsoft.CodeAnalysis.EditorFeatures\Release\net472\GeneratedInternalTypeHelper.g.cs (2)
32protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) { 39protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
Lightup\LightupHelpers.cs (1)
75var property = type.GetTypeInfo().GetDeclaredProperty(propertyName);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Options\GlobalOptionsTests.cs (2)
111foreach (var property in type.GetProperties(BindingFlags.Instance | BindingFlags.Public)) 163private static bool IsStoredInGlobalOptions(PropertyInfo property, string? language)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (5)
Debugger\Engine\DkmClrValue.cs (1)
317var property = type.GetProperty(name, bindingFlags);
Debugger\MemberInfo\PropertyInfoImpl.cs (2)
19internal readonly System.Reflection.PropertyInfo Property; 21internal PropertyInfoImpl(System.Reflection.PropertyInfo property)
Debugger\MemberInfo\TypeImpl.cs (1)
227return new PropertyInfoImpl((System.Reflection.PropertyInfo)member);
ResultProviderTestBase.cs (1)
29var emptyProperty = exceptionType.GetProperty("Empty");
Microsoft.CodeAnalysis.ExternalAccess.Extensions (1)
Internal\ExtensionMessageHandlerWrapper.cs (1)
18private readonly PropertyInfo _responseTaskResultProperty;
Microsoft.CodeAnalysis.PublicApiAnalyzers (5)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (2)
162private static readonly PropertyInfo? s_syntaxTreeDiagnosticOptionsProperty = 165private static readonly PropertyInfo? s_compilationOptionsSyntaxTreeOptionsProviderProperty =
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (3)
60if (!TryGetProperty<T, TProperty>(type, propertyName, out var property)) 104if (!TryGetProperty<T, TProperty>(type, propertyName, out var property)) 219private static bool TryGetProperty<T, TProperty>([NotNullWhen(true)] Type? type, string propertyName, [NotNullWhen(true)] out PropertyInfo? propertyInfo)
Microsoft.CodeAnalysis.PublicApiAnalyzers.CodeFixes (1)
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxNodeExtensions.cs (1)
21var property = typeof(Simplifier).GetTypeInfo().GetDeclaredProperty("AddImportsAnnotation");
Microsoft.CodeAnalysis.Rebuild.UnitTests (2)
RoundTripUtil.cs (2)
219foreach (var propertyInfo in type.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)) 259foreach (var propertyInfo in type.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance))
Microsoft.CodeAnalysis.ResxSourceGenerator (5)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (2)
162private static readonly PropertyInfo? s_syntaxTreeDiagnosticOptionsProperty = 165private static readonly PropertyInfo? s_compilationOptionsSyntaxTreeOptionsProviderProperty =
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (3)
60if (!TryGetProperty<T, TProperty>(type, propertyName, out var property)) 104if (!TryGetProperty<T, TProperty>(type, propertyName, out var property)) 219private static bool TryGetProperty<T, TProperty>([NotNullWhen(true)] Type? type, string propertyName, [NotNullWhen(true)] out PropertyInfo? propertyInfo)
Microsoft.CodeAnalysis.Scripting (6)
Hosting\ObjectFormatter\CommonObjectFormatter.Visitor.cs (2)
383PropertyInfo property = (PropertyInfo)member;
Hosting\ObjectFormatter\ObjectFormatterHelpers.cs (4)
150var property = currentType.GetDeclaredProperty(memberName); 214var getter = ((PropertyInfo)member).GetMethod; 260var property = (PropertyInfo)member;
Microsoft.CodeAnalysis.Test.Utilities (8)
Platform\Custom\MetadataSignatureHelper.cs (3)
521private static void AppendPropertyInfo(PropertyInfo property, StringBuilder sb) 684foreach (var property in type.GetProperties(BINDING_FLAGS).OrderBy((member) => member.Name)) 739foreach (var property in type.GetProperties(BINDING_FLAGS))
Syntax\NodeHelpers.cs (4)
181private static bool IsField(PropertyInfo prop) 206private static NodeInfo.FieldInfo GetFieldInfo(PropertyInfo prop, SyntaxNode node) 212private static NodeInfo.FieldInfo GetFieldInfo(PropertyInfo prop, SyntaxToken token) 218private static NodeInfo.FieldInfo GetFieldInfo(PropertyInfo prop, SyntaxTrivia trivia)
TargetFrameworkUtil.cs (1)
422var prop = type.GetProperty("All", BindingFlags.Public | BindingFlags.Static);
Microsoft.CodeAnalysis.UnitTests (15)
AnalyzerAssemblyLoaderTests.cs (1)
1203var prop = a.GetType().GetProperty("Ran", BindingFlags.Public | BindingFlags.Instance);
Collections\DebuggerAttributes.cs (9)
24public IEnumerable<PropertyInfo> Properties { get; } 26public DebuggerAttributeInfo(object instance, IEnumerable<PropertyInfo> properties) 44foreach (PropertyInfo pi in info.Properties) 67IEnumerable<PropertyInfo> properties = GetDebuggerVisibleProperties(proxyType); 87public static IEnumerable<PropertyInfo> GetDebuggerVisibleProperties(Type debuggerAttributeType) 90IEnumerable<PropertyInfo> visibleProperties = debuggerAttributeType.GetProperties() 217PropertyInfo? pi = GetProperty(obj, reference); 248private static PropertyInfo? GetProperty(object obj, string propertyName) 252PropertyInfo? pi = t.GetTypeInfo().GetDeclaredProperty(propertyName);
Collections\ImmutableSegmentedDictionaryBuilderTest.cs (1)
253PropertyInfo itemProperty = info.Properties.Single(pr => pr.GetCustomAttribute<DebuggerBrowsableAttribute>()!.State == DebuggerBrowsableState.RootHidden);
Collections\ImmutableSegmentedDictionaryTest.cs (1)
253PropertyInfo itemProperty = info.Properties.Single(pr => pr.GetCustomAttribute<DebuggerBrowsableAttribute>()!.State == DebuggerBrowsableState.RootHidden);
Collections\ImmutableSegmentedHashSetTest.cs (1)
189PropertyInfo itemProperty = info.Properties.Single(pr => pr.GetCustomAttribute<DebuggerBrowsableAttribute>()?.State == DebuggerBrowsableState.RootHidden);
Collections\ImmutableSegmentedListBuilderTest.cs (1)
363PropertyInfo itemProperty = info.Properties.Single(pr => pr.GetCustomAttribute<DebuggerBrowsableAttribute>()!.State == DebuggerBrowsableState.RootHidden);
Collections\ImmutableSegmentedListTest.cs (1)
778PropertyInfo itemProperty = info.Properties.Single(pr => pr.GetCustomAttribute<DebuggerBrowsableAttribute>()!.State == DebuggerBrowsableState.RootHidden);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
ObjectExtensions.cs (1)
22var propertyInfo = type.GetProperty(propertyName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Remote\ServiceDescriptorTests.cs (1)
105foreach (var property in type.GetProperties(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance))
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.Feed (1)
src\PublishArtifactsInManifestBase.cs (1)
1792foreach (PropertyInfo prop in this.GetType().GetProperties())
Microsoft.DotNet.Build.Tasks.Packaging (4)
Extensions.cs (4)
153var property = memberSelectorExpression.Member as PropertyInfo; 175var property = memberSelectorExpression.Member as PropertyInfo;
Microsoft.DotNet.Helix.Client (2)
generated-code\HelixApi.cs (2)
261var property = member as PropertyInfo;
Microsoft.DotNet.XUnitExtensions (1)
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\ConditionalTestDiscoverer.cs (1)
159PropertyInfo pi = ti.GetDeclaredProperty(name);
Microsoft.DotNet.XUnitV3Extensions (1)
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\ConditionalTestDiscoverer.cs (1)
159PropertyInfo pi = ti.GetDeclaredProperty(name);
Microsoft.Extensions.AI.Abstractions (6)
src\Shared\JsonSchemaExporter\JsonSchemaExporter.ReflectionHelpers.cs (6)
25private static PropertyInfo? _jsonTypeInfo_ElementType; 26private static PropertyInfo? _jsonPropertyInfo_MemberName; 43PropertyInfo? elementTypeProperty = typeof(JsonTypeInfo).GetProperty("ElementType", AllInstance); 55PropertyInfo? memberName = typeof(JsonPropertyInfo).GetProperty("MemberName", AllInstance); 179Debug.Assert(memberInfo is PropertyInfo or FieldInfo, "Member must be property or field."); 180return memberInfo is PropertyInfo prop
Microsoft.Extensions.AI.Abstractions.Tests (1)
Utilities\AIJsonUtilitiesTests.cs (1)
86foreach (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.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 (15)
ConfigurationBinder.cs (15)
225List<PropertyInfo> modelProperties = GetAllProperties(instance.GetType()); 249foreach (PropertyInfo property in modelProperties) 274private static void ResetPropertyValue(PropertyInfo property, object instance, BinderOptions options) 290private static void BindProperty(PropertyInfo property, object instance, IConfiguration config, BinderOptions options) 548List<PropertyInfo> properties = GetAllProperties(type); 581List<PropertyInfo> properties, out string missing) 584foreach (PropertyInfo prop in properties) 660PropertyInfo keyMethod = kvpType.GetProperty("Key", DeclaredOnlyLookup)!; 661PropertyInfo valueMethod = kvpType.GetProperty("Value", DeclaredOnlyLookup)!; 722PropertyInfo indexerProperty = dictionaryType.GetProperty("Item", DeclaredOnlyLookup)!; 1050private static List<PropertyInfo> GetAllProperties([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type) 1052var allProperties = new List<PropertyInfo>(); 1057PropertyInfo[] properties = baseType.GetProperties(DeclaredOnlyLookup); 1059foreach (PropertyInfo property in properties) 1113private static string GetPropertyName(PropertyInfo property)
Microsoft.Extensions.Diagnostics.Probes (2)
src\Shared\Data.Validation\LengthAttribute.cs (2)
133var property = GetCountProperty(value); 150private static PropertyInfo? GetCountProperty(object value) => value.GetType().GetRuntimeProperty("Count");
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
src\Shared\Data.Validation\LengthAttribute.cs (2)
133var property = GetCountProperty(value); 150private static PropertyInfo? GetCountProperty(object value) => value.GetType().GetRuntimeProperty("Count");
Microsoft.Extensions.Http.Resilience (2)
src\Shared\Data.Validation\LengthAttribute.cs (2)
133var property = GetCountProperty(value); 150private static PropertyInfo? GetCountProperty(object value) => value.GetType().GetRuntimeProperty("Count");
Microsoft.Extensions.Options.DataAnnotations (1)
DataAnnotationValidateOptions.cs (1)
96foreach (PropertyInfo propertyInfo in options.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public))
Microsoft.Extensions.Telemetry (2)
src\Shared\Data.Validation\LengthAttribute.cs (2)
133var property = GetCountProperty(value); 150private static PropertyInfo? GetCountProperty(object value) => value.GetType().GetRuntimeProperty("Count");
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
DiagDescriptorsTests.cs (1)
17foreach (var property in type.GetProperties(BindingFlags.Public | BindingFlags.Static | BindingFlags.GetProperty))
Microsoft.Gen.Logging.Unit.Tests (1)
DiagDescriptorsTests.cs (1)
18foreach (var property in type.GetProperties(BindingFlags.Public | BindingFlags.Static | BindingFlags.GetProperty))
Microsoft.Gen.Metrics.Unit.Tests (1)
DiagDescriptorsTests.cs (1)
17foreach (var property in type.GetProperties(BindingFlags.Public | BindingFlags.Static | BindingFlags.GetProperty))
Microsoft.Maui (2)
Converters\KeyboardTypeConverter.cs (1)
35 PropertyInfo? property = kbType.GetProperties()?.FirstOrDefault(pi => pi != null && pi.Name == keyboard && pi.CanRead && (pi.GetMethod?.IsStatic ?? false));
Handlers\HybridWebView\HybridWebViewHandler.cs (1)
280 var resultProperty = dotnetMethod.ReturnType.GetProperty(nameof(Task<object>.Result));
Microsoft.Maui.Controls (10)
BindingExpression.cs (7)
268 PropertyInfo GetIndexer(TypeInfo sourceType, string indexerName, string content) 272 foreach (var pi in sourceType.DeclaredProperties) 285 foreach (var pi in sourceType.DeclaredProperties) 296 foreach (var pi in sourceType.DeclaredProperties) 307 if (sourceType.BaseType is Type baseT && GetIndexer(baseT.GetTypeInfo(), indexerName, content) is PropertyInfo p) 313 if (GetIndexer(face.GetTypeInfo(), indexerName, content) is PropertyInfo pi) 327 PropertyInfo property = null;
PlatformBindingHelpers.cs (1)
44 var targetPropertyInfo = target.GetType().GetProperty(targetProperty);
Shell\ShellContent.cs (2)
389 PropertyInfo prop = type.GetRuntimeProperty(attrib.Name); 409 PropertyInfo prop = type.GetRuntimeProperty(attrib.Name);
Microsoft.Maui.Controls.Xaml (13)
ApplyPropertiesVisitor.cs (3)
342 var propertyInfo = elementType.GetRuntimeProperties().FirstOrDefault(p => p.Name == localName); 660 var propertyInfo = elementType.GetRuntimeProperties().FirstOrDefault(p => p.Name == localName); 692 PropertyInfo propertyInfo = null;
MarkupExtensions\AppThemeBindingExtension.cs (2)
61 PropertyInfo pi = null; 69 pi = valueProvider.TargetProperty as PropertyInfo;
MarkupExtensions\OnIdiomExtension.cs (2)
46 PropertyInfo pi = null; 56 pi = valueProvider.TargetProperty as PropertyInfo;
MarkupExtensions\OnPlatformExtension.cs (2)
58 PropertyInfo pi = null; 66 pi = valueProvider.TargetProperty as PropertyInfo;
MarkupExtensions\StaticExtension.cs (1)
32 var pinfo = type.GetRuntimeProperties().FirstOrDefault(pi => pi.Name == membername && pi.GetMethod.IsStatic);
MarkupExtensions\StaticResourceExtension.cs (2)
40 var pi = targetProperty as PropertyInfo;
XamlServiceProvider.cs (1)
338 && parentType.GetRuntimeProperties().FirstOrDefault(p => p.Name == name.LocalName) is PropertyInfo propertyInfo
Microsoft.ML.Core (1)
ComponentModel\ComponentCatalog.cs (1)
645var prop = loaderType.GetProperty("Instance", instType);
Microsoft.ML.Data (19)
Data\SchemaDefinition.cs (2)
188case PropertyInfo cursorChannelAttrPropertyInfo: 366case PropertyInfo propertyInfo:
DataLoadSave\Database\DatabaseLoader.cs (1)
154case PropertyInfo property:
DataLoadSave\Text\TextLoader.cs (1)
1617case PropertyInfo property:
DataView\InternalSchemaDefinition.cs (4)
32public Type FieldOrPropertyType => (MemberInfo is FieldInfo) ? (MemberInfo as FieldInfo).FieldType : (MemberInfo as PropertyInfo).PropertyType; 153case PropertyInfo propertyInfo: 246(memberInfo is PropertyInfo && (memberInfo as PropertyInfo).PropertyType == typeof(IChannel)))
DataView\TypedCursor.cs (3)
238case PropertyInfo propertyInfo: 292(memberInfo is PropertyInfo && (memberInfo as PropertyInfo).PropertyType == typeof(IChannel)))
Utils\ApiUtils.cs (8)
25private static readonly FuncStaticMethodInfo3<PropertyInfo, OpCode, Delegate> _generatePeekPropertyMethodInfo 26= new FuncStaticMethodInfo3<PropertyInfo, OpCode, Delegate>(GeneratePeek<int, int, int>); 31private static readonly FuncStaticMethodInfo3<PropertyInfo, Delegate> _generatePokePropertyMethodInfo 32= new FuncStaticMethodInfo3<PropertyInfo, Delegate>(GeneratePoke<int, int, int>); 77case PropertyInfo propertyInfo: 109private static Delegate GeneratePeek<TOwn, TRow, TValue>(PropertyInfo propertyInfo, OpCode assignmentOpCode) 145case PropertyInfo propertyInfo: 174private static Delegate GeneratePoke<TOwn, TRow, TValue>(PropertyInfo propertyInfo)
Microsoft.ML.EntryPoints (1)
JsonUtils\JsonManifestUtils.cs (1)
67foreach (var fieldInfo in propertyInfos)
Microsoft.ML.IntegrationTests (1)
Common.cs (1)
31foreach (var property in toyClassProperties)
Microsoft.ML.InternalCodeAnalyzer (1)
InstanceInitializerAnalyzer.cs (1)
53var hasInitProp = typeInfo.GetDeclaredProperty("HasInitializer");
Microsoft.ML.SearchSpace (2)
Parameter.cs (1)
196foreach (var property in properties)
SearchSpace.cs (1)
245foreach (var property in propertyInfo)
Microsoft.ML.Tests (1)
CollectionsDataViewTest.cs (1)
71foreach (var property in typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance))
Microsoft.ML.Tokenizers.Tests (1)
LlamaTests.cs (1)
69PropertyInfo? propertyInfo = typeof(SentencePieceTokenizer).GetProperty("TreatWhitespaceAsSuffix", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public);
Microsoft.TestUtilities (1)
XUnit\ConditionalTheoryDiscoverer.cs (1)
58var property = type.GetProperty("Skip");
Microsoft.VisualBasic.Core (25)
Microsoft\VisualBasic\CompilerServices\LateBinding.vb (4)
377Dim pi As PropertyInfo 574member = CType(member, PropertyInfo).GetGetMethod() 825member = CType(member, PropertyInfo).GetSetMethod() 999member = CType(member, PropertyInfo).GetGetMethod()
Microsoft\VisualBasic\CompilerServices\NewLateBinding.vb (3)
592DirectCast(member, PropertyInfo).GetIndexParameters().Length = 0)) 1246Dim propInfo As PropertyInfo = targetProcedure.AsProperty() 1257Dim propInfo As PropertyInfo = targetProcedure.AsProperty()
Microsoft\VisualBasic\CompilerServices\OverloadResolution.vb (3)
697DirectCast(newCandidate, PropertyInfo), 777Dim propertyBlock As PropertyInfo = DirectCast(candidate, PropertyInfo)
Microsoft\VisualBasic\CompilerServices\Symbols.vb (6)
663Return DirectCast(member, PropertyInfo).GetGetMethod.IsStatic 884Dim propertyBlock As PropertyInfo = DirectCast(members(memberIndex), PropertyInfo) 1346ByVal [property] As PropertyInfo, 1495Friend Function AsProperty() As PropertyInfo 1497Return TryCast(_item, PropertyInfo)
Microsoft\VisualBasic\CompilerServices\Utils.LateBinder.vb (2)
631Friend Shared Function PropertyToString(ByVal prop As Reflection.PropertyInfo) As String 719Return PropertyToString(DirectCast(member, PropertyInfo))
Microsoft\VisualBasic\CompilerServices\Utils.vb (1)
351Dim [property] As PropertyInfo = MemberInfo.GetProperty("MetadataToken", GetType(Integer), Array.Empty(Of Type)())
Microsoft\VisualBasic\CompilerServices\VBBinder.vb (5)
1600Public Overrides Function SelectProperty(ByVal bindingAttr As BindingFlags, ByVal match() As PropertyInfo, ByVal returnType As Type, ByVal indexes() As Type, ByVal modifiers() As ParameterModifier) As PropertyInfo 1605Dim ThisProperty As PropertyInfo 2064Dim ThisProperty As PropertyInfo 2144ThisProperty = CType(ThisMember, PropertyInfo)
Microsoft\VisualBasic\FileIO\SpecialDirectories.vb (1)
166Dim [property] As PropertyInfo = type?.GetProperty(propertyName)
Microsoft.VisualStudio.LanguageServices (6)
artifacts\obj\Microsoft.VisualStudio.LanguageServices\Release\net472\GeneratedInternalTypeHelper.g.cs (2)
32protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) { 39protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
Diagnostics\VisualStudioDiagnosticAnalyzerProvider.cs (4)
72var extensionType_HeaderProperty = extensionType.GetRuntimeProperty("Header"); 75var extension_HeaderType_Identifier = extension_HeaderType.GetRuntimeProperty("Identifier"); 78var extensionType_ContentProperty = extensionType.GetRuntimeProperty("Content"); 122var contentType_ContentTypeNameProperty = contentType.GetRuntimeProperty("ContentTypeName");
Microsoft.VisualStudio.LanguageServices.CSharp (2)
artifacts\obj\Microsoft.VisualStudio.LanguageServices.CSharp\Release\net472\GeneratedInternalTypeHelper.g.cs (2)
32protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) { 39protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
MSBuild (11)
LoadedType.cs (1)
70PropertyInfo[] props = type.GetProperties(BindingFlags.Instance | BindingFlags.Public);
OutOfProcTaskAppDomainWrapperBase.cs (3)
328PropertyInfo paramInfo = wrappedTask.GetType().GetProperty(param.Key, BindingFlags.Instance | BindingFlags.Public); 358PropertyInfo[] finalPropertyValues = wrappedTask.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public); 361foreach (PropertyInfo value in finalPropertyValues)
PrintLineDebugger.cs (3)
25private static readonly Lazy<PropertyInfo> CommonWriterProperty = new Lazy<PropertyInfo>( 30var propertyInfo = commonWriterType.GetProperty("Writer", BindingFlags.Public | BindingFlags.Static);
ReflectableTaskPropertyInfo.cs (4)
22private PropertyInfo _propertyInfo; 45internal ReflectableTaskPropertyInfo(PropertyInfo propertyInfo) 60internal ReflectableTaskPropertyInfo(PropertyInfo propertyInfo, bool output, bool required, bool isAssignableToITaskItemType) 74internal PropertyInfo Reflection
MSBuildTaskHost (3)
OutOfProcTaskAppDomainWrapperBase.cs (3)
328PropertyInfo paramInfo = wrappedTask.GetType().GetProperty(param.Key, BindingFlags.Instance | BindingFlags.Public); 358PropertyInfo[] finalPropertyValues = wrappedTask.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public); 361foreach (PropertyInfo value in finalPropertyValues)
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
489[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.PropertyInfo))]
netstandard (1)
netstandard.cs (1)
1457[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.PropertyInfo))]
PresentationBuildTasks (58)
MS\Internal\MarkupCompiler\MarkupCompiler.cs (3)
1832if (desc.MemberInfo is FieldInfo || desc.MemberInfo is PropertyInfo) 2820param1 = new CodeParameterDeclarationExpression(typeof(PropertyInfo), PROPINFO); 3172(memberInfo.DeclaringType.IsAssignableFrom(_ccRoot.ElementType) && (memberInfo is PropertyInfo)));
MS\Internal\MarkupCompiler\ParserExtension.cs (1)
358PropertyInfo pi = KnownTypes.Types[(int)KnownElements.Application].GetProperty(localAttribName);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlMapTable.cs (1)
1495if (memberInfo is PropertyInfo)
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\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\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\StyleXamlParser.cs (2)
441PropertyInfo pi = memberInfo as PropertyInfo;
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\TemplateXamlParser.cs (2)
498PropertyInfo pi = memberInfo as PropertyInfo;
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlNodes.cs (2)
448internal PropertyInfo PropInfo 450get { return _propertyMember as PropertyInfo;}
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (20)
654PropertyInfo contentPropertyInfo = CurrentContext.ContentPropertyInfo; 675PropertyInfo contentPropertyInfo = (PropertyInfo)propertyDynamicObject; 1512internal PropertyInfo ContentPropertyInfo 1629private PropertyInfo _contentPropertyInfo; 2185private PropertyInfo HandleElementScopedAttributes( 2194PropertyInfo xmlLangProperty = null; 3187PropertyInfo propInfo = dynamicObject as PropertyInfo; 3490PropertyInfo propertyMember = parentType.GetProperty(propertyName); 3509PropertyInfo propertyInfo = propertyMember as PropertyInfo; 3873PropertyInfo pi = ParentContext.ContentPropertyInfo; 3901private void CheckAllowedProperty(PropertyInfo pi, string propName) 4003PropertyInfo pi = propertyMember as PropertyInfo; 4534CurrentContext.ContentPropertyInfo = (PropertyInfo)propertyDynamicObject; 4579PropertyInfo pi = propertyDynamicObject as PropertyInfo; 4961PropertyInfo propertyInfo = contentWrapper.GetProperty( contentPropertyName );
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\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\TypeConverterHelper.cs (1)
45MemberInfo memberInfo = dpOrPiOrMi as PropertyInfo;
PresentationCore (5)
System\Windows\Diagnostics\XamlSourceInfoHelper.cs (3)
41private static PropertyInfo s_sourceBamlUriProperty; 42private static PropertyInfo s_elementLineNumberProperty; 43private static PropertyInfo s_elementLinePositionProperty;
System\Windows\Input\CursorConverter.cs (2)
59PropertyInfo[] properties = typeof(Cursors).GetProperties(BindingFlags.Public | BindingFlags.Static); 64PropertyInfo info = properties[i];
PresentationFramework (109)
MS\Internal\Data\IndexedEnumerable.cs (5)
488PropertyInfo pi = defaultMembers[i] as PropertyInfo; 506PropertyInfo pi = srcType.GetProperty("Count", typeof(int)); 697private PropertyInfo _reflectedCount; 698private PropertyInfo _reflectedItemAt;
MS\Internal\Data\PropertyPathWorker.cs (17)
116PropertyInfo pi; 227PropertyInfo pi; 332PropertyInfo pi; 531internal static bool IsIndexedProperty(PropertyInfo pi) 684PropertyInfo oldPI; 855PropertyInfo newPI; 1127PropertyInfo pi1; 1195PropertyInfo pi = defaultMembers[jj] as PropertyInfo; 1315PropertyInfo[] properties = type.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.FlattenHierarchy); 1319foreach (PropertyInfo pi in properties) 1339private bool MatchIndexerParameters(PropertyInfo pi, IndexerParameterInfo[] aryInfo, object[] args, bool isIList) 1550private void SetPropertyInfo(object info, out PropertyInfo pi, out PropertyDescriptor pd, out DependencyProperty dp, out DynamicPropertyAccessor dpa) 1559pi = info as PropertyInfo; 1572PropertyInfo pi; 1600private bool IsPropertyReadOnly(object item, PropertyInfo pi) 1660PropertyInfo pi;
MS\Internal\Data\XDeferredAxisSource.cs (2)
78PropertyInfo pi = (aryMembers.Length > 0) ? aryMembers[0] as PropertyInfo : null;
MS\Internal\Helper.cs (3)
599PropertyInfo propertyInfo = targetMember as PropertyInfo; 637Debug.Assert(targetMember is PropertyInfo || targetMember is MethodInfo,
MS\Internal\Interop\InternalDispatchObject.cs (3)
100PropertyInfo[] IReflect.GetProperties(BindingFlags bindingAttr) 104PropertyInfo IReflect.GetProperty(string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers) 108PropertyInfo IReflect.GetProperty(string name, BindingFlags bindingAttr)
MS\Internal\LayoutDump.cs (4)
905System.Reflection.PropertyInfo prop = paraClientType.GetProperty("Visual", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic); 930System.Reflection.PropertyInfo prop = type.GetProperty("ColumnCount"); 963System.Reflection.PropertyInfo propOfColumnIndex = typeOfCell.GetProperty("ColumnIndex", 971System.Reflection.PropertyInfo propOfRowIndex = typeOfCell.GetProperty("RowIndex",
MS\Internal\SystemDataHelper.cs (1)
77PropertyInfo nullProperty = type.GetProperty("Null", BindingFlags.Static | BindingFlags.Public | BindingFlags.FlattenHierarchy);
MS\Internal\TraceData.cs (1)
281PropertyInfo pi => $"{pi.GetType().Name}({pi.Name})",
System\Windows\Controls\DataGridAutoGeneratingColumnEventArgs.cs (1)
107typeof(PropertyInfo).IsAssignableFrom(value.GetType()),
System\Windows\Controls\DataGridColumn.cs (2)
1210PropertyInfo pi = itemProperty.Descriptor as PropertyInfo;
System\Windows\Data\CollectionView.cs (2)
1480PropertyInfo pi; 1486else if ((pi = property as PropertyInfo) != null)
System\Windows\Input\Command\CommandConverter.cs (2)
139PropertyInfo propertyInfo = ownerType.GetProperty(localName, BindingFlags.Public | BindingFlags.Static); 805PropertyInfo propertyInfo = type.GetProperty(name, BindingFlags.Public | BindingFlags.Static);
System\Windows\Input\Command\CommandValueSerializer.cs (1)
39PropertyInfo propertyInfo = ownerType.GetProperty(localName, BindingFlags.Public | BindingFlags.Static);
System\Windows\Markup\Baml2006\WpfXamlMember.cs (3)
56PropertyInfo property, 132PropertyInfo underlyingProperty = UnderlyingMember as PropertyInfo;
System\Windows\Markup\Baml2006\WpfXamlType.cs (2)
419PropertyInfo propertyInfo = memberFromBase.UnderlyingMember as PropertyInfo;
System\Windows\Markup\BamlMapTable.cs (1)
1495if (memberInfo is PropertyInfo)
System\Windows\Markup\BamlReader.cs (1)
1012PropertyInfo[] infos = attrInfo.OwnerType.GetProperties(
System\Windows\Markup\BamlRecordReader.cs (9)
1989PropertyInfo pi = dpOrPi as PropertyInfo; 3638PropertyInfo propertyInfo = attribInfo.PropInfo; 3798if (memberInfo is PropertyInfo propertyInfo) 4946PropertyInfo pi = contentProperty as PropertyInfo; 5139PropertyInfo pi = PiOrAttribInfo as PropertyInfo; 5729public PropertyInfo PropertyInfo
System\Windows\Markup\BamlRecords.cs (9)
4662PropertyInfo propInfo = PropInfo; 4695Debug.Assert((propertyMember is MethodInfo) || (propertyMember is PropertyInfo) 4764if (arr[0] is PropertyInfo) 4766return (PropertyInfo)arr[0]; 4768else if (arr[1] is PropertyInfo) 4770return (PropertyInfo)arr[1]; 4774return arr[2] as PropertyInfo; 4867internal PropertyInfo PropInfo 4943private PropertyInfo _pi = null;
System\Windows\Markup\BamlWriter.cs (4)
642PropertyInfo pi = dpOrPi as PropertyInfo; 1131PropertyInfo mostDerived = null; 1133foreach(PropertyInfo pi in infos)
System\Windows\Markup\ParserContext.cs (2)
843PropertyInfo[] propertyInfo = extensionType.GetProperties(BindingFlags.Public | BindingFlags.Instance); 847foreach (PropertyInfo property in propertyInfo)
System\Windows\Markup\XamlTypeMapper.cs (19)
824as PropertyInfo; 1101internal bool IsAllowedPropertySet(PropertyInfo pi) 1109internal bool IsAllowedPropertyGet(PropertyInfo pi) 1117internal static bool IsAllowedPropertySet(PropertyInfo pi, bool allowProtected, out bool isPublic) 1130private static bool IsAllowedPropertyGet(PropertyInfo pi, bool allowProtected, out bool isPublic) 1799internal PropertyInfo GetXmlLangProperty( 1896private PropertyInfo PropertyInfoFromName( 1903PropertyInfo info = null; 1945PropertyInfo[] infos = ownerType.GetProperties( 2046PropertyInfo propertyInfo = propertyMember as PropertyInfo; 2090PropertyInfo propertyInfo = propertyMember as PropertyInfo; 2768internal static object GetInternalPropertyValue(ParserContext pc, object rootElement, PropertyInfo pi, object target) 2783internal static bool SetInternalPropertyValue(ParserContext pc, object rootElement, PropertyInfo pi, object target, object value) 4002PropertyInfo dpInfo, 4071PropertyInfo dpInfo, 4085public PropertyInfo PropInfo; 4198public PropertyInfo XmlLangProperty;
System\Windows\Media\Animation\Storyboard.cs (2)
774else if( propertyAccessor is PropertyInfo ) 776return ((PropertyInfo)propertyAccessor).Name;
System\Windows\PropertyPath.cs (8)
171PropertyInfo pi; 193out DependencyProperty dp, out PropertyInfo pi, out PropertyDescriptor pd, out DynamicObjectAccessor doa) 201else if ((pi = accessor as PropertyInfo) != null) 651private PropertyInfo GetPropertyHelper(Type ownerType, string propertyName) 653PropertyInfo result = null; 927accessor is PropertyInfo || 936PropertyInfo pi; 942else 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 (6)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (2)
162private static readonly PropertyInfo? s_syntaxTreeDiagnosticOptionsProperty = 165private static readonly PropertyInfo? s_compilationOptionsSyntaxTreeOptionsProviderProperty =
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (3)
60if (!TryGetProperty<T, TProperty>(type, propertyName, out var property)) 104if (!TryGetProperty<T, TProperty>(type, propertyName, out var property)) 219private static bool TryGetProperty<T, TProperty>([NotNullWhen(true)] Type? type, string propertyName, [NotNullWhen(true)] out PropertyInfo? propertyInfo)
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxNodeExtensions.cs (1)
21var property = typeof(Simplifier).GetTypeInfo().GetDeclaredProperty("AddImportsAnnotation");
Shared (8)
Data.Validation\LengthAttribute.cs (2)
133var property = GetCountProperty(value); 150private static PropertyInfo? GetCountProperty(object value) => value.GetType().GetRuntimeProperty("Count");
JsonSchemaExporter\JsonSchemaExporter.ReflectionHelpers.cs (6)
25private static PropertyInfo? _jsonTypeInfo_ElementType; 26private static PropertyInfo? _jsonPropertyInfo_MemberName; 43PropertyInfo? elementTypeProperty = typeof(JsonTypeInfo).GetProperty("ElementType", AllInstance); 55PropertyInfo? memberName = typeof(JsonPropertyInfo).GetProperty("MemberName", AllInstance); 179Debug.Assert(memberInfo is PropertyInfo or FieldInfo, "Member must be property or field."); 180return memberInfo is PropertyInfo prop
System.ComponentModel.Annotations (6)
System\ComponentModel\DataAnnotations\CompareAttribute.cs (2)
38var otherPropertyInfo = validationContext.ObjectType.GetRuntimeProperty(OtherProperty); 62private string? GetDisplayNameForProperty(PropertyInfo property)
System\ComponentModel\DataAnnotations\LocalizableString.cs (1)
126var property = _resourceType.GetRuntimeProperty(_propertyValue);
System\ComponentModel\DataAnnotations\MaxLengthAttribute.cs (1)
127PropertyInfo? property = value.GetType().GetRuntimeProperty("Count");
System\ComponentModel\DataAnnotations\ValidationAttribute.cs (1)
266var property = _errorMessageResourceType
System\ComponentModel\DataAnnotations\ValidationAttributeStore.cs (1)
142internal static bool IsPublic(PropertyInfo p) =>
System.ComponentModel.Composition (15)
Microsoft\Internal\ReflectionServices.cs (1)
124internal static IEnumerable<PropertyInfo> GetAllProperties(this Type type)
System\ComponentModel\Composition\AttributedModel\AttributedPartCreationInfo.cs (2)
347foreach (PropertyInfo member in type.GetProperties(flags)) 486foreach (PropertyInfo member in type.GetProperties(flags))
System\ComponentModel\Composition\ConstraintServices.cs (2)
16private static readonly PropertyInfo _exportDefinitionContractNameProperty = typeof(ExportDefinition).GetProperty("ContractName")!; 17private static readonly PropertyInfo _exportDefinitionMetadataProperty = typeof(ExportDefinition).GetProperty("Metadata")!;
System\ComponentModel\Composition\Hosting\CompositionServices.cs (3)
33return ((PropertyInfo)member).PropertyType; 293foreach (PropertyInfo pi in attrType.GetProperties()) 480List<PropertyInfo> properties = metadataViewType.GetAllProperties().
System\ComponentModel\Composition\MetadataViewGenerator.cs (1)
209foreach (PropertyInfo propertyInfo in viewType.GetAllProperties())
System\ComponentModel\Composition\ReflectionModel\LazyMemberInfo.cs (2)
28PropertyInfo property = (PropertyInfo)member;
System\ComponentModel\Composition\ReflectionModel\ReflectionExtensions.cs (4)
50PropertyInfo? property = member as PropertyInfo; 81public static ReflectionProperty ToReflectionProperty(this PropertyInfo property) 132return ((PropertyInfo)member).ToReflectionProperty();
System.ComponentModel.Composition.Registration (32)
System\ComponentModel\Composition\Registration\PartBuilder.cs (26)
28private readonly List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportBuilder>, Type>> _propertyExports; 29private readonly List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportBuilder>, Type>> _propertyImports; 40_propertyExports = new List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportBuilder>, Type>>(); 41_propertyImports = new List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportBuilder>, Type>>(); 110public PartBuilder ExportProperties(Predicate<PropertyInfo> propertyFilter) 117public PartBuilder ExportProperties(Predicate<PropertyInfo> propertyFilter, 118Action<PropertyInfo, ExportBuilder> exportConfiguration) 128public PartBuilder ExportProperties<T>(Predicate<PropertyInfo> propertyFilter) 135public PartBuilder ExportProperties<T>(Predicate<PropertyInfo> propertyFilter, 136Action<PropertyInfo, ExportBuilder> exportConfiguration) 146public PartBuilder ImportProperties(Predicate<PropertyInfo> propertyFilter) 153public PartBuilder ImportProperties(Predicate<PropertyInfo> propertyFilter, 154Action<PropertyInfo, ImportBuilder> importConfiguration) 163public PartBuilder ImportProperties<T>(Predicate<PropertyInfo> propertyFilter) 170public PartBuilder ImportProperties<T>(Predicate<PropertyInfo> propertyFilter, 171Action<PropertyInfo, ImportBuilder> importConfiguration) 421foreach (PropertyInfo pi in type.GetProperties()) 424PropertyInfo declaredPi = pi.DeclaringType.UnderlyingSystemType.GetProperty(pi.Name, pi.PropertyType); 430foreach (Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportBuilder>, Type> importSpecification in _propertyImports) 470foreach (Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportBuilder>, Type> exportSpecification in _propertyExports)
System\ComponentModel\Composition\Registration\PartBuilderOfT.cs (6)
14private readonly PropertyInfo _propertyInfo; 27public bool VerifyPropertyInfo(PropertyInfo pi) 32public void ConfigureImport(PropertyInfo _, ImportBuilder importBuilder) 37public void ConfigureExport(PropertyInfo _, ExportBuilder exportBuilder) 42private static PropertyInfo SelectProperties(Expression<Func<T, object>> propertyFilter) 52return (PropertyInfo)memberInfo;
System.ComponentModel.TypeConverter (12)
src\libraries\Common\src\System\Drawing\ColorTable.cs (1)
26foreach (PropertyInfo prop in typeWithColors.GetProperties(BindingFlags.Public | BindingFlags.Static))
System\ComponentModel\ComponentResourceManager.cs (1)
181PropertyInfo? 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)
1362PropertyInfo[] propertyInfos = TrimSafeReflectionHelper.GetProperties(type, bindingFlags); 1369PropertyInfo propertyInfo = propertyInfos[idx];
System\ComponentModel\TrimSafeReflectionHelper.cs (2)
13public static PropertyInfo[] GetProperties(Type type, BindingFlags bindingAttr) => type.GetProperties(bindingAttr); 14public static PropertyInfo? GetProperty(Type type, string name, BindingFlags bindingAttr) => type.GetProperty(name, bindingAttr);
System.Composition.Convention (44)
System\Composition\Convention\ConventionBuilder.cs (2)
183if (mi != null && (mi is ConstructorInfo || mi is TypeInfo || mi is PropertyInfo || mi is MethodInfo)) 218else if (member is PropertyInfo || member is ConstructorInfo || member is MethodInfo)
System\Composition\Convention\PartConventionBuilder.cs (35)
33private readonly List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportConventionBuilder>, Type>> _propertyExports; 34private readonly List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportConventionBuilder>>> _propertyImports; 44_propertyExports = new List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportConventionBuilder>, Type>>(); 45_propertyImports = new List<Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportConventionBuilder>>>(); 179public PartConventionBuilder ExportProperties(Predicate<PropertyInfo> propertyFilter) 192public PartConventionBuilder ExportProperties(Predicate<PropertyInfo> propertyFilter, 193Action<PropertyInfo, ExportConventionBuilder> exportConfiguration) 201private PartConventionBuilder ExportPropertiesImpl(Predicate<PropertyInfo> propertyFilter, 202Action<PropertyInfo, ExportConventionBuilder> exportConfiguration) 214public PartConventionBuilder ExportProperties<T>(Predicate<PropertyInfo> propertyFilter) 228public PartConventionBuilder ExportProperties<T>(Predicate<PropertyInfo> propertyFilter, 229Action<PropertyInfo, ExportConventionBuilder> exportConfiguration) 237private PartConventionBuilder ExportPropertiesImpl<T>(Predicate<PropertyInfo> propertyFilter, 238Action<PropertyInfo, ExportConventionBuilder> exportConfiguration) 249public PartConventionBuilder ImportProperties(Predicate<PropertyInfo> propertyFilter) 262public PartConventionBuilder ImportProperties(Predicate<PropertyInfo> propertyFilter, 263Action<PropertyInfo, ImportConventionBuilder> importConfiguration) 271private PartConventionBuilder ImportPropertiesImpl(Predicate<PropertyInfo> propertyFilter, 272Action<PropertyInfo, ImportConventionBuilder> importConfiguration) 284public PartConventionBuilder ImportProperties<T>(Predicate<PropertyInfo> propertyFilter) 298public PartConventionBuilder ImportProperties<T>(Predicate<PropertyInfo> propertyFilter, 299Action<PropertyInfo, ImportConventionBuilder> importConfiguration) 307private PartConventionBuilder ImportPropertiesImpl<T>(Predicate<PropertyInfo> propertyFilter, 308Action<PropertyInfo, ImportConventionBuilder> importConfiguration) 310Predicate<PropertyInfo> typedFilter = pi => pi.PropertyType.Equals(typeof(T)) && (propertyFilter == null || propertyFilter(pi)); 666foreach (PropertyInfo pi in type.GetRuntimeProperties()) 673PropertyInfo underlyingPi = null; 676foreach (Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ImportConventionBuilder>> importSpecification in _propertyImports) 713foreach (Tuple<Predicate<PropertyInfo>, Action<PropertyInfo, ExportConventionBuilder>, Type> exportSpecification in _propertyExports)
System\Composition\Convention\PartConventionBuilderOfT.cs (7)
69private readonly PropertyInfo _propertyInfo; 83public bool VerifyPropertyInfo(PropertyInfo pi) 88public void ConfigureImport(PropertyInfo _, ImportConventionBuilder importBuilder) 93public void ConfigureExport(PropertyInfo _, ExportConventionBuilder exportBuilder) 98private static PropertyInfo SelectProperties(Expression<Func<T, object>> propertySelector) 105var memberInfo = ((MemberExpression)expr).Member as PropertyInfo;
System.Composition.Hosting (1)
System\Composition\Hosting\Providers\Metadata\MetadataViewProvider.cs (1)
52foreach (var prop in typeof(TMetadata).GetTypeInfo().DeclaredProperties
System.Composition.TypedParts (12)
System\Composition\CompositionContextExtensions.cs (1)
53foreach (var pi in objType.GetRuntimeProperties())
System\Composition\TypedParts\ActivationFeatures\PropertyImportSite.cs (3)
13private readonly PropertyInfo _pi; 15public PropertyImportSite(PropertyInfo pi) 20public PropertyInfo Property { get { return _pi; } }
System\Composition\TypedParts\ActivationFeatures\PropertyInjectionFeature.cs (1)
85var property = d.Key;
System\Composition\TypedParts\ContractHelpers.cs (1)
71foreach (var prop in attrType
System\Composition\TypedParts\Discovery\DiscoveredPropertyExport.cs (3)
15private readonly PropertyInfo _property; 17public DiscoveredPropertyExport(CompositionContract contract, IDictionary<string, object> metadata, PropertyInfo property) 40var property = closedPartType.AsType().GetRuntimeProperty(_property.Name);
System\Composition\TypedParts\Discovery\TypeInspector.cs (3)
78foreach (var property in partTypeAsType.GetRuntimeProperties() 156foreach (var prop in attrType 164private static void CheckPropertyExportCompatibility(TypeInfo partType, PropertyInfo property, TypeInfo contractType)
System.Configuration.ConfigurationManager (9)
System\Configuration\ApplicationSettingsBase.cs (5)
438private SettingsProperty CreateSetting(PropertyInfo propertyInfo) 551PropertyInfo[] properties = SettingsFilter(type.GetProperties(BindingFlags.Instance | BindingFlags.Public)); 713private static PropertyInfo[] SettingsFilter(PropertyInfo[] allProps) 715var settingProps = new List<PropertyInfo>();
System\Configuration\ConfigurationElement.cs (3)
751foreach (PropertyInfo propertyInformation in type.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)) 760private static ConfigurationProperty CreateConfigurationPropertyFromAttributes(PropertyInfo propertyInformation) 870foreach (PropertyInfo pi in GetType().GetProperties())
System\Configuration\ConfigurationProperty.cs (1)
68internal ConfigurationProperty(PropertyInfo info)
System.Data.Common (2)
System\Data\Common\SqlUDTStorage.cs (1)
45PropertyInfo? propInfo = type.GetProperty("Null", BindingFlags.Public | BindingFlags.Static);
System\Data\DataColumn.cs (1)
661PropertyInfo propInfo = _dataType.GetProperty("Null", System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static)!;
System.Diagnostics.DiagnosticSource (7)
System\Diagnostics\DsesFilterAndTransform.cs (7)
771PropertyInfo? propertyInfo = typeInfo.GetDeclaredProperty(propertyName); 774foreach (PropertyInfo pi in typeInfo.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static)) 818private static PropertyFetch CreatePropertyFetch(Type type, PropertyInfo propertyInfo) 842public RefTypedFetchProperty(Type type, PropertyInfo property) : base(type) 861public ValueTypedFetchProperty(Type type, PropertyInfo property) : base(type) 884public ReflectionPropertyFetch(Type type, PropertyInfo property) : base(type) 1023foreach (PropertyInfo property in curTypeInfo.GetProperties(BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic))
System.Drawing.Primitives (1)
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)
207if (member.Member is PropertyInfo prop)
System\Linq\Expressions\Compiler\LambdaCompiler.Address.cs (4)
261var property = node.Member as PropertyInfo; 284PropertyInfo pi = (PropertyInfo)node.Member;
System\Linq\Expressions\Compiler\LambdaCompiler.Expressions.cs (12)
819Debug.Assert(member is PropertyInfo); 820var prop = (PropertyInfo)member; 863Debug.Assert(member is PropertyInfo); 864var prop = (PropertyInfo)member; 966Debug.Assert(binding.Member is PropertyInfo); 967EmitCall(objectType, (binding.Member as PropertyInfo)!.GetSetMethod(nonPublic: true)!); 974if (binding.Member is PropertyInfo && type.IsValueType) 992if (binding.Member is PropertyInfo && type.IsValueType) 1104Debug.Assert(member is FieldInfo || member is PropertyInfo); 1105return member is FieldInfo fi ? fi.FieldType : (member as PropertyInfo)!.PropertyType;
System\Linq\Expressions\Compiler\StackSpiller.Bindings.cs (1)
49if (_binding.Member is PropertyInfo property && property.PropertyType.IsValueType)
System\Linq\Expressions\Compiler\StackSpiller.cs (1)
392node.Member is PropertyInfo)
System\Linq\Expressions\Expression.cs (2)
255PropertyInfo? indexer = ((IndexExpression)expression).Indexer; 263if (member is PropertyInfo prop)
System\Linq\Expressions\Expression.DebuggerProxy.cs (1)
175public PropertyInfo? Indexer => _node.Indexer;
System\Linq\Expressions\IndexExpression.cs (17)
25PropertyInfo? indexer, 67/// Gets the <see cref="PropertyInfo"/> for the property if the expression represents an indexed property, returns null otherwise. 69public PropertyInfo? Indexer { get; } 138public static IndexExpression MakeIndex(Expression instance, PropertyInfo? indexer, IEnumerable<Expression>? arguments) 217PropertyInfo pi = FindInstanceProperty(instance.Type, propertyName, arguments); 227private static PropertyInfo FindInstanceProperty( 234PropertyInfo? pi = FindProperty(type, propertyName, arguments, flags); 270private static PropertyInfo? FindProperty( 276PropertyInfo? property = null; 278foreach (PropertyInfo pi in type.GetProperties(flags)) 296private static bool IsCompatible(PropertyInfo pi, Expression[]? args) 345/// <param name="indexer">The <see cref="PropertyInfo"/> that represents the property to index.</param> 348public static IndexExpression Property(Expression? instance, PropertyInfo indexer, params Expression[]? arguments) 357/// <param name="indexer">The <see cref="PropertyInfo"/> that represents the property to index.</param> 360public static IndexExpression Property(Expression? instance, PropertyInfo indexer, IEnumerable<Expression>? arguments) => 363private static IndexExpression MakeIndexProperty(Expression? instance, PropertyInfo indexer, string paramName, ReadOnlyCollection<Expression> argList) 374private static void ValidateIndexedProperty(Expression? instance, PropertyInfo indexer, string paramName, ref ReadOnlyCollection<Expression> argList)
System\Linq\Expressions\Interpreter\LightCompiler.cs (11)
664if (refMember is PropertyInfo pi) 2324Debug.Assert(member.Member is PropertyInfo); 2325var property = (PropertyInfo)member.Member; 2483var pi = (PropertyInfo)member; 2746if (memberMember.Member is PropertyInfo && type.IsValueType) 2763var pi = member as PropertyInfo; 3213private readonly PropertyInfo _property; 3215public PropertyByRefUpdater(LocalDefinition? obj, PropertyInfo property, int argumentIndex)
System\Linq\Expressions\MemberAssignment.cs (2)
75/// <param name="propertyAccessor">The <see cref="PropertyInfo"/> for the property which is being assigned to.</param> 99case PropertyInfo pi:
System\Linq\Expressions\MemberExpression.cs (12)
33internal static PropertyExpression Make(Expression? expression, PropertyInfo property) 48return fi == null ? (MemberExpression)Make(expression, (PropertyInfo)member) : Make(expression, fi); 105private readonly PropertyInfo _property; 106public PropertyExpression(Expression? expression, PropertyInfo member) 211PropertyInfo? pi = expression.Type.GetProperty(propertyName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.IgnoreCase | BindingFlags.FlattenHierarchy) 235PropertyInfo? pi = type.GetProperty(propertyName, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.IgnoreCase | BindingFlags.FlattenHierarchy) 250public static MemberExpression Property(Expression? expression, PropertyInfo property) 308private static PropertyInfo GetProperty(MethodInfo mi, string? paramName, int index = -1) 315PropertyInfo[] props = type.GetProperties(flags); 316foreach (PropertyInfo pi in props) 364PropertyInfo? pi = expression.Type.GetProperty(propertyOrFieldName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.IgnoreCase | BindingFlags.FlattenHierarchy); 394if (member is PropertyInfo pi)
System\Linq\Expressions\MemberListBinding.cs (4)
66/// <paramref name="member"/> does not represent a field or property.-or-The <see cref="FieldInfo.FieldType"/> or <see cref="PropertyInfo.PropertyType"/> of the field or property that <paramref name="member"/> represents does not implement <see cref="Collections.IEnumerable"/>.</exception> 79/// <paramref name="member"/> does not represent a field or property.-or-The <see cref="FieldInfo.FieldType"/> or <see cref="PropertyInfo.PropertyType"/> of the field or property that <paramref name="member"/> represents does not implement <see cref="Collections.IEnumerable"/>.</exception> 98/// <paramref name="propertyAccessor"/> does not represent a property accessor method.-or-The <see cref="PropertyInfo.PropertyType"/> of the property that the method represented by <paramref name="propertyAccessor"/> accesses does not implement <see cref="IEnumerable"/>.</exception> 112/// <paramref name="propertyAccessor"/> does not represent a property accessor method.-or-The <see cref="PropertyInfo.PropertyType"/> of the property that the method represented by <paramref name="propertyAccessor"/> accesses does not implement <see cref="IEnumerable"/>.</exception>
System\Linq\Expressions\MemberMemberBinding.cs (3)
97/// the Member property set to the <see cref="PropertyInfo"/> that represents the property accessed in <paramref name="propertyAccessor"/>, 113/// the Member property set to the <see cref="PropertyInfo"/> that represents the property accessed in <paramref name="propertyAccessor"/>, 135case PropertyInfo pi:
System\Linq\Expressions\NewExpression.cs (2)
325if (member is PropertyInfo pi) 346PropertyInfo prop = GetProperty(method, paramName, index);
System.Net.Http (2)
src\libraries\Common\src\System\Net\Security\SslClientAuthenticationOptionsExtensions.cs (2)
38PropertyInfo[] properties = typeof(SslClientAuthenticationOptions).GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly)!; 40foreach (PropertyInfo pi in properties)
System.Net.Security (9)
src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (9)
110PropertyInfo? pooledConnectionIdleTimeoutProp = socketsHttpHandlerType.GetProperty("PooledConnectionIdleTimeout"); 111PropertyInfo? allowAutoRedirectProp = socketsHttpHandlerType.GetProperty("AllowAutoRedirect"); 113PropertyInfo? requestUriProp = httpRequestMessageType.GetProperty("RequestUri"); 117PropertyInfo? maxResponseContentBufferSizeProp = httpClientType.GetProperty("MaxResponseContentBufferSize"); 118PropertyInfo? responseContentProp = httpResponseMessageType.GetProperty("Content"); 119PropertyInfo? responseStatusCodeProp = httpResponseMessageType.GetProperty("StatusCode"); 120PropertyInfo? responseHeadersProp = httpResponseMessageType.GetProperty("Headers"); 121PropertyInfo? responseHeadersLocationProp = httpResponseHeadersType.GetProperty("Location"); 123PropertyInfo? taskOfHttpResponseMessageResultProp = taskOfHttpResponseMessageType.GetProperty("Result");
System.Net.Sockets (1)
System\Net\Sockets\Socket.Unix.cs (1)
275foreach (PropertyInfo pi in typeof(Socket).GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly))
System.Private.CoreLib (102)
src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (10)
633public sealed override PropertyInfo? SelectProperty(BindingFlags bindingAttr, PropertyInfo[] match, Type? returnType, 648PropertyInfo[] candidates = (PropertyInfo[])match.Clone(); 741PropertyInfo bestMatch = candidates[currentMin]; 833public static PropertyInfo? ExactPropertyBinding(PropertyInfo[] match, Type? returnType, Type[]? types) 837PropertyInfo? bestMatch = null; 1075private static int FindMostSpecificProperty(PropertyInfo cur1, PropertyInfo cur2)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (1)
3049PropertyInfo p = attributeType.GetProperty(namedArgument.MemberInfo.Name, BindingFlags.Public | BindingFlags.Instance)!;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\PropertyAnalysis.cs (2)
15internal readonly PropertyInfo propertyInfo; 22PropertyInfo propertyInfo,
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\PropertyValue.cs (8)
14/// To get the value of a property quickly, use a delegate produced by <see cref="GetPropertyGetter(PropertyInfo)"/>. 158public static Func<PropertyValue, PropertyValue> GetPropertyGetter(PropertyInfo property) 172private static Func<PropertyValue, PropertyValue> GetBoxedValueTypePropertyGetter(PropertyInfo property) 193private static Func<PropertyValue, PropertyValue> GetReferenceTypePropertyGetter(PropertyInfo property) 201public abstract Func<PropertyValue, PropertyValue> GetPropertyGetter(PropertyInfo property); 205protected static Delegate GetGetMethod(PropertyInfo property, Type propertyType) 213private static Func<TContainer, TProperty> GetGetMethod<TProperty>(PropertyInfo property) where TProperty : struct => 216public override Func<PropertyValue, PropertyValue> GetPropertyGetter(PropertyInfo property)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\Statics.cs (2)
328PropertyInfo propInfo, 334public static AttributeType? GetCustomAttribute<AttributeType>(PropertyInfo propInfo)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TypeAnalysis.cs (1)
30foreach (PropertyInfo propertyInfo in dataType.GetProperties())
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\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeNamedArgument.cs (2)
23PropertyInfo property => property.PropertyType, 65((PropertyInfo)_memberInfo).PropertyType;
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (2)
434protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, 441public override PropertyInfo[] GetProperties(BindingFlags bindingAttr)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilderInstantiation.cs (2)
196protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) { throw new NotSupportedException(); } 199public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) { throw new NotSupportedException(); }
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\libraries\System.Private.CoreLib\src\System\Reflection\ModifiedType.cs (2)
140protected override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, 145public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_ModifiedType);
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\libraries\System.Private.CoreLib\src\System\Reflection\ParameterInfo.cs (1)
91args = ((PropertyInfo)MemberImpl).GetIndexParameters();
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\libraries\System.Private.CoreLib\src\System\Reflection\RuntimeReflectionExtensions.cs (2)
36public static IEnumerable<PropertyInfo> GetRuntimeProperties( 76public static PropertyInfo? GetRuntimeProperty(
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureType.cs (2)
136public sealed override PropertyInfo[] GetProperties(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType); 148protected sealed override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType);
src\libraries\System.Private.CoreLib\src\System\Reflection\TypeDelegator.cs (2)
111protected override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, 121public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) => typeImpl.GetProperties(bindingAttr);
src\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\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (3)
608PropertyInfo[] semiFinalists = GetProperties(this, name, bindingFlags)!; 612static PropertyInfo[]? GetProperties(RuntimeType thisType, string name, BindingFlags bindingFlags) 613=> thisType.GetMember(name, MemberTypes.Property, bindingFlags) as PropertyInfo[];
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\libraries\System.Private.CoreLib\src\System\Type.Helpers.cs (2)
152PropertyInfo?[]? p = null; 299if (p[i] is PropertyInfo pi)
src\System\Attribute.CoreCLR.cs (10)
16private static Attribute[] InternalGetCustomAttributes(PropertyInfo element, Type type, bool inherit) 30PropertyInfo? baseProp = GetParentDefinition(element, indexParamTypes); 53private static bool InternalIsDefined(PropertyInfo element, Type attributeType, bool inherit) 69PropertyInfo? baseProp = GetParentDefinition(element, indexParamTypes); 86private static PropertyInfo? GetParentDefinition(PropertyInfo property, Type[] propertyParameters) 380private static Type[] GetIndexParameterTypes(PropertyInfo element) 460MemberTypes.Property => InternalGetCustomAttributes((PropertyInfo)element, attributeType, inherit), 477MemberTypes.Property => InternalGetCustomAttributes((PropertyInfo)element, typeof(Attribute), inherit), 499MemberTypes.Property => InternalIsDefined((PropertyInfo)element, attributeType, inherit),
src\System\Reflection\Emit\CustomAttributeBuilder.cs (5)
35this(con, constructorArgs, Array.Empty<PropertyInfo>(), Array.Empty<object>(), Array.Empty<FieldInfo>(), Array.Empty<object>()) 41public CustomAttributeBuilder(ConstructorInfo con, object?[] constructorArgs, PropertyInfo[] namedProperties, object?[] propertyValues) : 49this(con, constructorArgs, Array.Empty<PropertyInfo>(), Array.Empty<object>(), namedFields, fieldValues) 55public CustomAttributeBuilder(ConstructorInfo con, object?[] constructorArgs, PropertyInfo[] namedProperties, object?[] propertyValues, FieldInfo[] namedFields, object?[] fieldValues) 133PropertyInfo property = namedProperties[i] ?? throw new ArgumentNullException($"namedProperties[{i}]");
src\System\Reflection\Emit\RuntimeEnumBuilder.cs (2)
159protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, 166public override PropertyInfo[] GetProperties(BindingFlags bindingAttr)
src\System\Reflection\Emit\RuntimeGenericTypeParameterBuilder.cs (2)
134protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) { throw new NotSupportedException(); } 137public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) { throw new NotSupportedException(); }
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (2)
769protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, 776public override PropertyInfo[] GetProperties(BindingFlags bindingAttr)
src\System\Reflection\RuntimeCustomAttributeData.cs (2)
276PropertyInfo[] properties = m_ctor.DeclaringType.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); 290foreach (PropertyInfo pi in properties)
src\System\RuntimeType.CoreCLR.cs (9)
2545private ListBuilder<PropertyInfo> GetPropertyCandidates( 2554ListBuilder<PropertyInfo> candidates = new ListBuilder<PropertyInfo>(cache.Length); 2649public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) 2684ListBuilder<PropertyInfo> properties = GetPropertyCandidates(null, bindingAttr, null, false); 2856protected override PropertyInfo? GetPropertyImpl( 2861ListBuilder<PropertyInfo> candidates = GetPropertyCandidates(name, bindingAttr, types, false); 2869PropertyInfo firstCandidate = candidates[0]; 3034ListBuilder<PropertyInfo> properties = default;
System.Private.DataContractSerialization (54)
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)
830if (member is PropertyInfo property) 881PropertyInfo? property = member as PropertyInfo;
System\Runtime\Serialization\CodeGenerator.cs (2)
586else if (memberInfo is PropertyInfo property) 618else if (memberInfo is PropertyInfo property)
System\Runtime\Serialization\DataMember.cs (5)
175else if (MemberInfo is PropertyInfo prop) 256PropertyInfo property = (PropertyInfo)memberInfo; 281PropertyInfo property = (PropertyInfo)memberInfo;
System\Runtime\Serialization\Json\JsonFormatGeneratorStatics.cs (16)
19private static PropertyInfo? s_collectionItemNameProperty; 23private static PropertyInfo? s_extensionDataProperty; 43private static PropertyInfo? s_localNameProperty; 45private static PropertyInfo? s_namespaceProperty; 49private static PropertyInfo? s_nodeTypeProperty; 63private static PropertyInfo? s_typeHandleProperty; 67private static PropertyInfo? s_useSimpleDictionaryFormatReadProperty; 69private static PropertyInfo? s_useSimpleDictionaryFormatWriteProperty; 102public static PropertyInfo CollectionItemNameProperty 120public static PropertyInfo ExtensionDataProperty => s_extensionDataProperty ??= typeof(IExtensibleDataObject).GetProperty("ExtensionData")!; 224public static PropertyInfo LocalNameProperty 236public static PropertyInfo NamespaceProperty 272public static PropertyInfo NodeTypeProperty 347public static PropertyInfo TypeHandleProperty 371public static PropertyInfo UseSimpleDictionaryFormatReadProperty 383public 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 (18)
71private static PropertyInfo? s_extensionDataProperty; 72internal static PropertyInfo ExtensionDataProperty => s_extensionDataProperty ??= typeof(IExtensibleDataObject).GetProperty("ExtensionData")!; 194private static PropertyInfo? s_nodeTypeProperty; 195internal static PropertyInfo NodeTypeProperty 873private static PropertyInfo? s_namespaceProperty; 874internal static PropertyInfo NamespaceProperty 918private static PropertyInfo? s_childElementNamespacesProperty; 919internal static PropertyInfo ChildElementNamespacesProperty 933private static PropertyInfo? s_collectionItemNameProperty; 934internal static PropertyInfo CollectionItemNameProperty 947private static PropertyInfo? s_childElementNamespaceProperty; 948internal static PropertyInfo ChildElementNamespaceProperty 1060private static PropertyInfo? s_serializeReadOnlyTypesProperty; 1061internal static PropertyInfo SerializeReadOnlyTypesProperty 1074private static PropertyInfo? s_classSerializationExceptionMessageProperty; 1075internal static PropertyInfo ClassSerializationExceptionMessageProperty 1088private static PropertyInfo? s_collectionSerializationExceptionMessageProperty; 1089internal static PropertyInfo CollectionSerializationExceptionMessageProperty
System\Runtime\Serialization\XmlFormatWriterGenerator.cs (1)
195private void ThrowIfCannotSerializeReadOnlyTypes(PropertyInfo serializationExceptionMessageProperty)
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)
194PropertyInfo propertyInfo => propertyInfo.GetValue(_instance), 205case PropertyInfo propertyInfo:
System.Private.Xml (52)
System\Xml\Serialization\CodeGenerator.cs (11)
496private static MethodInfo? GetPropertyMethodFromBaseType(PropertyInfo propertyInfo, bool isGetter) 501PropertyInfo? currentProperty; 552System.Diagnostics.Debug.Assert(memberInfo is PropertyInfo); 553PropertyInfo property = (PropertyInfo)memberInfo; 585System.Diagnostics.Debug.Assert(memberInfo is PropertyInfo); 586PropertyInfo property = (PropertyInfo)memberInfo; 620System.Diagnostics.Debug.Assert(memberInfo is PropertyInfo); 621PropertyInfo property = (PropertyInfo)memberInfo;
System\Xml\Serialization\Models.cs (9)
171if (!(members[i] is PropertyInfo)) 179if (members[i] is PropertyInfo) 193else if (memberInfo is PropertyInfo) 194model = GetPropertyModel((PropertyInfo)memberInfo); 231private FieldModel? GetPropertyModel(PropertyInfo propertyInfo) 247internal static bool CheckPropertyRead(PropertyInfo propertyInfo) 315PropertyInfo? specifiedProperty = memberInfo.DeclaringType.GetProperty($"{memberInfo.Name}Specified"); 329if (memberInfo is PropertyInfo) 331_readOnly = !((PropertyInfo)memberInfo).CanWrite;
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (7)
617if (memberInfo is PropertyInfo propInfo) 633if (memberInfo is PropertyInfo propInfo) 662if (memberInfo is PropertyInfo propertyInfo) 1058else if (memberInfo is PropertyInfo propertyInfo) 1654var pi = member.Mapping.MemberInfo as PropertyInfo; 2116if (memberInfo is PropertyInfo propInfo)
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (5)
825if (memberInfo is PropertyInfo memberProperty) 1463if (memberInfo is PropertyInfo propInfo && propInfo.GetMethod == null) 1471if (mi is PropertyInfo pi && pi.GetMethod != null && pi.PropertyType == propInfo.PropertyType) 1490if (memberInfo is PropertyInfo propInfo && propInfo.SetMethod == null) 1498if (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)
1079PropertyInfo? propertyInfo = memberInfo as PropertyInfo; 1105private static bool CanWriteProperty(PropertyInfo propertyInfo, TypeDesc typeDesc) 1197foreach (PropertyInfo info in currentType.GetProperties(DeclaredOnlyLookup)) 1209&& memberInfoToBeReplaced is PropertyInfo 1210&& ((PropertyInfo)memberInfoToBeReplaced).GetMethod!.IsPublic 1308PropertyInfo? p = enumerator.ReturnType.GetProperty("Current"); 1330internal static PropertyInfo GetDefaultIndexer( 1346PropertyInfo? indexer = null; 1353if (defaultMembers[i] is PropertyInfo defaultProp)
System\Xml\Serialization\XmlReflectionImporter.cs (2)
853if (!(memberInfo is FieldInfo || memberInfo is PropertyInfo)) 1478PropertyInfo? 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)
2793ilg.ConvertValue(stackType, memInfo is FieldInfo ? ((FieldInfo)memInfo).FieldType : ((PropertyInfo)memInfo).PropertyType);
System\Xml\Serialization\XmlSerializationWriter.cs (3)
1687typeof(FieldInfo).FullName, typeof(PropertyInfo).FullName)); 1778if (memberInfos[i] is PropertyInfo) 1838PropertyInfo defaultIndexer = TypeScope.GetDefaultIndexer(type, null);
System\Xml\Serialization\XmlSerializationWriterILGen.cs (1)
2513PropertyInfo propInfo = CodeGenerator.GetVariableType(fixup).GetProperty(vars[1])!;
System.Reflection (1)
System.Reflection.cs (1)
29[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.PropertyInfo))]
System.Reflection.Context (43)
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 (20)
14private IEnumerable<PropertyInfo>? _newProperties; 47public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) 50PropertyInfo[] properties = base.GetProperties(bindingAttr); 60List<PropertyInfo> results = new List<PropertyInfo>(properties); 71IEnumerable<PropertyInfo> newProperties = baseType.NewProperties; 75foreach (PropertyInfo prop in newProperties) 85protected override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) 87PropertyInfo? property = base.GetPropertyImpl(name, bindingAttr, binder, returnType, types, modifiers); 104List<PropertyInfo> matchingProperties = new List<PropertyInfo>(); 116foreach (PropertyInfo newDeclaredProperty in type.NewProperties) 126foreach (PropertyInfo newBaseProperty in type.NewProperties) 158foreach (PropertyInfo prop in NewProperties) 171foreach (PropertyInfo prop in baseType.NewProperties) 173PropertyInfo inheritedProperty = new InheritedPropertyInfo(prop, this); 225foreach (PropertyInfo newDeclaredProperty in NewProperties) 244foreach (PropertyInfo newBaseProperty in baseType.NewProperties) 248PropertyInfo inheritedProperty = new InheritedPropertyInfo(newBaseProperty, this); 285private IEnumerable<PropertyInfo> NewProperties => _newProperties ??= ReflectionContext.GetNewPropertiesForType(this);
System\Reflection\Context\CustomReflectionContext.cs (6)
56protected virtual IEnumerable<PropertyInfo> AddProperties(Type type) 62protected PropertyInfo CreateProperty( 79protected PropertyInfo CreateProperty( 99internal IEnumerable<PropertyInfo> GetNewPropertiesForType(CustomType type) 106IEnumerable<PropertyInfo> newProperties = AddProperties(type.UnderlyingType); 109foreach (PropertyInfo prop in newProperties)
System\Reflection\Context\CustomReflectionContext.Projector.cs (3)
144public override PropertyInfo? ProjectProperty(PropertyInfo? value) 251output = ProjectProperty((PropertyInfo)value);
System\Reflection\Context\Delegation\DelegatingPropertyInfo.cs (2)
12public DelegatingPropertyInfo(PropertyInfo property) 64public PropertyInfo UnderlyingProperty { get; }
System\Reflection\Context\Delegation\DelegatingType.cs (3)
376public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) 381protected override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) 384PropertyInfo? property;
System\Reflection\Context\Projection\ProjectingPropertyInfo.cs (1)
14public ProjectingPropertyInfo(PropertyInfo property, Projector projector)
System\Reflection\Context\Projection\ProjectingType.cs (3)
233PropertyInfo[] properties = GetProperties(bindingAttr); 282public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) 287protected override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers)
System\Reflection\Context\Projection\Projector.cs (2)
62public abstract PropertyInfo? ProjectProperty(PropertyInfo? value);
System\Reflection\Context\Virtual\InheritedPropertyInfo.cs (1)
15public InheritedPropertyInfo(PropertyInfo baseProperty, Type reflectedType)
System.Reflection.DispatchProxy (4)
src\libraries\Common\src\System\Reflection\Emit\IgnoreAccessChecksToAttributeBuilder.cs (2)
83PropertyInfo allowMultipleProperty = 91new PropertyInfo[] { allowMultipleProperty },
System\Reflection\DispatchProxyGenerator.cs (2)
323foreach (PropertyInfo pi in iface.GetRuntimeProperties()) 373foreach (PropertyInfo pi in iface.GetRuntimeProperties())
System.Reflection.Emit (25)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (2)
434protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, 441public override PropertyInfo[] GetProperties(BindingFlags bindingAttr)
System\Reflection\Emit\EnumBuilderImpl.cs (2)
132public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) => throw new NotSupportedException(); 134protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder,
System\Reflection\Emit\GenericTypeParameterBuilderImpl.cs (2)
124protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(); 126public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) => throw new NotSupportedException();
System\Reflection\Emit\ILGeneratorImpl.cs (1)
581PropertyInfo argCountProperty = typeof(SignatureHelper).GetProperty("ArgumentCount", BindingFlags.NonPublic | BindingFlags.Instance)!;
System\Reflection\Emit\TypeBuilderImpl.cs (18)
1010private PropertyInfo[] GetProperties(string name, BindingFlags bindingAttr) 1014PropertyInfo[] candidates = GetProperties(bindingAttr); 1015List<PropertyInfo> properties = new List<PropertyInfo>(); 1016foreach (PropertyInfo property in candidates) 1028public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) 1032List<PropertyInfo> candidates = new List<PropertyInfo>(_propertyDefinitions.Count); 1051protected override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, 1056List<PropertyInfo> candidates = GetPropertyCandidates(name, bindingAttr, types); 1064PropertyInfo firstCandidate = candidates[0]; 1088private List<PropertyInfo> GetPropertyCandidates(string name, BindingFlags bindingAttr, Type[]? types) 1090PropertyInfo[] properties = GetProperties(bindingAttr); 1092List<PropertyInfo> candidates = new List<PropertyInfo>(properties.Length); 1095PropertyInfo propertyInfo = properties[i]; 1182PropertyInfo[] properties = []; 1342PropertyInfo[] properties = GetProperties(bindingAttr);
System.Reflection.MetadataLoadContext (48)
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 (12)
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) =>
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)
236internal sealed override IEnumerable<PropertyInfo> GetPropertiesCore(NameFilter? filter, Type reflectedType) => SpecializeProperties(filter, reflectedType, this); 243internal 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)
196internal 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)
384internal abstract IEnumerable<PropertyInfo> GetPropertiesCore(NameFilter? filter, Type reflectedType);
System.Reflection.TypeExtensions (12)
System\Reflection\TypeExtensions.cs (12)
278public static PropertyInfo[] GetProperties( 287public static PropertyInfo[] GetProperties( 297public static PropertyInfo? GetProperty( 307public static PropertyInfo? GetProperty( 318public static PropertyInfo? GetProperty( 329public static PropertyInfo? GetProperty( 537public static MethodInfo[] GetAccessors(this PropertyInfo property) 545public static MethodInfo[] GetAccessors(this PropertyInfo property, bool nonPublic) 553public static MethodInfo? GetGetMethod(this PropertyInfo property) 561public static MethodInfo? GetGetMethod(this PropertyInfo property, bool nonPublic) 569public static MethodInfo? GetSetMethod(this PropertyInfo property) 577public static MethodInfo? GetSetMethod(this PropertyInfo property, bool nonPublic)
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
497[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 (13)
src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (9)
110PropertyInfo? pooledConnectionIdleTimeoutProp = socketsHttpHandlerType.GetProperty("PooledConnectionIdleTimeout"); 111PropertyInfo? allowAutoRedirectProp = socketsHttpHandlerType.GetProperty("AllowAutoRedirect"); 113PropertyInfo? requestUriProp = httpRequestMessageType.GetProperty("RequestUri"); 117PropertyInfo? maxResponseContentBufferSizeProp = httpClientType.GetProperty("MaxResponseContentBufferSize"); 118PropertyInfo? responseContentProp = httpResponseMessageType.GetProperty("Content"); 119PropertyInfo? responseStatusCodeProp = httpResponseMessageType.GetProperty("StatusCode"); 120PropertyInfo? responseHeadersProp = httpResponseMessageType.GetProperty("Headers"); 121PropertyInfo? responseHeadersLocationProp = httpResponseHeadersType.GetProperty("Location"); 123PropertyInfo? taskOfHttpResponseMessageResultProp = taskOfHttpResponseMessageType.GetProperty("Result");
System\Security\Cryptography\XmlKeyHelper.cs (4)
264private static readonly PropertyInfo s_docRootProperty; 266private static readonly PropertyInfo s_elementNameProperty; 267private static readonly PropertyInfo s_elementValueProperty; 268private static readonly PropertyInfo s_nameNameProperty;
System.Text.Json (20)
src\libraries\System.Text.Json\Common\ReflectionExtensions.cs (1)
219public static bool IsVirtual(this PropertyInfo propertyInfo)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Converters.cs (1)
135Debug.Assert(memberInfo is FieldInfo or PropertyInfo);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (6)
154foreach (PropertyInfo propertyInfo in currentType.GetProperties(AllInstanceMembers)) 276private static bool PropertyIsOverriddenAndIgnored(PropertyInfo propertyInfo, Dictionary<string, JsonPropertyInfo>? ignoredMembers) 335case PropertyInfo propertyInfo: 412Debug.Assert(memberInfo is FieldInfo or PropertyInfo); 416case PropertyInfo propertyInfo: 480nullabilityInfo = nullabilityCtx.Create((PropertyInfo)memberInfo);
System\Text\Json\Serialization\Metadata\MemberAccessor.cs (2)
24public abstract Func<object, TProperty> CreatePropertyGetter<TProperty>(PropertyInfo propertyInfo); 26public abstract Action<object, TProperty> CreatePropertySetter<TProperty>(PropertyInfo propertyInfo);
System\Text\Json\Serialization\Metadata\ReflectionEmitCachingMemberAccessor.cs (4)
66public override Func<object, TProperty> CreatePropertyGetter<TProperty>(PropertyInfo propertyInfo) => 69valueFactory: key => _sourceAccessor.CreatePropertyGetter<TProperty>((PropertyInfo)key.member!)); 71public override Action<object, TProperty> CreatePropertySetter<TProperty>(PropertyInfo propertyInfo) => 74valueFactory: key => _sourceAccessor.CreatePropertySetter<TProperty>((PropertyInfo)key.member!));
System\Text\Json\Serialization\Metadata\ReflectionEmitMemberAccessor.cs (4)
230public override Func<object, TProperty> CreatePropertyGetter<TProperty>(PropertyInfo propertyInfo) => 233private static DynamicMethod CreatePropertyGetter(PropertyInfo propertyInfo, Type runtimePropertyType) 276public override Action<object, TProperty> CreatePropertySetter<TProperty>(PropertyInfo propertyInfo) => 279private static DynamicMethod CreatePropertySetter(PropertyInfo propertyInfo, Type runtimePropertyType)
System\Text\Json\Serialization\Metadata\ReflectionMemberAccessor.cs (2)
143public override Func<object, TProperty> CreatePropertyGetter<TProperty>(PropertyInfo propertyInfo) 153public override Action<object, TProperty> CreatePropertySetter<TProperty>(PropertyInfo propertyInfo)
System.Windows.Controls.Ribbon (1)
Microsoft\Windows\Controls\Ribbon\RibbonMenuButton.cs (1)
1472PropertyInfo property = type.GetProperty("HasPushedMenuMode", BindingFlags.NonPublic | BindingFlags.Instance);
System.Windows.Forms (25)
System\Windows\Forms\Accessibility\AccessibleObject.cs (3)
2925PropertyInfo? IReflect.GetProperty(string name, BindingFlags bindingAttr) 2929PropertyInfo? IReflect.GetProperty( 2939PropertyInfo[] IReflect.GetProperties(BindingFlags bindingAttr)
System\Windows\Forms\ActiveX\AxHost.cs (4)
128private Dictionary<string, PropertyInfo>? _propertyInfos; 2579PropertyInfo[] propInfos = GetType().GetProperties(BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.Instance); 2581foreach (PropertyInfo propInfo in propInfos) 2602_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)
1220PropertyInfo? IReflect.GetProperty(string name, BindingFlags bindingAttr) => typeof(IDesignerHost).GetProperty(name, bindingAttr); 1223PropertyInfo? IReflect.GetProperty(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[] types, ParameterModifier[]? modifiers) => 1227PropertyInfo[] IReflect.GetProperties(BindingFlags bindingAttr) => typeof(IDesignerHost).GetProperties(bindingAttr);
System\ComponentModel\Design\InheritanceService.cs (1)
123PropertyInfo? 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.Design.Tests (19)
System\Resources\Tools\StronglyTypedResourceBuilderTests.cs (16)
233var nameProperty = type.GetProperty("TestName"); 264var nameProperty = type.GetProperty("TestName"); 293var nameProperty = type.GetProperty("TestName"); 318var imagePropertyInfo = CompileAndGetPropertyInfo(reader.GetEnumerator(), compileUnit, "Image1"); 347var imagePropertyInfo = CompileAndGetPropertyInfo(reader.GetEnumerator(), compileUnit, "Image1"); 374var imagePropertyInfo = CompileAndGetPropertyInfo(reader.GetEnumerator(), compileUnit, "Image1"); 399var iconPropertyInfo = CompileAndGetPropertyInfo(reader.GetEnumerator(), compileUnit, "Icon1"); 427var iconPropertyInfo = CompileAndGetPropertyInfo(reader.GetEnumerator(), compileUnit, "Icon1"); 454var iconPropertyInfo = CompileAndGetPropertyInfo(reader.GetEnumerator(), compileUnit, "Icon1"); 639var mediaPlayerPropertyInfo = CompileAndGetPropertyInfo(reader.GetEnumerator(), compileUnit, "MediaPlayer1"); 653private static PropertyInfo CompileAndGetPropertyInfo( 670var propertyInfo = type.GetProperty(propertyName); 675private static void ValidateResultBitmap(PropertyInfo imagePropertyInfo, Bitmap expected, TypeConverter converter) 683private static void ValidateResultIcon(PropertyInfo iconPropertyInfo, Icon expected, TypeConverter converter) 690private static void ValidateResultTxtFileContent(PropertyInfo txtFilePropertyInfo) 696private static void ValidateResultAudio(PropertyInfo audioPropertyInfo)
System\Windows\Forms\Design\ToolStripContainerDesignerTests.cs (1)
102var property = typeof(ToolStripContainerDesigner).GetProperty(propertyName, BindingFlags.NonPublic | BindingFlags.Instance);
System\Windows\Forms\Design\ToolStripEditorManagerTests.cs (2)
187PropertyInfo? propertyInfo = targetObject.TestAccessor().Dynamic.GetType().GetProperty(propertyName); 196PropertyInfo? boundsProperty = _toolStripEditorControlType?.GetProperty("Bounds1");
System.Windows.Forms.Interop.Tests (1)
AccessibleObjectTests.cs (1)
726if (member is PropertyInfo property && property.GetGetMethod() is MethodInfo getter && getter.GetParameters() is var parameters && parameters.Length > 0)
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.Windows.Forms.Tests (13)
MaskedTextBoxTests.cs (1)
715PropertyInfo property = typeof(MaskedTextBox).GetProperty(propertyName);
System\Windows\Forms\AccessibleObjects\AccessibleObjectTests.cs (1)
2729PropertyInfo runtimeIdProperty = type.GetProperty(nameof(AccessibleObject.RuntimeId), BindingFlags.NonPublic | BindingFlags.Instance);
System\Windows\Forms\CursorsTests.cs (1)
68foreach (var property in typeof(Cursors).GetProperties(BindingFlags.Static | BindingFlags.Public))
System\Windows\Forms\DataGridViewTests.cs (1)
3543Reflection.PropertyInfo propertyInfo = type.GetProperty(propertyName);
System\Windows\Forms\Design\DesignerAttributeTests.cs (4)
56foreach (var property in type.GetProperties()) 72foreach (var property in type.GetProperties()) 116var propertyInfo = type.GetProperty(property); 136var propertyInfo = type.GetProperty(attribute.Name);
System\Windows\Forms\ListBindingHelperTests.cs (2)
893public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) 927protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers)
System\Windows\Forms\ToolStripLabelTests.cs (1)
233var property = typeof(ToolStripLabel).GetProperty(propertyName);
ToolStripContainerTests.cs (2)
48PropertyInfo propertyInfo = _toolStripContainer.GetType().GetProperty(propertyName); 220PropertyInfo propertyInfo = _toolStripContainer.GetType().GetProperty(propertyName);
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();
System.Xaml.Tests (18)
Common\CustomType.cs (2)
59public Optional<PropertyInfo[]> GetPropertiesResult { get; set; } 60public override PropertyInfo[] GetProperties(BindingFlags bindingAttr)
System\Xaml\Schema\XamlMemberInvokerTests.cs (4)
71PropertyInfo property = typeof(TestClass).GetProperty(nameof(TestClass.Property))!; 115PropertyInfo property = typeof(TestClass).GetProperty(nameof(TestClass.Property))!; 165PropertyInfo property = typeof(SerializeClass).GetProperty(name)!; 220PropertyInfo property = typeof(SerializeClass).GetProperty(nameof(SerializeClass.NoSuchMethodProperty))!;
System\Xaml\XamlMemberTests.cs (7)
53public void Ctor_PropertyInfo_XamlSchemaContext(PropertyInfo propertyInfo, XamlSchemaContext schemaContext) 75public void Ctor_PropertyInfo_XamlSchemaContext_XamlMemberInvoker(PropertyInfo propertyInfo, XamlSchemaContext schemaContext, XamlMemberInvoker invoker) 98Assert.Throws<ArgumentNullException>("propertyInfo", () => new XamlMember((PropertyInfo)null!, new XamlSchemaContext())); 99Assert.Throws<ArgumentNullException>("propertyInfo", () => new XamlMember((PropertyInfo)null!, new XamlSchemaContext(), XamlMemberInvoker.UnknownInvoker)); 324PropertyInfo propertyInfo = typeof(DataClass).GetProperty(nameof(DataClass.Property))!; 2366protected PropertyInfo DelegatingProperty { get; } 2368public CustomPropertyInfo(PropertyInfo delegatingProperty)
System\Xaml\XamlMemberTests.Mocks.cs (4)
20public SubXamlMember(PropertyInfo propertyInfo, XamlSchemaContext schemaContext) : base(propertyInfo, schemaContext) { } 22public SubXamlMember(PropertyInfo propertyInfo, XamlSchemaContext schemaContext, XamlMemberInvoker invoker) : base(propertyInfo, schemaContext, invoker) { } 79public CustomXamlMember(PropertyInfo propertyInfo, XamlSchemaContext schemaContext) : base(propertyInfo, schemaContext) { } 81public CustomXamlMember(PropertyInfo propertyInfo, XamlSchemaContext schemaContext, XamlMemberInvoker invoker) : base(propertyInfo, schemaContext, invoker) { }
System\Xaml\XamlTypeTests.cs (1)
1201GetPropertiesResult = new PropertyInfo[]
Test.Utilities (6)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (2)
162private static readonly PropertyInfo? s_syntaxTreeDiagnosticOptionsProperty = 165private static readonly PropertyInfo? s_compilationOptionsSyntaxTreeOptionsProviderProperty =
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (3)
60if (!TryGetProperty<T, TProperty>(type, propertyName, out var property)) 104if (!TryGetProperty<T, TProperty>(type, propertyName, out var property)) 219private static bool TryGetProperty<T, TProperty>([NotNullWhen(true)] Type? type, string propertyName, [NotNullWhen(true)] out PropertyInfo? propertyInfo)
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxNodeExtensions.cs (1)
21var property = typeof(Simplifier).GetTypeInfo().GetDeclaredProperty("AddImportsAnnotation");
Text.Analyzers (6)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (2)
162private static readonly PropertyInfo? s_syntaxTreeDiagnosticOptionsProperty = 165private static readonly PropertyInfo? s_compilationOptionsSyntaxTreeOptionsProviderProperty =
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (3)
60if (!TryGetProperty<T, TProperty>(type, propertyName, out var property)) 104if (!TryGetProperty<T, TProperty>(type, propertyName, out var property)) 219private static bool TryGetProperty<T, TProperty>([NotNullWhen(true)] Type? type, string propertyName, [NotNullWhen(true)] out PropertyInfo? propertyInfo)
src\RoslynAnalyzers\Utilities\Workspaces\SyntaxNodeExtensions.cs (1)
21var property = typeof(Simplifier).GetTypeInfo().GetDeclaredProperty("AddImportsAnnotation");
VBCSCompiler.UnitTests (1)
NamedPipeTestUtil.cs (1)
41var listeningSocketProperty = sharedServer!.GetType()?.GetProperty("ListeningSocket", BindingFlags.NonPublic | BindingFlags.Instance);
VisualBasicRuntimeTest (1)
Program.cs (1)
140PropertyInfo controlProperty = dialogType.GetProperty("ProgressBarWork", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly);
WindowsBase.Tests (2)
System\Windows\Markup\InternalTypeHelperTests.cs (2)
29protected override object GetPropertyValue(PropertyInfo propertyInfo, object target, CultureInfo culture) 32protected override void SetPropertyValue(PropertyInfo propertyInfo, object target, object value, CultureInfo culture)
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);
xunit.assert (2)
Sdk\AssertHelper.cs (2)
71 static readonly Lazy<PropertyInfo?> fileSystemInfoFullNameProperty = new Lazy<PropertyInfo?>(() => Type.GetType(fileSystemInfoFqn)?.GetTypeInfo().GetDeclaredProperty("FullName"));