语言

DependencyInjectionMethodParameterBinding 类

定义

描述 EF 内部依赖项注入服务上方法的绑定,该服务可能或可能也未关联 IServiceProperty到构造函数、工厂方法或类似参数。

[System.Runtime.CompilerServices.Nullable(0)]
public class DependencyInjectionMethodParameterBinding : Microsoft.EntityFrameworkCore.Metadata.DependencyInjectionParameterBinding
public class DependencyInjectionMethodParameterBinding : Microsoft.EntityFrameworkCore.Metadata.DependencyInjectionParameterBinding
[<System.Runtime.CompilerServices.Nullable(0)>]
type DependencyInjectionMethodParameterBinding = class
    inherit DependencyInjectionParameterBinding
type DependencyInjectionMethodParameterBinding = class
    inherit DependencyInjectionParameterBinding
Public Class DependencyInjectionMethodParameterBinding
Inherits DependencyInjectionParameterBinding
继承
特性

注解

有关详细信息和示例,请参阅 包含构造函数的实体类型 。

构造函数

名称 说明
DependencyInjectionMethodParameterBinding(Type, Type, MethodInfo, IPropertyBase)

DependencyInjectionParameterBinding为给定服务类型的给定方法创建新实例。

DependencyInjectionMethodParameterBinding(Type, Type, MethodInfo, IPropertyBase[])

DependencyInjectionParameterBinding为给定服务类型的给定方法创建新实例。

属性

名称 说明
ConsumedProperties

此绑定处理的属性,因此无需以其他方式设置。

(继承自 ParameterBinding)
Method

绑定到的方法,如依赖项注入服务接口所定义。

ParameterType

参数 CLR 类型。

(继承自 ParameterBinding)
ServiceDelegate

在实体实例上设置 CLR 服务属性的委托。

ServiceType

EF 内部服务 CLR 类型。

(继承自 ServiceParameterBinding)

方法

名称 说明
BindToParameter(Expression, Expression)

创建一个表达式树,表示属性的值从具体化表达式绑定到构造函数、工厂方法等的参数。

BindToParameter(Expression, Expression)

创建一个表达式树,表示属性的值从具体化表达式绑定到构造函数、工厂方法等的参数。

(继承自 DependencyInjectionParameterBinding)
BindToParameter(ParameterBindingInfo)

创建一个表达式树,表示属性的值从具体化表达式绑定到构造函数、工厂方法等的参数。

BindToParameter(ParameterBindingInfo)

创建一个表达式树,表示属性的值从具体化表达式绑定到构造函数、工厂方法等的参数。

(继承自 ServiceParameterBinding)
With(IPropertyBase[])

创建包含给定已使用属性的副本。

适用于