IConstructorBindingFactory.TryBindConstructor 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
TryBindConstructor(IConventionEntityType, ConstructorInfo, InstantiationBinding, IEnumerable<ParameterInfo>)
嘗試為指定的實體類型建立 InstantiationBinding 和 ConstructorInfo
public bool TryBindConstructor (Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, System.Reflection.ConstructorInfo constructor, out Microsoft.EntityFrameworkCore.Metadata.InstantiationBinding binding, out System.Collections.Generic.IEnumerable<System.Reflection.ParameterInfo> unboundParameters);
public bool TryBindConstructor (Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, System.Reflection.ConstructorInfo constructor, out Microsoft.EntityFrameworkCore.Metadata.InstantiationBinding? binding, out System.Collections.Generic.IEnumerable<System.Reflection.ParameterInfo>? unboundParameters);
abstract member TryBindConstructor : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * System.Reflection.ConstructorInfo * InstantiationBinding * seq -> bool
Public Function TryBindConstructor (entityType As IConventionEntityType, constructor As ConstructorInfo, ByRef binding As InstantiationBinding, ByRef unboundParameters As IEnumerable(Of ParameterInfo)) As Boolean
參數
- entityType
- IConventionEntityType
實體類型。
- constructor
- ConstructorInfo
要使用的建構函式。
- binding
- InstantiationBinding
系結,如果 null
可以建立,則 null
為 。
- unboundParameters
- IEnumerable<ParameterInfo>
無法系結的參數。
傳回
true
如果已建立系結,則為 ; false
否則。
適用於
TryBindConstructor(IMutableEntityType, ConstructorInfo, InstantiationBinding, IEnumerable<ParameterInfo>)
嘗試為指定的實體類型建立 InstantiationBinding 和 ConstructorInfo
public bool TryBindConstructor (Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, System.Reflection.ConstructorInfo constructor, out Microsoft.EntityFrameworkCore.Metadata.InstantiationBinding binding, out System.Collections.Generic.IEnumerable<System.Reflection.ParameterInfo> unboundParameters);
public bool TryBindConstructor (Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, System.Reflection.ConstructorInfo constructor, out Microsoft.EntityFrameworkCore.Metadata.InstantiationBinding? binding, out System.Collections.Generic.IEnumerable<System.Reflection.ParameterInfo>? unboundParameters);
abstract member TryBindConstructor : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * System.Reflection.ConstructorInfo * InstantiationBinding * seq -> bool
Public Function TryBindConstructor (entityType As IMutableEntityType, constructor As ConstructorInfo, ByRef binding As InstantiationBinding, ByRef unboundParameters As IEnumerable(Of ParameterInfo)) As Boolean
參數
- entityType
- IMutableEntityType
實體類型。
- constructor
- ConstructorInfo
要使用的建構函式。
- binding
- InstantiationBinding
系結,如果 null
可以建立,則 null
為 。
- unboundParameters
- IEnumerable<ParameterInfo>
無法系結的參數。
傳回
true
如果已建立系結,則為 ; false
否則。