IConventionTypeBaseBuilder.CanHaveComplexProperty 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
CanHaveComplexProperty(MemberInfo, Type, Boolean) |
傳回值,指出指定的複雜屬性是否可以加入這個類型。 |
CanHaveComplexProperty(Type, String, Type, Boolean) |
傳回值,指出指定的複雜屬性是否可以加入這個類型。 |
CanHaveComplexProperty(MemberInfo, Type, Boolean)
傳回值,指出指定的複雜屬性是否可以加入這個類型。
public bool CanHaveComplexProperty (System.Reflection.MemberInfo memberInfo, Type? complexType = default, bool fromDataAnnotation = false);
abstract member CanHaveComplexProperty : System.Reflection.MemberInfo * Type * bool -> bool
Public Function CanHaveComplexProperty (memberInfo As MemberInfo, Optional complexType As Type = Nothing, Optional fromDataAnnotation As Boolean = false) As Boolean
參數
- memberInfo
- MemberInfo
PropertyInfo屬性的 或 FieldInfo 。
- complexType
- Type
目標複雜類型。
- fromDataAnnotation
- Boolean
指出是否已使用資料批註指定組態。
傳回
true
如果可以加入 屬性,則為 。
適用於
CanHaveComplexProperty(Type, String, Type, Boolean)
傳回值,指出指定的複雜屬性是否可以加入這個類型。
public bool CanHaveComplexProperty (Type? propertyType, string propertyName, Type? complexType = default, bool fromDataAnnotation = false);
abstract member CanHaveComplexProperty : Type * string * Type * bool -> bool
Public Function CanHaveComplexProperty (propertyType As Type, propertyName As String, Optional complexType As Type = Nothing, Optional fromDataAnnotation As Boolean = false) As Boolean
參數
- propertyType
- Type
屬性將保留的數值型別。
- propertyName
- String
要設定的屬性名稱。
- complexType
- Type
目標複雜類型。
- fromDataAnnotation
- Boolean
指出是否已使用資料批註指定組態。
傳回
true
如果可以加入 屬性,則為 。