Share via


IConventionTypeBaseBuilder.CanHaveComplexIndexerProperty 方法

定义

返回一个值,该值指示是否可以将给定的复杂索引器属性添加到此类型。

public bool CanHaveComplexIndexerProperty (Type propertyType, string propertyName, Type? complexType, bool fromDataAnnotation = false);
abstract member CanHaveComplexIndexerProperty : Type * string * Type * bool -> bool
Public Function CanHaveComplexIndexerProperty (propertyType As Type, propertyName As String, complexType As Type, Optional fromDataAnnotation As Boolean = false) As Boolean

参数

propertyType
Type

属性将保留的值的类型。

propertyName
String

要配置的属性的名称。

complexType
Type

目标复杂类型。

fromDataAnnotation
Boolean

指示配置是否是使用数据注释指定的。

返回

true 如果可以添加属性,则为 。

适用于