다음을 통해 공유


CatalogExportFormatType Enumeration

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Specifies the catalog export format.

Namespace:  Microsoft.CommerceServer.Catalog
Assembly:  Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)

Syntax

'Declaration
Public Enumeration CatalogExportFormatType
'Usage
Dim instance As CatalogExportFormatType
public enum CatalogExportFormatType
public enum class CatalogExportFormatType
public enum CatalogExportFormatType

Members

Member name Description
CatalogFormatAttributeCentric Indicates the export type is attribute-centric format.
CatalogFormatXsd Indicates the export type is XML Schema Definition (XSD) format.

Remarks

The enumeration is a value for the export format type, either an attribute-centric, or an XML Scema Definition.

Examples

// Exports the catalogs to the xml file
internal void ExportToXmlFile(string fileName)
{
  CatalogExportOptions catalogExportOptions = new CatalogExportOptions();
  catalogExportOptions.FormatType = CatalogExportFormatType.CatalogFormatAttributeCentric;
  /*
    Set additional options
    catalogExportOptions.CatalogsToExport = "Catalog1,Catalog2";
    catalogExportOptions.Language = "en-US";
  */
  // The ImportXml returns an  ImportProgress object
  // Use the Status property to determine the current status
  ExportProgress exportProgress = this.catalogContext.ExportXml(catalogExportOptions, fileName);
  while (exportProgress.Status == CatalogOperationsStatus.InProgress)
  {
    System.Threading.Thread.Sleep(3000);
    // Call the refresh method to refresh the current status
    exportProgress.Refresh();
  }
  Console.WriteLine(exportProgress.EndDate);
  // If the export operation failed
  if (exportProgress.Status == CatalogOperationsStatus.Failed )
  {
    // Use the Errors property to get the errors that occurred during Export
    foreach (CatalogError error in exportProgress.Errors)
    {
      Console.WriteLine(error.Message);
    }
  }

}

See Also

Reference

Microsoft.CommerceServer.Catalog Namespace