AdministrationMetadataCatalog.ImportPackage method (Stream, String[], Encoding, PackageContents, String)

Imports the model from the specified stream into the Metadata Store using the specified encoding and package contents.

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

Syntax

'Declaration
Public Function ImportPackage ( _
    stream As Stream, _
    <OutAttribute> ByRef errors As String(), _
    encoding As Encoding, _
    packageContents As PackageContents, _
    settingId As String _
) As Model
'Usage
Dim instance As AdministrationMetadataCatalog
Dim stream As Stream
Dim errors As String()
Dim encoding As Encoding
Dim packageContents As PackageContents
Dim settingId As String
Dim returnValue As Model

returnValue = instance.ImportPackage(stream, _
    errors, encoding, packageContents, _
    settingId)
public Model ImportPackage(
    Stream stream,
    out string[] errors,
    Encoding encoding,
    PackageContents packageContents,
    string settingId
)

Parameters

  • errors
    Type: []

    A list of the noncritical errors encountered during the import process.

  • settingId
    Type: System.String

    The identifier of the Metadata Store partition in which the properties, localized names and access control entries of the metadata objects will be created.

Return value

Type: Microsoft.SharePoint.BusinessData.Administration.Model
The imported model.

Exceptions

Exception Condition
ArgumentNullException

The stream or encoding parameter is a null reference (Nothing in Visual Basic).

PackageFormatException

The format of the metadata content is invalid.

See also

Reference

AdministrationMetadataCatalog class

AdministrationMetadataCatalog members

ImportPackage overload

Microsoft.SharePoint.BusinessData.Administration namespace