EntityPropertyMappingAttribute 构造函数

定义

创建一个新实例 EntityPropertyMappingAttribute

重载

EntityPropertyMappingAttribute(String, SyndicationItemProperty, SyndicationTextContentKind, Boolean)

创建一个新实例 EntityPropertyMappingAttribute

public:
 EntityPropertyMappingAttribute(System::String ^ sourcePath, System::Data::Services::Common::SyndicationItemProperty targetSyndicationItem, System::Data::Services::Common::SyndicationTextContentKind targetTextContentKind, bool keepInContent);
public EntityPropertyMappingAttribute(string sourcePath, System.Data.Services.Common.SyndicationItemProperty targetSyndicationItem, System.Data.Services.Common.SyndicationTextContentKind targetTextContentKind, bool keepInContent);
new System.Data.Services.Common.EntityPropertyMappingAttribute : string * System.Data.Services.Common.SyndicationItemProperty * System.Data.Services.Common.SyndicationTextContentKind * bool -> System.Data.Services.Common.EntityPropertyMappingAttribute
Public Sub New (sourcePath As String, targetSyndicationItem As SyndicationItemProperty, targetTextContentKind As SyndicationTextContentKind, keepInContent As Boolean)

参数

sourcePath
String

映射到源项的指定属性的实体类型的属性的名称(作为字符串)。

targetSyndicationItem
SyndicationItemProperty

一个 SyndicationItemProperty 值,表示要映射到属性的源中的元素。 如果不是NoneTargetPath则必须将null此值设置为 。

targetTextContentKind
SyndicationTextContentKind

一个 TargetTextContentKind 值,该值标识要在源中显示的内容的格式。

keepInContent
Boolean

布尔值,即 true 当要映射的属性应同时出现在其映射到的位置和源的内容部分中。

适用于

EntityPropertyMappingAttribute(String, String, String, String, Boolean)

创建将属性映射到自定义源元素的 EntityPropertyMappingAttribute 实例。

public:
 EntityPropertyMappingAttribute(System::String ^ sourcePath, System::String ^ targetPath, System::String ^ targetNamespacePrefix, System::String ^ targetNamespaceUri, bool keepInContent);
public EntityPropertyMappingAttribute(string sourcePath, string targetPath, string targetNamespacePrefix, string targetNamespaceUri, bool keepInContent);
new System.Data.Services.Common.EntityPropertyMappingAttribute : string * string * string * string * bool -> System.Data.Services.Common.EntityPropertyMappingAttribute
Public Sub New (sourcePath As String, targetPath As String, targetNamespacePrefix As String, targetNamespaceUri As String, keepInContent As Boolean)

参数

sourcePath
String

实体类型的属性的名称(作为字符串),该属性映射到源中的指定属性。

targetPath
String

目标的名称,作为字符串,在属性映射到的结果源中。

targetNamespacePrefix
String

此参数与 targetNamespaceUri指定元素所在的 targetPath 命名空间。

targetNamespaceUri
String

将元素的命名空间 URI 指定为由属性指定的 targetName 字符串。

keepInContent
Boolean

布尔值,即 true 当要映射的属性应同时出现在其映射到的位置和源的内容部分中。

注解

如果两者targetNamespacePrefix均未指定,targetNamespaceUritargetName则将放入默认命名空间中。 如果未 targetNamespacePrefix 指定,则自动生成前缀。 如果 targetNamespacePrefix 指定但 targetNamespaceUri 未指定异常,则会在构造时引发异常。

适用于