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 代表 feed 中要映射屬性的元素的值。 若 NoneTargetPath,則必須將此值設為 null

targetTextContentKind
SyndicationTextContentKind

一個 TargetTextContentKind 用來識別內容格式的值,用於資訊流中顯示。

keepInContent
Boolean

布林值,也就是 true 被映射的屬性應該同時出現在其映射位置和資訊流內容區塊的時值。

適用於

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

建立一個實例 EntityPropertyMappingAttribute ,將屬性映射到自訂的 feed 元素。

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 但未指定,則在建構時拋出例外。

適用於