PartConventionBuilder<T>.ExportProperty 方法
定义
重载
| ExportProperty(Expression<Func<T,Object>>) |
导出指定属性。Exports a specified property. |
| ExportProperty(Expression<Func<T,Object>>, Action<ExportConventionBuilder>) |
用指定的配置导出指定属性。Exports a specified property with the specified configuration. |
| ExportProperty<TContract>(Expression<Func<T,Object>>) |
将一个指定属性导出作为一个指定的协定类型。Exports a specified property as a specified contract type. |
| ExportProperty<TContract>(Expression<Func<T,Object>>, Action<ExportConventionBuilder>) |
使用指定的配置,将一个指定属性导出作为一个指定的协定类型。Exports a specified property as a specified contract type by using the specified configuration. |
ExportProperty(Expression<Func<T,Object>>)
导出指定属性。Exports a specified property.
public:
System::Composition::Convention::PartConventionBuilder<T> ^ ExportProperty(System::Linq::Expressions::Expression<Func<T, System::Object ^> ^> ^ propertySelector);
public System.Composition.Convention.PartConventionBuilder<T> ExportProperty (System.Linq.Expressions.Expression<Func<T,object>> propertySelector);
member this.ExportProperty : System.Linq.Expressions.Expression<Func<'T, obj>> -> System.Composition.Convention.PartConventionBuilder<'T>
Public Function ExportProperty (propertySelector As Expression(Of Func(Of T, Object))) As PartConventionBuilder(Of T)
参数
- propertySelector
- Expression<Func<T,Object>>
选择要导出的属性的函数。A function that selects the property to export.
返回
可用于进一步配置部件的对象。An object that can be used to further configure the part.
适用于
ExportProperty(Expression<Func<T,Object>>, Action<ExportConventionBuilder>)
用指定的配置导出指定属性。Exports a specified property with the specified configuration.
public:
System::Composition::Convention::PartConventionBuilder<T> ^ ExportProperty(System::Linq::Expressions::Expression<Func<T, System::Object ^> ^> ^ propertySelector, Action<System::Composition::Convention::ExportConventionBuilder ^> ^ exportConfiguration);
public System.Composition.Convention.PartConventionBuilder<T> ExportProperty (System.Linq.Expressions.Expression<Func<T,object>> propertySelector, Action<System.Composition.Convention.ExportConventionBuilder> exportConfiguration);
member this.ExportProperty : System.Linq.Expressions.Expression<Func<'T, obj>> * Action<System.Composition.Convention.ExportConventionBuilder> -> System.Composition.Convention.PartConventionBuilder<'T>
Public Function ExportProperty (propertySelector As Expression(Of Func(Of T, Object)), exportConfiguration As Action(Of ExportConventionBuilder)) As PartConventionBuilder(Of T)
参数
- propertySelector
- Expression<Func<T,Object>>
选择要导出的属性的函数。A function that selects the property to export.
- exportConfiguration
- Action<ExportConventionBuilder>
一个操作,用于配置导出的属性。An action that configures the exported property.
返回
可用于进一步配置部件的对象。An object that can be used to further configure the part.
例外
propertySelector 表达式必须为 MemberExpression,用于访问属性。The propertySelector expression must be a MemberExpression for accessing a property.
适用于
ExportProperty<TContract>(Expression<Func<T,Object>>)
将一个指定属性导出作为一个指定的协定类型。Exports a specified property as a specified contract type.
public:
generic <typename TContract>
System::Composition::Convention::PartConventionBuilder<T> ^ ExportProperty(System::Linq::Expressions::Expression<Func<T, System::Object ^> ^> ^ propertySelector);
public System.Composition.Convention.PartConventionBuilder<T> ExportProperty<TContract> (System.Linq.Expressions.Expression<Func<T,object>> propertySelector);
member this.ExportProperty : System.Linq.Expressions.Expression<Func<'T, obj>> -> System.Composition.Convention.PartConventionBuilder<'T>
Public Function ExportProperty(Of TContract) (propertySelector As Expression(Of Func(Of T, Object))) As PartConventionBuilder(Of T)
类型参数
- TContract
协定类型。The contract type.
参数
- propertySelector
- Expression<Func<T,Object>>
选择要导出的属性的函数。A function that selects the property to export.
返回
可用于进一步配置部件的对象。An object that can be used to further configure the part.
例外
propertySelector 表达式必须为 MemberExpression,用于访问属性。The propertySelector expression must be a MemberExpression for accessing a property.
适用于
ExportProperty<TContract>(Expression<Func<T,Object>>, Action<ExportConventionBuilder>)
使用指定的配置,将一个指定属性导出作为一个指定的协定类型。Exports a specified property as a specified contract type by using the specified configuration.
public:
generic <typename TContract>
System::Composition::Convention::PartConventionBuilder<T> ^ ExportProperty(System::Linq::Expressions::Expression<Func<T, System::Object ^> ^> ^ propertySelector, Action<System::Composition::Convention::ExportConventionBuilder ^> ^ exportConfiguration);
public System.Composition.Convention.PartConventionBuilder<T> ExportProperty<TContract> (System.Linq.Expressions.Expression<Func<T,object>> propertySelector, Action<System.Composition.Convention.ExportConventionBuilder> exportConfiguration);
member this.ExportProperty : System.Linq.Expressions.Expression<Func<'T, obj>> * Action<System.Composition.Convention.ExportConventionBuilder> -> System.Composition.Convention.PartConventionBuilder<'T>
Public Function ExportProperty(Of TContract) (propertySelector As Expression(Of Func(Of T, Object)), exportConfiguration As Action(Of ExportConventionBuilder)) As PartConventionBuilder(Of T)
类型参数
- TContract
协定类型。The contract type.
参数
- propertySelector
- Expression<Func<T,Object>>
选择要导出的属性的函数。A function that selects the property to export.
- exportConfiguration
- Action<ExportConventionBuilder>
一个操作,用于配置导出的属性。An action that configures the exported property.
返回
可用于进一步配置部件的对象。An object that can be used to further configure the part.