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

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 _
) As Model
'Usage
Dim instance As AdministrationMetadataCatalog
Dim stream As Stream
Dim errors As String()
Dim encoding As Encoding
Dim packageContents As PackageContents
Dim returnValue As Model

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

Parameters

  • errors
    Type: []

    A list of the non-critical errors encountered during the import process.

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