Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Include Protected Members
Include Inherited Members
Creates or updates the application definition for a business application in the Business Data Catalog from XML.
Overload List
| Name | Description | |
|---|---|---|
![]() |
ImportPackage(Stream, ParseContext, PackageContents) | Creates or updates the application definition for a business application in the Business Data Catalog from XML. |
![]() |
ImportPackage(XmlReader, ParseContext, PackageContents) | Creates or updates the application definition for a business application in the Business Data Catalog from XML. |
![]() |
ImportPackage(String, ParseContext, Encoding, PackageContents) | 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
Microsoft.Office.Server.ApplicationRegistry.Administration Namespace
.gif)