EntityPropertyMappingAttribute Constructor (String, String, String, String, Boolean)
Creates an instance of the EntityPropertyMappingAttribute to map a property to a custom feed element.
Namespace: System.Data.Services.Common
Assembly: Microsoft.Data.OData (in Microsoft.Data.OData.dll)
Syntax
'Declaration
Public Sub New ( _
sourcePath As String, _
targetPath As String, _
targetNamespacePrefix As String, _
targetNamespaceUri As String, _
keepInContent As Boolean _
)
'Usage
Dim sourcePath As String
Dim targetPath As String
Dim targetNamespacePrefix As String
Dim targetNamespaceUri As String
Dim keepInContent As Boolean
Dim instance As New EntityPropertyMappingAttribute(sourcePath, _
targetPath, targetNamespacePrefix, _
targetNamespaceUri, keepInContent)
public EntityPropertyMappingAttribute(
string sourcePath,
string targetPath,
string targetNamespacePrefix,
string targetNamespaceUri,
bool keepInContent
)
public:
EntityPropertyMappingAttribute(
String^ sourcePath,
String^ targetPath,
String^ targetNamespacePrefix,
String^ targetNamespaceUri,
bool keepInContent
)
new :
sourcePath:string *
targetPath:string *
targetNamespacePrefix:string *
targetNamespaceUri:string *
keepInContent:bool -> EntityPropertyMappingAttribute
public function EntityPropertyMappingAttribute(
sourcePath : String,
targetPath : String,
targetNamespacePrefix : String,
targetNamespaceUri : String,
keepInContent : boolean
)
Parameters
- sourcePath
Type: System.String
The name of the property of the entity type, as string, that is mapped to the specified property in the feed.
- targetPath
Type: System.String
The name of the target, as string, in the resulting feed to which the property is mapped.
- targetNamespacePrefix
Type: System.String
This parameter, together with targetNamespaceUri, specifies the namespace in which the targetPath element exists.
- targetNamespaceUri
Type: System.String
Specifies the namespace URI of the element, as string, specified by the targetName property.
- keepInContent
Type: System.Boolean
Boolean value that is true when the property being mapped must appear both in its mapped-to location and in the content section of the feed.
Remarks
If neither targetNamespacePrefix nor targetNamespaceUri are specified, the targetName will be put in the default namespace. If targetNamespacePrefix is not specified, a prefix is autogenerated. If targetNamespacePrefix is specified, but targetNamespaceUri is not specified, an exception is thrown at construction time.
See Also
Reference
EntityPropertyMappingAttribute Class