AdministrationMetadataCatalog.ExportPackage method (String, Stream, Encoding, PackageContents, String)

Generates an XML representation of the metadata model using the specified model name, package contents, and setting identifier and writes this XML to the specified stream using the specified encoding.

Namespace:  Microsoft.SharePoint.BusinessData.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Sub ExportPackage ( _
    modelName As String, _
    stream As Stream, _
    encoding As Encoding, _
    packageContents As PackageContents, _
    settingId As String _
)
'Usage
Dim instance As AdministrationMetadataCatalog
Dim modelName As String
Dim stream As Stream
Dim encoding As Encoding
Dim packageContents As PackageContents
Dim settingId As String

instance.ExportPackage(modelName, stream, _
    encoding, packageContents, settingId)
public void ExportPackage(
    string modelName,
    Stream stream,
    Encoding encoding,
    PackageContents packageContents,
    string settingId
)

Parameters

  • settingId
    Type: System.String

    The identifier of a partition in the Metadata Store where to read properties, localized names, and access control entries.

Exceptions

Exception Condition
ArgumentException

The modelName parameter is a null reference (Nothing in Visual Basic) or empty, or the packageContents parameter has PackageContents.InlineProxies set and PackageContents.Model unset.

Remarks

If packageContents is set to PackageContents.Model, the method returns an XML representation of all the metadata object contained in the metadata model, along with their properties, localized names and access control entries. Otherwise, the method returns an XML representation of only the localized names, properties, and access control entries that correspond to the metadata objects in the model.

See also

Reference

AdministrationMetadataCatalog class

AdministrationMetadataCatalog members

ExportPackage overload

Microsoft.SharePoint.BusinessData.Administration namespace