5 overrides of PropertyType
PresentationFramework (1)
MS\Internal\Data\IndexerPropertyInfo.cs (1)
70public override Type PropertyType
System.Private.CoreLib (1)
System\Reflection\Runtime\PropertyInfos\RuntimePropertyInfo.cs (1)
156public sealed override Type PropertyType
System.Reflection.Context (2)
System\Reflection\Context\Delegation\DelegatingPropertyInfo.cs (1)
54public override Type PropertyType
System\Reflection\Context\Virtual\VirtualPropertyBase.cs (1)
52public sealed override Type PropertyType
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\Properties\RoProperty.cs (1)
53public sealed override Type PropertyType
355 references to PropertyType
aspire (2)
Commands\SettingsSchemaBuilder.cs (2)
122var propertyType = Nullable.GetUnderlyingType(prop.PropertyType) ?? prop.PropertyType;
Aspire.Confluent.Kafka (1)
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\Shared\PropertyFetcher.AOT.cs (1)
106if (propertyInfo == null || !typeof(T).IsAssignableFrom(propertyInfo.PropertyType))
Aspire.Hosting.Azure (2)
AzureProvisioningController.cs (1)
3359.Where(static p => p.PropertyType == typeof(AzureLocation))
Provisioning\Internal\BaseProvisioningContextProvider.cs (1)
407.Where(p => p.PropertyType == typeof(AzureLocation))
Aspire.Hosting.CodeGeneration.Java (4)
JavaLanguageSupport.cs (4)
228var upToDateCheckType = upToDateCheckProperty.PropertyType; 239inputsProperty?.PropertyType != typeof(string[]) || 242fileExtensionsProperty?.PropertyType != typeof(string[]) || 245stampFileProperty?.PropertyType != typeof(string) ||
Aspire.Hosting.RemoteHost (11)
Ats\CapabilityDispatcher.cs (1)
259prop.PropertyType,
AtsCapabilityScanner.cs (10)
1095var isCallback = typeof(Delegate).IsAssignableFrom(prop.PropertyType); 1097? new AtsTypeRef { TypeId = "callback", ClrType = prop.PropertyType, Category = AtsTypeCategory.Callback } 1098: CreateTypeRef(prop.PropertyType, enumCollector: null, assemblyExportedTypeCache); 1103propTypeRef = WithNullability(propTypeRef, prop.PropertyType, nullabilityContext.Create(prop).ReadState); 1105if (!prop.CanWrite && IsMutableCollectionType(prop.PropertyType)) 1116(callbackParameters, callbackReturnType) = ExtractCallbackSignature(prop.PropertyType, assemblyExportedTypeCache); 1169Nullable.GetUnderlyingType(property.PropertyType) is not null || 1238memberType: property.PropertyType, 1354var propertyTypeRef = CreateTypeRef(property.PropertyType, enumCollector: null, assemblyExportedTypeCache); 1601var propType = property.PropertyType;
Aspire.Hosting.Tests (13)
Backchannel\BackchannelContractTests.cs (11)
146bool isNullable = prop.PropertyType.IsValueType 147? Nullable.GetUnderlyingType(prop.PropertyType) is not null 158if (!prop.PropertyType.IsValueType) 161var isCollectionWithDefault = prop.PropertyType.IsArray || 162(prop.PropertyType.IsGenericType && IsAllowedCollectionType(prop.PropertyType)); 339var propertyType = Nullable.GetUnderlyingType(property.PropertyType) ?? property.PropertyType; 347if (property.PropertyType == typeof(string[])) 373if (property.PropertyType == typeof(Dictionary<string, string>)) 378throw new NotSupportedException($"{requestType.Name}.{property.Name} has unsupported test value type {property.PropertyType}.");
ResourceNotificationTests.cs (1)
1709var type = property.PropertyType;
WithEndpointTests.cs (1)
102Assert.Equal(typeof(bool), isProxiedProperty.PropertyType);
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Shared\PropertyFetcher.cs (1)
108if (propertyInfo == null || !typeof(T).IsAssignableFrom(propertyInfo.PropertyType))
dotnet-svcutil-lib (24)
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeGenerator.cs (2)
792memberType = property.PropertyType; 829memberType = property.PropertyType;
FrameworkFork\Microsoft.Xml\Xml\Serialization\Models.cs (5)
219TypeDesc typeDesc = ModelScope.TypeScope.GetTypeDesc(propertyInfo.PropertyType, propertyInfo, true, false); 223CheckSupportedMember(typeDesc, propertyInfo, propertyInfo.PropertyType); 224return new FieldModel(propertyInfo, propertyInfo.PropertyType, typeDesc); 305if (_checkSpecified != SpecifiedAccessor.None && specifiedProperty.PropertyType != typeof(bool)) 307throw new InvalidOperationException(string.Format(ResXml.XmlInvalidSpecifiedType, specifiedProperty.Name, specifiedProperty.PropertyType.FullName, typeof(bool).FullName));
FrameworkFork\Microsoft.Xml\Xml\Serialization\SourceInfo.cs (1)
175((FieldInfo)MemberInfo).FieldType : ((PropertyInfo)MemberInfo).PropertyType;
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (4)
1319Type currentType = (p == null ? typeof(object) : p.PropertyType); 1383MethodInfo addMethod = type.GetMethod("Add", new Type[] { indexer.PropertyType }); 1386throw new InvalidOperationException(string.Format(ResXml.XmlNoAddMethod, type.FullName, indexer.PropertyType, "ICollection")); 1392return GetDefaultIndexer(type, memberInfo).PropertyType;
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 (1)
4067_writer.Write(GetStringForTypeof(CodeIdentifier.GetCSharpName(defaultIndexer.PropertyType), elementUseReflection));
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriterILGen.cs (1)
2614initValue.ILG.ConvertValue(propInfo.PropertyType, localA.LocalType);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeGenerator.cs (1)
709memberType = property.PropertyType;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataMember.cs (3)
263return ((PropertyInfo)MemberInfo).PropertyType; 325return DataContract.MethodRequiresMemberAccess(getMethod) || !DataContract.IsTypeVisible(property.PropertyType); 350return DataContract.MethodRequiresMemberAccess(setMethod) || !DataContract.IsTypeVisible(property.PropertyType);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ExceptionDataContract.cs (4)
373DataContract propDataContract = context.GetDataContract(prop.PropertyType); 374if (prop.GetValue(value) != null && propDataContract != null && !TryCheckIfNoCountIDictionary(prop.PropertyType, prop.GetValue(value))) 376if (!TryWritePrimitive(prop.PropertyType, prop.GetValue(value), writer, context)) 380context.SerializeWithoutXsiType(propDataContract, writer, prop.GetValue(value), prop.PropertyType.TypeHandle);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\TypeLoader.cs (1)
1361memberType = ((PropertyInfo)memberInfo).PropertyType;
Infrastructure.Common (1)
xunit\ConditionAttribute.cs (1)
117if (pi != null && pi.PropertyType == typeof(bool) && pi.GetMethod != null && pi.GetMethod.IsStatic && pi.GetMethod.GetParameters().Length == 0)
Microsoft.AspNetCore.Components (8)
CascadingParameterState.cs (1)
130prop.PropertyType));
DefaultComponentPropertyActivator.cs (1)
61injectables.Add((property.Name, property.PropertyType, new PropertySetter(type, property), injectAttribute.Key));
PersistentState\PersistentServicesRegistry.cs (1)
206keys.Add(new(key, propertyInfo.PropertyType));
Reflection\ComponentProperties.cs (1)
361if (!propertyInfo.PropertyType.IsAssignableFrom(typeof(Dictionary<string, object>)))
src\aspnetcore\src\Components\Shared\src\Reflection\PropertyGetter.cs (2)
39getMethod.CreateDelegate(typeof(Func<,>).MakeGenericType(targetType, property.PropertyType)); 42CallPropertyGetterOpenGenericMethod.MakeGenericMethod(targetType, property.PropertyType);
src\aspnetcore\src\Components\Shared\src\Reflection\PropertySetter.cs (2)
35setMethod.CreateDelegate(typeof(Action<,>).MakeGenericType(targetType, property.PropertyType)); 37CallPropertySetterOpenGenericMethod.MakeGenericMethod(targetType, property.PropertyType);
Microsoft.AspNetCore.Components.Endpoints (10)
FormMapping\Metadata\FormDataMetadataFactory.cs (3)
190Log.CandidateProperty(_logger, propertyHelper.Name, property.PropertyType); 224var propertyTypeInfo = GetOrCreateMetadataFor(property.PropertyType, options); 227Log.PropertyTypeNotSupported(_logger, type, property.Name, property.PropertyType);
FormMapping\Metadata\FormDataPropertyMetadata.cs (1)
15public Type Type => property.PropertyType;
Forms\ClientValidationCache.cs (1)
162var propertyType = containerType.GetProperty(propertyName, BindingFlags.Public | BindingFlags.Instance)?.PropertyType;
src\aspnetcore\src\Components\Shared\src\Reflection\PropertyGetter.cs (2)
39getMethod.CreateDelegate(typeof(Func<,>).MakeGenericType(targetType, property.PropertyType)); 42CallPropertyGetterOpenGenericMethod.MakeGenericMethod(targetType, property.PropertyType);
src\aspnetcore\src\Components\Shared\src\Reflection\PropertySetter.cs (2)
35setMethod.CreateDelegate(typeof(Action<,>).MakeGenericType(targetType, property.PropertyType)); 37CallPropertySetterOpenGenericMethod.MakeGenericMethod(targetType, property.PropertyType);
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (1)
551!property.PropertyType.IsByRefLike &&
Microsoft.AspNetCore.Components.Web (1)
JSComponents\JSComponentInterop.cs (1)
208ParameterInfoByName.Add(propertyInfo.Name, new(propertyInfo.PropertyType));
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Internal\Json\MessageTypeInfoResolver.cs (1)
107if (property != null && property.PropertyType == field.MessageType.ClrType)
Microsoft.AspNetCore.Http.Abstractions (1)
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (1)
551!property.PropertyType.IsByRefLike &&
Microsoft.AspNetCore.Http.Extensions (6)
src\aspnetcore\src\Components\Endpoints\src\FormMapping\Metadata\FormDataMetadataFactory.cs (3)
190Log.CandidateProperty(_logger, propertyHelper.Name, property.PropertyType); 224var propertyTypeInfo = GetOrCreateMetadataFor(property.PropertyType, options); 227Log.PropertyTypeNotSupported(_logger, type, property.Name, property.PropertyType);
src\aspnetcore\src\Components\Endpoints\src\FormMapping\Metadata\FormDataPropertyMetadata.cs (1)
15public Type Type => property.PropertyType;
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (1)
328lookupTable.Add(new ParameterLookupKey(properties[i].Name, properties[i].PropertyType), properties[i]);
src\aspnetcore\src\Shared\PropertyAsParameterInfo.cs (1)
29ClassImpl = propertyInfo.PropertyType;
Microsoft.AspNetCore.Identity.EntityFrameworkCore (6)
IdentityUserContext.cs (6)
225if (p.PropertyType != typeof(string)) 274if (p.PropertyType != typeof(string)) 336if (p.PropertyType != typeof(string)) 384if (p.PropertyType != typeof(string)) 431if (p.PropertyType != typeof(string)) 479if (p.PropertyType != typeof(string))
Microsoft.AspNetCore.InternalTesting (1)
xunit\ConditionalTheoryDiscoverer.cs (1)
56if (property != null && property.PropertyType.Equals(typeof(string)))
Microsoft.AspNetCore.Mvc.Abstractions (1)
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (1)
328lookupTable.Add(new ParameterLookupKey(properties[i].Name, properties[i].PropertyType), properties[i]);
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
src\aspnetcore\src\Shared\PropertyAsParameterInfo.cs (1)
29ClassImpl = propertyInfo.PropertyType;
Microsoft.AspNetCore.Mvc.Core (8)
ApplicationModels\ControllerActionDescriptorBuilder.cs (1)
93ParameterType = propertyModel.PropertyInfo.PropertyType,
ApplicationModels\PropertyModel.cs (1)
24: base(propertyInfo.PropertyType, attributes)
ModelBinding\Metadata\DefaultBindingMetadataProvider.cs (1)
129property.Property.PropertyType == parameter.ParameterType);
ModelBinding\Metadata\DefaultModelMetadataProvider.cs (1)
344propertyHelper.Property.PropertyType,
ModelBinding\Metadata\ModelAttributes.cs (2)
97/// <see cref="TypeAttributes"/> contains attributes retrieved from <see cref="PropertyInfo.PropertyType"/>. 115return GetAttributesForProperty(type, property, property.PropertyType);
ModelBinding\ParameterBinder.cs (1)
260if (modelType != propertyInfo.PropertyType)
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (1)
551!property.PropertyType.IsByRefLike &&
Microsoft.AspNetCore.Mvc.Razor (9)
RazorPageActivator.cs (1)
89modelType = pageType.GetRuntimeProperty(ModelPropertyName)?.PropertyType;
RazorPagePropertyActivator.cs (8)
86var value = serviceProvider.GetRequiredKeyedService(property.PropertyType, key); 92else if (typeof(ViewDataDictionary).IsAssignableFrom(property.PropertyType)) 99else if (property.PropertyType == typeof(IUrlHelper)) 106else if (property.PropertyType == typeof(IJsonHelper)) 110else if (property.PropertyType == typeof(DiagnosticSource)) 114else if (property.PropertyType == typeof(HtmlEncoder)) 118else if (property.PropertyType == typeof(IModelExpressionProvider)) 127var value = serviceProvider.GetRequiredService(property.PropertyType);
Microsoft.AspNetCore.Mvc.RazorPages (4)
ApplicationModels\CompiledPageActionDescriptorBuilder.cs (1)
138ParameterType = propertyModel.PropertyInfo.PropertyType,
ApplicationModels\DefaultPageApplicationModelProvider.cs (2)
84var modelTypeInfo = modelProperty.PropertyType.GetTypeInfo(); 91if (modelProperty.PropertyType.IsDefined(typeof(PageModelAttribute), inherit: true))
ApplicationModels\PagePropertyModel.cs (1)
24: base(propertyInfo.PropertyType, attributes)
Microsoft.AspNetCore.Mvc.ViewFeatures (3)
Filters\LifecycleProperty.cs (1)
20var propertyType = propertyInfo.PropertyType;
Filters\SaveTempDataPropertyFilterBase.cs (2)
133if (!tempDataSerializer.CanSerializeType(property.PropertyType)) 139TypeNameHelper.GetTypeDisplayName(property.PropertyType));
Microsoft.AspNetCore.OpenApi (2)
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (1)
328lookupTable.Add(new ParameterLookupKey(properties[i].Name, properties[i].PropertyType), properties[i]);
src\aspnetcore\src\Shared\PropertyAsParameterInfo.cs (1)
29ClassImpl = propertyInfo.PropertyType;
Microsoft.AspNetCore.Routing (1)
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (1)
551!property.PropertyType.IsByRefLike &&
Microsoft.AspNetCore.Routing.Abstractions (1)
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (1)
551!property.PropertyType.IsByRefLike &&
Microsoft.Build.Framework (3)
Loader\LoadedType.cs (1)
140pt = props[i].PropertyType;
ReflectableTaskPropertyInfo.cs (2)
52propertyInfo.PropertyType, 67propertyInfo.PropertyType,
Microsoft.Build.Tasks.Core (2)
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (1)
242i.PropertyType,
WriteCodeFragment.cs (1)
477attributeType.Value?.GetProperty(parameter.Name)?.PropertyType,
Microsoft.CodeAnalysis.NetAnalyzers (5)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Lightup\LightupHelpers.cs (5)
37if (!typeof(TProperty).GetTypeInfo().IsAssignableFrom(property.PropertyType.GetTypeInfo())) 75.SingleOrDefault(m => !m.IsStatic && m.GetParameters().Length == 1 && m.GetParameters()[0].ParameterType.Equals(property.PropertyType)); 88property.PropertyType.GetTypeInfo().IsAssignableFrom(typeof(TProperty).GetTypeInfo()) 90: Expression.Convert(valueParameter, property.PropertyType); 200VerifyResultTypeCompatibility<TProperty>(propertyInfo.PropertyType);
Microsoft.CSharp (3)
Microsoft\CSharp\RuntimeBinder\RuntimeBinderExtensions.cs (2)
74&& prop1.PropertyType.IsGenericallyEquivalentTo(prop2.PropertyType, prop1, prop2)
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (1)
1254prop.RetType = GetCTypeFromType(property.PropertyType);
Microsoft.Extensions.AI.Abstractions (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\LegacySupport\NullabilityInfoContext\NullabilityInfoContext.cs (1)
203NullabilityInfo nullability = GetNullabilityInfo(propertyInfo, propertyInfo.PropertyType, parser);
Microsoft.Extensions.AI.Abstractions.Tests (5)
Utilities\AIJsonUtilitiesTests.cs (5)
100case null when property.PropertyType == typeof(Func<AIJsonSchemaCreateContext, JsonNode, JsonNode>): 106case null when property.PropertyType == typeof(Func<ParameterInfo, bool>): 112case null when property.PropertyType == typeof(Func<ParameterInfo, string?>): 118case null when property.PropertyType == typeof(AIJsonSchemaTransformOptions): 125Assert.Fail($"Unexpected property type: {property.PropertyType}");
Microsoft.Extensions.Caching.Hybrid (1)
Internal\DefaultJsonSerializerFactory.cs (1)
103if (IsFieldOnlyType(prop.PropertyType, ref state) == FieldOnlyResult.FieldOnly)
Microsoft.Extensions.Compliance.Redaction (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\LengthAttribute.cs (1)
134if (property != null && property.CanRead && property.PropertyType == typeof(int))
Microsoft.Extensions.Configuration.Binder (1)
ConfigurationBinder.cs (1)
307property.PropertyType,
Microsoft.Extensions.Diagnostics.HealthChecks.ResourceUtilization (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\LengthAttribute.cs (1)
134if (property != null && property.CanRead && property.PropertyType == typeof(int))
Microsoft.Extensions.Diagnostics.Probes (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\LengthAttribute.cs (1)
134if (property != null && property.CanRead && property.PropertyType == typeof(int))
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\LengthAttribute.cs (1)
134if (property != null && property.CanRead && property.PropertyType == typeof(int))
Microsoft.Extensions.Diagnostics.Testing (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\BindingExtensions.g.cs (1)
543Type? temp70 = instance.PropertyType;
Microsoft.Extensions.Http.Resilience (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\LengthAttribute.cs (1)
134if (property != null && property.CanRead && property.PropertyType == typeof(int))
Microsoft.Extensions.Telemetry (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\LengthAttribute.cs (1)
134if (property != null && property.CanRead && property.PropertyType == typeof(int))
Microsoft.Extensions.VectorData.Abstractions (3)
ProviderServices\CollectionModelBuilder.cs (3)
127var clrPropertyType = clrProperty.PropertyType; 131$"Property '{property.ModelName}' has a different CLR type in the record definition ('{property.Type.Name}') and on the .NET property ('{clrProperty.PropertyType}')."); 231Type propertyType = clrProperty?.PropertyType
Microsoft.Extensions.VectorData.ConformanceTests (2)
TypeTests\DataTypeTests.cs (2)
226if (property.PropertyType.IsValueType) 228return Nullable.GetUnderlyingType(property.PropertyType) is not null;
Microsoft.Maui.Controls (4)
BindingExpression.cs (1)
392 var propertyType = property.PropertyType;
PlatformBindingHelpers.cs (1)
45 var propertyType = targetPropertyInfo?.PropertyType;
Shell\ShellContent.cs (2)
393 if (prop.PropertyType == typeof(string)) 402 var castValue = Convert.ChangeType(value, prop.PropertyType);
Microsoft.Maui.Controls.Xaml (7)
ApplyPropertiesVisitor.cs (2)
671 object convertedValue = value.ConvertTo(propertyInfo.PropertyType, () => propertyInfo, serviceProvider, out exception); 672 if (exception != null || (convertedValue != null && !propertyInfo.PropertyType.IsInstanceOfType(convertedValue)))
MarkupExtensionParser.cs (1)
99 value = strValue.ConvertTo(markupExtension.GetType().GetRuntimeProperty(prop).PropertyType,
MarkupExtensions\AppThemeBindingExtension.cs (1)
72 ?? pi?.PropertyType
MarkupExtensions\OnIdiomExtension.cs (1)
59 ?? pi?.PropertyType
MarkupExtensions\OnPlatformExtension.cs (1)
69 ?? pi?.PropertyType
MarkupExtensions\StaticResourceExtension.cs (1)
43 var propertyType = bp?.ReturnType ?? pi?.PropertyType;
Microsoft.ML.AutoML.Tests (1)
Utils\TaskAgnosticIterationResult.cs (1)
81var propertiesToReport = metric.GetType().GetProperties().Where(p => p.PropertyType == typeof(double));
Microsoft.ML.Data (16)
Data\SchemaDefinition.cs (2)
189ectx.Check(cursorChannelAttrPropertyInfo.PropertyType == typeof(IChannel), 367if (propertyInfo.PropertyType == typeof(IChannel))
DataLoadSave\Database\DatabaseLoader.cs (3)
155if (!InternalDataKindExtensions.TryGetDataKind(property.PropertyType.IsArray ? property.PropertyType.GetElementType() : property.PropertyType, out dk))
DataLoadSave\Text\TextLoader.cs (3)
1618if (!InternalDataKindExtensions.TryGetDataKind(property.PropertyType.IsArray ? property.PropertyType.GetElementType() : property.PropertyType, out dk))
DataView\InternalSchemaDefinition.cs (3)
32public Type FieldOrPropertyType => (MemberInfo is FieldInfo) ? (MemberInfo as FieldInfo).FieldType : (MemberInfo as PropertyInfo).PropertyType; 154GetVectorAndItemType(propertyInfo.Name, propertyInfo.PropertyType, propertyInfo.GetCustomAttributes(), out isVector, out itemType); 246(memberInfo is PropertyInfo && (memberInfo as PropertyInfo).PropertyType == typeof(IChannel)))
DataView\TypedCursor.cs (2)
239InternalSchemaDefinition.GetMappedType(propertyInfo.PropertyType, out actualType, out isVector); 292(memberInfo is PropertyInfo && (memberInfo as PropertyInfo).PropertyType == typeof(IChannel)))
Utils\ApiUtils.cs (3)
78Type propertyType = propertyInfo.PropertyType; 123il.Emit(assignmentOpCode, propertyInfo.PropertyType); 146Type propertyType = propertyInfo.PropertyType;
Microsoft.ML.EntryPoints (1)
JsonUtils\JsonManifestUtils.cs (1)
71var type = ExtractOptionalOrNullableType(fieldInfo.PropertyType);
Microsoft.ML.IntegrationTests (4)
Common.cs (4)
33if (!property.PropertyType.IsArray) 34types[property.Name] = property.PropertyType; 39Type[] typeArgs = { property.PropertyType.GetElementType() }; 40Activator.CreateInstance(property.PropertyType.GetElementType());
Microsoft.ML.InternalCodeAnalyzer (1)
InstanceInitializerAnalyzer.cs (1)
54if (hasInitProp?.PropertyType != typeof(bool))
Microsoft.ML.SearchSpace (3)
Parameter.cs (1)
202var p = Parameter.FromObject(pValue, property.PropertyType);
SearchSpace.cs (2)
260CheckOptionType(attributes.First(), property.Name, property.PropertyType); 276NestOptionAttribute nest => GetSearchSpaceOptionFromType(property.PropertyType),
Microsoft.ML.Tests (2)
CollectionsDataViewTest.cs (2)
79if (property.PropertyType.IsArray) 86if (!CompareObjectValues(xvalue, yvalue, property.PropertyType))
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\CompilerServices\Symbols.vb (1)
897returnType = propertyBlock.PropertyType
PresentationBuildTasks (5)
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (4)
3872return IsAssignableToIXmlSerializable(pi.PropertyType); 4590if (ReflectionHelper.GetMscorlibType(typeof(IList)).IsAssignableFrom(pi.PropertyType)) 4597else if (!IsAssignableToIXmlSerializable(pi.PropertyType)) 4966if( propertyInfo.PropertyType.IsAssignableFrom(ReflectionHelper.GetMscorlibType(typeof(string))) )
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (1)
2049propertyType = propertyInfo.PropertyType;
PresentationCore (3)
System\Windows\Diagnostics\XamlSourceInfoHelper.cs (3)
82if (s_sourceBamlUriProperty == null || s_sourceBamlUriProperty.PropertyType != typeof(Uri) || 83s_elementLineNumberProperty == null || s_elementLineNumberProperty.PropertyType != typeof(int) || 84s_elementLinePositionProperty == null || s_elementLinePositionProperty.PropertyType != typeof(int))
PresentationFramework (11)
MS\Internal\Data\PropertyPathWorker.cs (2)
1147sourceType = pi1.PropertyType; 1203sourceType = pi.PropertyType;
MS\Internal\Helper.cs (1)
644memberType = propertyInfo.PropertyType;
MS\Internal\WindowsRuntime\Generated\WinRT\Projections.cs (1)
186defaultInterface = runtimeClass.GetProperty(attr.DefaultInterfaceProperty, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly).PropertyType;
System\Windows\Data\CollectionView.cs (1)
1488list.Add(new ItemPropertyInfo(pi.Name, pi.PropertyType, pi));
System\Windows\Markup\BamlRecordReader.cs (4)
1992if (typeof(IXmlSerializable).IsAssignableFrom(pi.PropertyType)) 3663propertyType = propertyInfo.PropertyType; 3800value = OptionallyMakeNullable(propertyInfo.PropertyType, value, propertyInfo.Name); 5810return this.PropertyInfo.PropertyType;
System\Windows\Markup\BamlRecords.cs (1)
4663validType = propInfo.PropertyType;
System\Windows\Markup\XamlTypeMapper.cs (1)
2049propertyType = propertyInfo.PropertyType;
ReachFramework (2)
Serialization\Manager\MetroSerializationManager.cs (1)
846Debug.Assert(propertyInfo.PropertyType == dependencyProperty.PropertyType,
Serialization\Manager\ReachSerializationCacheItems.cs (1)
125TypeCacheItem typeCacheItem = serializersCacheManager.GetTypeCacheItem(propertyInfo.PropertyType);
Shared (1)
Data.Validation\LengthAttribute.cs (1)
134if (property != null && property.CanRead && property.PropertyType == typeof(int))
System.ComponentModel.Annotations (3)
System\ComponentModel\DataAnnotations\LocalizableString.cs (1)
132if (property == null || property.PropertyType != typeof(string))
System\ComponentModel\DataAnnotations\MaxLengthAttribute.cs (1)
128if (property != null && property.CanRead && property.PropertyType == typeof(int))
System\ComponentModel\DataAnnotations\ValidationAttribute.cs (1)
295if (property.PropertyType != typeof(string))
System.ComponentModel.Composition (9)
System\ComponentModel\Composition\Hosting\CompositionServices.cs (3)
33return ((PropertyInfo)member).PropertyType; 313if (!dictionary.TryContributeMetadataValue(pi.Name, value, pi.PropertyType, allowsMultiple)) 487return properties.Select(property => new KeyValuePair<string, Type>(property.Name, property.PropertyType));
System\ComponentModel\Composition\MetadataViewGenerator.cs (6)
216Type[] propertyTypeArguments = new Type[] { propertyInfo.PropertyType }; 229propertyInfo.PropertyType, 236propertyInfo.PropertyType, 289proxyCtorIL.AddItemToLocalDictionary(exceptionData, MetadataItemTargetType, propertyInfo.PropertyType); 299proxyCtorIL.AddItemToLocalDictionary(exceptionData, MetadataItemTargetType, propertyInfo.PropertyType); 320propertyInfo.PropertyType,
System.ComponentModel.Composition.Registration (3)
System\ComponentModel\Composition\Registration\PartBuilder.cs (3)
424PropertyInfo declaredPi = pi.DeclaringType.UnderlyingSystemType.GetProperty(pi.Name, pi.PropertyType); 456importBuilder.BuildAttributes(declaredPi.PropertyType, ref attributes); 496exportBuilder.BuildAttributes(declaredPi.PropertyType, ref attributes);
System.ComponentModel.TypeConverter (3)
src\runtime\src\libraries\Common\src\System\Drawing\ColorTable.cs (1)
28if (prop.PropertyType == typeof(Color))
System\ComponentModel\ComponentResourceManager.cs (1)
189if (prop != null && prop.CanWrite && (kvp.Value == null || prop.PropertyType.IsInstanceOfType(kvp.Value)))
System\ComponentModel\ReflectTypeDescriptionProvider.cs (1)
1386propertyInfo.PropertyType,
System.Composition.Convention (3)
System\Composition\Convention\PartConventionBuilder.cs (3)
310Predicate<PropertyInfo> typedFilter = pi => pi.PropertyType.Equals(typeof(T)) && (propertyFilter == null || propertyFilter(pi)); 699importBuilder.BuildAttributes(pi.PropertyType, ref attributes); 741exportBuilder.BuildAttributes(pi.PropertyType, ref attributes);
System.Composition.Hosting (1)
System\Composition\Hosting\Providers\Metadata\MetadataViewProvider.cs (1)
59var m = s_getMetadataValueMethod.MakeGenericMethod(prop.PropertyType);
System.Composition.TypedParts (8)
System\Composition\CompositionContextExtensions.cs (1)
57if (ContractHelpers.TryGetExplicitImportInfo(pi.PropertyType, conventions.GetDeclaredAttributes(pi.DeclaringType, pi), site, out importInfo))
System\Composition\TypedParts\ActivationFeatures\PropertyInjectionFeature.cs (2)
35select new { Site = site, ImportInfo = ContractHelpers.GetImportInfo(pi.PropertyType, attrs, site) }).ToArray(); 95property.PropertyType));
System\Composition\TypedParts\Discovery\TypeInspector.cs (5)
89var contractType = export.ContractType ?? property.PropertyType; 92var exportKey = new CompositionContract(export.ContractType ?? property.PropertyType, export.ContractName); 160AddMetadata(metadata, prop.Name, prop.PropertyType, prop.GetValue(attribute, null)); 168CheckGenericContractCompatibility(partType, property.PropertyType.GetTypeInfo(), contractType); 170else if (!contractType.IsAssignableFrom(property.PropertyType.GetTypeInfo()))
System.Configuration.ConfigurationManager (4)
System\Configuration\ApplicationSettingsBase.cs (2)
448settingsProperty.PropertyType = propertyInfo.PropertyType; 515TypeConverter tc = TypeDescriptor.GetConverter(propertyInfo.PropertyType);
System\Configuration\ConfigurationProperty.cs (2)
120Type propertyType = info.PropertyType; 149info.PropertyType,
System.Diagnostics.DiagnosticSource (2)
System\Diagnostics\DsesFilterAndTransform.cs (2)
813if (!RuntimeFeature.IsDynamicCodeSupported && (propertyInfo.DeclaringType!.IsValueType || propertyInfo.PropertyType.IsValueType)) 821propertyInfo.DeclaringType!, propertyInfo.PropertyType);
System.Drawing.Primitives (1)
src\runtime\src\libraries\Common\src\System\Drawing\ColorTable.cs (1)
28if (prop.PropertyType == typeof(Color))
System.Linq.Expressions (17)
System\Linq\Expressions\Compiler\LambdaCompiler.Expressions.cs (1)
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\IndexExpression.cs (5)
55return Indexer.PropertyType; 382if (indexer.PropertyType.IsByRef) 386if (indexer.PropertyType == typeof(void)) 395if (getter.ReturnType != indexer.PropertyType) 423if (indexer.PropertyType != valueType)
System\Linq\Expressions\Interpreter\LightCompiler.cs (1)
2783if (pi != null) return pi.PropertyType;
System\Linq\Expressions\MemberAssignment.cs (1)
105memberType = pi.PropertyType;
System\Linq\Expressions\MemberExpression.cs (1)
114public sealed override Type Type => _property.PropertyType;
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 (1)
141memberType = pi.PropertyType;
System\Linq\Expressions\NewExpression.cs (2)
329memberType = pi.PropertyType; 342memberType = prop.PropertyType;
System.Private.CoreLib (17)
src\runtime\src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (6)
693if (candidates[i].PropertyType.IsPrimitive) 696!CanChangePrimitive(rtType, candidates[i].PropertyType.UnderlyingSystemType)) 701if (!candidates[i].PropertyType.IsAssignableFrom(returnType)) 721int newMin = FindMostSpecificType(candidates[currentMin].PropertyType, candidates[i].PropertyType, returnType); 855if (returnType != null && returnType != match[i].PropertyType)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (2)
3397if (p.PropertyType.IsEnum) 3400value = Enum.Parse(p.PropertyType, val);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\PropertyValue.cs (2)
195Type type = property.PropertyType; 239Type type = property.PropertyType;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TypeAnalysis.cs (1)
54Type propertyType = propertyInfo.PropertyType;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeNamedArgument.cs (2)
23PropertyInfo property => property.PropertyType, 65((PropertyInfo)_memberInfo).PropertyType;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\NullabilityInfoContext.cs (1)
200NullabilityInfo nullability = GetNullabilityInfo(propertyInfo, propertyInfo.PropertyType, parser);
System\Reflection\Runtime\BindingFlagSupport\PropertyPolicies.cs (2)
79if (!(prior.PropertyType.Equals(member.PropertyType)))
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.BindingFlags.cs (1)
137if (returnType is not null && !returnType.IsEquivalentTo(firstCandidate.PropertyType))
System.Private.DataContractSerialization (7)
System\Runtime\Serialization\AccessorBuilder.cs (3)
47Type propertyType = propInfo.PropertyType!; 104Type propertyType = propInfo.PropertyType!; 129var createSetterGeneric = s_createSetterInternal.MakeGenericMethod(propInfo.DeclaringType!, propInfo.PropertyType).CreateDelegate<Func<PropertyInfo, Setter>>();
System\Runtime\Serialization\CodeGenerator.cs (1)
587memberType = property.PropertyType;
System\Runtime\Serialization\DataMember.cs (3)
173_memberType = prop.PropertyType; 257return DataContract.MethodRequiresMemberAccess(getMethod) || !DataContract.IsTypeVisible(property.PropertyType); 282return DataContract.MethodRequiresMemberAccess(setMethod) || !DataContract.IsTypeVisible(property.PropertyType);
System.Private.Xml (22)
System\Xml\Serialization\CodeGenerator.cs (2)
554memberType = property.PropertyType; 587memberType = property.PropertyType;
System\Xml\Serialization\Models.cs (5)
236TypeDesc typeDesc = ModelScope.TypeScope.GetTypeDesc(propertyInfo.PropertyType, propertyInfo, true, false); 240CheckSupportedMember(typeDesc, propertyInfo, propertyInfo.PropertyType); 241return new FieldModel(propertyInfo, propertyInfo.PropertyType, typeDesc); 323if (_checkSpecified != SpecifiedAccessor.None && specifiedProperty.PropertyType != typeof(bool)) 325throw new InvalidOperationException(SR.Format(SR.XmlInvalidSpecifiedType, specifiedProperty.Name, specifiedProperty.PropertyType.FullName, typeof(bool).FullName));
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (2)
644memberType = propInfo.PropertyType; 1168memberType = propertyInfo.PropertyType;
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (4)
1639if (mi is PropertyInfo pi && pi.GetMethod != null && pi.PropertyType == propInfo.PropertyType) 1666if (mi is PropertyInfo pi && pi.SetMethod != null && pi.PropertyType == propInfo.PropertyType)
System\Xml\Serialization\SourceInfo.cs (1)
177((FieldInfo)MemberInfo).FieldType : ((PropertyInfo)MemberInfo).PropertyType;
System\Xml\Serialization\Types.cs (4)
1372Type currentType = (p == null ? typeof(object) : p.PropertyType); 1436MethodInfo? addMethod = type.GetMethod("Add", new Type[] { indexer.PropertyType }); 1439throw new InvalidOperationException(SR.Format(SR.XmlNoAddMethod, type.FullName, indexer.PropertyType, "ICollection")); 1447return GetDefaultIndexer(type, memberInfo).PropertyType;
System\Xml\Serialization\XmlSerializationILGen.cs (1)
586Type memType = (memInfo is FieldInfo) ? ((FieldInfo)memInfo).FieldType : ((PropertyInfo)memInfo).PropertyType;
System\Xml\Serialization\XmlSerializationReaderILGen.cs (1)
2909ilg.ConvertValue(stackType, memInfo is FieldInfo ? ((FieldInfo)memInfo).FieldType : ((PropertyInfo)memInfo).PropertyType);
System\Xml\Serialization\XmlSerializationWriter.cs (1)
1894_writer.Write(GetStringForTypeof(CodeIdentifier.GetCSharpName(defaultIndexer.PropertyType), elementUseReflection));
System\Xml\Serialization\XmlSerializationWriterILGen.cs (1)
2558initValue.ILG.ConvertValue(propInfo.PropertyType, localA.LocalType);
System.Reflection.Context (1)
System\Reflection\Context\Delegation\DelegatingPropertyInfo.cs (1)
56get { return UnderlyingProperty.PropertyType; }
System.Reflection.DispatchProxy (1)
System\Reflection\DispatchProxyGenerator.cs (1)
394PropertyBuilder pb = _tb.DefineProperty(pi.Name, pi.Attributes, pi.PropertyType, pi.GetIndexParameters().Select(p => p.ParameterType).ToArray());
System.Reflection.Emit (1)
System\Reflection\Emit\TypeBuilderImpl.cs (1)
1057if (returnType is not null && !returnType.IsEquivalentTo(firstCandidate.PropertyType))
System.Reflection.MetadataLoadContext (9)
System\Reflection\DefaultBinder.cs (6)
206if (candidates[i].PropertyType.IsPrimitive) 209!CanChangePrimitive(returnType.UnderlyingSystemType, candidates[i].PropertyType.UnderlyingSystemType)) 214if (!candidates[i].PropertyType.IsAssignableFrom(returnType)) 235int newMin = FindMostSpecificType(candidates[currentMin].PropertyType, candidates[i].PropertyType, returnType); 336if (returnType != null && returnType != match[i].PropertyType)
System\Reflection\Runtime\BindingFlagSupport\PropertyPolicies.cs (2)
71if (!(prior.PropertyType.Equals(member.PropertyType)))
System\Reflection\TypeLoading\RuntimeTypeInfo.BindingFlags.cs (1)
144if (!(returnType is null) && !returnType.IsEquivalentTo(firstCandidate.PropertyType))
System.ServiceModel.Primitives (2)
System\ServiceModel\Description\TypeLoader.cs (1)
1399memberType = ((PropertyInfo)memberInfo).PropertyType;
System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (1)
621part.Type = (member.MemberType == MemberTypes.Property) ? ((PropertyInfo)member).PropertyType : ((FieldInfo)member).FieldType;
System.Text.Json (7)
System\Text\Json\Serialization\Converters\FSharp\FSharpUnionConverter.cs (1)
567FieldType = propertyInfo.PropertyType;
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (2)
604typeToConvert: propertyInfo.PropertyType, 731propertyInfo.PropertyType == ignoredMember.PropertyType;
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Union.cs (1)
420return valueProperty is { PropertyType: { } propertyType } &&
System\Text\Json\Serialization\Metadata\ReflectionEmitMemberAccessor.cs (3)
423Type declaredPropertyType = propertyInfo.PropertyType; 467Type declaredPropertyType = propertyInfo.PropertyType; 520Type declaredPropertyType = propertyInfo.PropertyType;
System.Windows.Forms (10)
System\Windows\Forms\DataBinding\BindingManagerBase.cs (5)
114if (property.Name == "Item" && property.PropertyType != typeof(object)) 116return TypeDescriptor.GetProperties(property.PropertyType, [new BrowsableAttribute(true)]); 134if (property.Name == "Item" && property.PropertyType != typeof(object)) 137itemProps = TypeDescriptor.GetProperties(property.PropertyType, [new BrowsableAttribute(true)]); 180return GetItemProperties(property.PropertyType, offset + 1, dataSources, listAccessors);
System\Windows\Forms\DataBinding\ListBindingHelper.cs (5)
231return indexer.PropertyType; 329name = indexer.PropertyType.Name; 552if (props[idx].GetIndexParameters().Length > 0 && props[idx].PropertyType != typeof(object)) 590if (indexer is not null && !typeof(ICustomTypeDescriptor).IsAssignableFrom(indexer.PropertyType)) 592Type type = indexer.PropertyType;
System.Windows.Forms.Design (5)
System\ComponentModel\Design\CollectionEditor.cs (1)
182return property.PropertyType;
System\ComponentModel\Design\InheritanceService.cs (2)
123Debug.Assert(fieldProp.PropertyType == field.FieldType, "Field declared with AccessedThroughPropertyAttribute is associated with a property with a different return type."); 124if (fieldProp is not null && fieldProp.PropertyType == field.FieldType)
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (1)
2014expressionType = propertyInfo.PropertyType;
System\Drawing\Design\ColorEditor.ColorUI.cs (1)
130if (prop.PropertyType != typeof(Color))
System.Xaml (1)
System\Xaml\XamlMember.cs (1)
1008return pi.PropertyType;