PartBuilder<T>.ImportProperty 方法
定义
指定属性应导入。Specifies that a property should be imported.
重载
| ImportProperty(Expression<Func<T,Object>>) |
指定属性应导入。Specifies that a property should be imported. |
| ImportProperty(Expression<Func<T,Object>>, Action<ImportBuilder>) |
指定应导入的属性,并为结果导入提供配置信息。Specifies that a property should be imported, and provides configuration information for the resulting import. |
| ImportProperty<TContract>(Expression<Func<T,Object>>) |
使用指定的协定名称指定应导入的属性。Specifies that a property should be imported using the specified contract name. |
| ImportProperty<TContract>(Expression<Func<T,Object>>, Action<ImportBuilder>) |
使用指定的协定名称指定应导入的属性,并为结果导入提供配置信息。Specifies that a property should be imported using the specified contract name, and provides configuration information for the resulting import. |
ImportProperty(Expression<Func<T,Object>>)
指定属性应导入。Specifies that a property should be imported.
public:
System::ComponentModel::Composition::Registration::PartBuilder<T> ^ ImportProperty(System::Linq::Expressions::Expression<Func<T, System::Object ^> ^> ^ propertyFilter);
public System.ComponentModel.Composition.Registration.PartBuilder<T> ImportProperty (System.Linq.Expressions.Expression<Func<T,object>> propertyFilter);
member this.ImportProperty : System.Linq.Expressions.Expression<Func<'T, obj>> -> System.ComponentModel.Composition.Registration.PartBuilder<'T>
Public Function ImportProperty (propertyFilter As Expression(Of Func(Of T, Object))) As PartBuilder(Of T)
参数
- propertyFilter
- Expression<Func<T,Object>>
生成对目标属性的引用的表达式。An expression that results in a reference to the target property.
返回
允许链接的当前对象。The current object, to allow chaining.
例外
propertyFilter 为 null。propertyFilter is null.
适用于
ImportProperty(Expression<Func<T,Object>>, Action<ImportBuilder>)
指定应导入的属性,并为结果导入提供配置信息。Specifies that a property should be imported, and provides configuration information for the resulting import.
public:
System::ComponentModel::Composition::Registration::PartBuilder<T> ^ ImportProperty(System::Linq::Expressions::Expression<Func<T, System::Object ^> ^> ^ propertyFilter, Action<System::ComponentModel::Composition::Registration::ImportBuilder ^> ^ importConfiguration);
public System.ComponentModel.Composition.Registration.PartBuilder<T> ImportProperty (System.Linq.Expressions.Expression<Func<T,object>> propertyFilter, Action<System.ComponentModel.Composition.Registration.ImportBuilder> importConfiguration);
member this.ImportProperty : System.Linq.Expressions.Expression<Func<'T, obj>> * Action<System.ComponentModel.Composition.Registration.ImportBuilder> -> System.ComponentModel.Composition.Registration.PartBuilder<'T>
Public Function ImportProperty (propertyFilter As Expression(Of Func(Of T, Object)), importConfiguration As Action(Of ImportBuilder)) As PartBuilder(Of T)
参数
- propertyFilter
- Expression<Func<T,Object>>
生成对目标属性的引用的表达式。An expression that results in a reference to the target property.
- importConfiguration
- Action<ImportBuilder>
一个包含有关导入的配置信息的的对象。An object that contains configuration information about the import. 默认值为 null。The default value is null.
返回
允许链接的当前对象。The current object, to allow chaining.
例外
propertyFilter 为 null。propertyFilter is null.
适用于
ImportProperty<TContract>(Expression<Func<T,Object>>)
使用指定的协定名称指定应导入的属性。Specifies that a property should be imported using the specified contract name.
public:
generic <typename TContract>
System::ComponentModel::Composition::Registration::PartBuilder<T> ^ ImportProperty(System::Linq::Expressions::Expression<Func<T, System::Object ^> ^> ^ propertyFilter);
public System.ComponentModel.Composition.Registration.PartBuilder<T> ImportProperty<TContract> (System.Linq.Expressions.Expression<Func<T,object>> propertyFilter);
member this.ImportProperty : System.Linq.Expressions.Expression<Func<'T, obj>> -> System.ComponentModel.Composition.Registration.PartBuilder<'T>
Public Function ImportProperty(Of TContract) (propertyFilter As Expression(Of Func(Of T, Object))) As PartBuilder(Of T)
类型参数
- TContract
要使用的协定类型。The contract type to use.
参数
- propertyFilter
- Expression<Func<T,Object>>
生成对目标属性的引用的表达式。An expression that results in a reference to the target property.
返回
允许链接的当前对象。The current object, to allow chaining.
例外
propertyFilter 为 null。propertyFilter is null.
适用于
ImportProperty<TContract>(Expression<Func<T,Object>>, Action<ImportBuilder>)
使用指定的协定名称指定应导入的属性,并为结果导入提供配置信息。Specifies that a property should be imported using the specified contract name, and provides configuration information for the resulting import.
public:
generic <typename TContract>
System::ComponentModel::Composition::Registration::PartBuilder<T> ^ ImportProperty(System::Linq::Expressions::Expression<Func<T, System::Object ^> ^> ^ propertyFilter, Action<System::ComponentModel::Composition::Registration::ImportBuilder ^> ^ importConfiguration);
public System.ComponentModel.Composition.Registration.PartBuilder<T> ImportProperty<TContract> (System.Linq.Expressions.Expression<Func<T,object>> propertyFilter, Action<System.ComponentModel.Composition.Registration.ImportBuilder> importConfiguration);
member this.ImportProperty : System.Linq.Expressions.Expression<Func<'T, obj>> * Action<System.ComponentModel.Composition.Registration.ImportBuilder> -> System.ComponentModel.Composition.Registration.PartBuilder<'T>
Public Function ImportProperty(Of TContract) (propertyFilter As Expression(Of Func(Of T, Object)), importConfiguration As Action(Of ImportBuilder)) As PartBuilder(Of T)
类型参数
- TContract
要使用的协定名称。The contract name to use.
参数
- propertyFilter
- Expression<Func<T,Object>>
生成对目标属性的引用的表达式。An expression that results in a reference to the target property.
- importConfiguration
- Action<ImportBuilder>
一个包含有关导入的配置信息的的对象。An object that contains configuration information about the import. 默认值为 null。The default value is null.
返回
允许链接的当前对象。The current object, to allow chaining.
例外
propertyFilter 为 null。propertyFilter is null.