Share via


ApplicationRegistry.ImportPackage Method

Include Protected Members
Include Inherited Members

NOTE: This API is now obsolete.

Creates or updates the application definition for a business application in the Business Data Catalog from XML.

Overload List

  Name Description
Public method ImportPackage(Stream, ParseContext, PackageContents) Obsolete. Creates or updates the application definition for a business application in the Business Data Catalog from XML.
Public method ImportPackage(XmlReader, ParseContext, PackageContents) Obsolete. Creates or updates the application definition for a business application in the Business Data Catalog from XML.
Public method ImportPackage(String, ParseContext, Encoding, PackageContents) Obsolete. Creates or updates the application definition for a business application in the Business Data Catalog from XML.

Top

Examples

[C#]
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint.Administration;
using Microsoft.Office.Server.ApplicationRegistry.Administration;
using Microsoft.Office.Server.Administration;
using Microsoft.Office.Server.ApplicationRegistry.Infrastructure;
using System.IO;
using System.Xml;

namespace BDCom
{
    class Program
    {
        static void Main(string[] args)
        {
            SetupBDC();
            ImportLobSystemFromXML();
            Console.Read();
        }
        static void SetupBDC()
        {
            SqlSessionProvider.Instance().SetSharedResourceProviderToUse("EnterYourSSPNameHere");
        }
        public static void ImportLobSystemFromXML()
        {
            if (File.Exists("e:\\dummymetadata.xml"))
            {
                FileStream xmlStream = new FileStream("e:\\dummymetadata.xml", FileMode.Open, FileAccess.Read);
                ParseContext parseContext = new ParseContext();
                ApplicationRegistry.Instance.ImportPackage(xmlStream, parseContext);
            }
            else
            {
                throw new ArgumentException(string.Format("Specified path is invalid [{0}]", "e:\\dummymetadata.xml"));
            }
        }
    }
}

See Also

Reference

ApplicationRegistry Class

ApplicationRegistry Members

Microsoft.Office.Server.ApplicationRegistry.Administration Namespace