IConstructorBindingFactory.TryBindConstructor 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
TryBindConstructor(IConventionEntityType, ConstructorInfo, InstantiationBinding, IEnumerable<ParameterInfo>)
警告
Use GetBindings
嘗試為給定實體類型建立 a InstantiationBinding 和 ConstructorInfo
[System.Obsolete("Use GetBindings")]
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);
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);
[<System.Obsolete("Use GetBindings")>]
abstract member TryBindConstructor : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * System.Reflection.ConstructorInfo * InstantiationBinding * seq -> bool
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>)
警告
Use GetBindings
嘗試為給定實體類型建立 a InstantiationBinding 和 ConstructorInfo
[System.Obsolete("Use GetBindings")]
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);
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);
[<System.Obsolete("Use GetBindings")>]
abstract member TryBindConstructor : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * System.Reflection.ConstructorInfo * InstantiationBinding * seq -> bool
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 否則,
- 屬性