Partager via


OperationsProgress Class

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

An abstract class containing the progress of a long running operation.

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

Syntax

'Declaration
<StrongNameIdentityPermissionAttribute(SecurityAction.InheritanceDemand, PublicKey := "0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")> _
Public MustInherit Class OperationsProgress _
    Inherits CatalogObjectBase
'Usage
Dim instance As OperationsProgress
[StrongNameIdentityPermissionAttribute(SecurityAction.InheritanceDemand, PublicKey = "0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
public abstract class OperationsProgress : CatalogObjectBase
[StrongNameIdentityPermissionAttribute(SecurityAction::InheritanceDemand, PublicKey = L"0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
public ref class OperationsProgress abstract : public CatalogObjectBase
public abstract class OperationsProgress extends CatalogObjectBase

Remarks

The following progress classes derive from this class.

  • ExportProgress - Contains information about the status of the export operation.

  • ImportProgress - Contains information about the status of the import operation.

  • RebuildProgress - Contains information about the status of the rebuild operation.

Examples

//Imports an XML file

internal void ImportXml(string fileName)

{

// Create a CatalogImportOptions object and set properties on it

CatalogImportOptions catalogImportOptions = new CatalogImportOptions();

catalogImportOptions.Operation = ImportOperation.ValidateAndImport;

/* Setting additional import options

* Set the CSV list of catalogs to import

catalogImportOptions.CatalogsToImport = "Catalgo1,Catalog2";

catalogImportOptions.PropertiesToImport = "ListPrice";

*/

// The ImportXml returns an ImportProgress object

// Use the Status property to determine the current status

ImportProgress importProgress = this.catalogContext.ImportXml(catalogImportOptions, fileName);

while (importProgress.Status == CatalogOperationsStatus.InProgress)

{

System.Threading.Thread.Sleep(3000);

// Call the refresh method to refresh the current status

importProgress.Refresh();

}

Console.WriteLine(importProgress.EndDate);

// If the import operation failed

if (importProgress.Status == CatalogOperationsStatus.Failed ||

importProgress.Status == CatalogOperationsStatus.CompletedWithErrors)

{

// Use the Errors property to get the errors that occurred during import

foreach (CatalogError error in importProgress.Errors)

{

Console.WriteLine(error.LineNumber);

Console.WriteLine(error.Message);

}

}

}

Inheritance Hierarchy

System..::.Object
  Microsoft.CommerceServer.Catalog..::.CatalogObjectBase
    Microsoft.CommerceServer.Catalog..::.OperationsProgress
      Microsoft.CommerceServer.Catalog..::.ExportProgress
      Microsoft.CommerceServer.Catalog..::.ImportProgress
      Microsoft.CommerceServer.Catalog..::.RebuildProgress

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

OperationsProgress Members

Microsoft.CommerceServer.Catalog Namespace