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.
Deletes the catalog from the Catalog System.
Namespace: Microsoft.CommerceServer.Catalog
Assembly: Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)
Syntax
'Declaration
Public Sub DeleteCatalog ( _
catalogName As String _
)
'Usage
Dim instance As CatalogContext
Dim catalogName As String
instance.DeleteCatalog(catalogName)
public void DeleteCatalog(
string catalogName
)
public:
void DeleteCatalog(
String^ catalogName
)
public function DeleteCatalog(
catalogName : String
)
Parameters
- catalogName
Type: System..::.String
The catalog to delete. Should not be nullNothingnullptra null reference (Nothing in Visual Basic).
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The catalogName is nullNothingnullptra null reference (Nothing in Visual Basic). |
ValidationException | The catalogName is invalid. |
EntityDoesNotExistException | The catalogName already exists in the catalog system. |
NotAuthorizedException | The caller is not authorized to perform this operation. |
Remarks
Use this method to delete a catalog and derived custom catalogs from the Product Catalog System.
This method deletes the catalog from the catalog system. The catalogName should:
Not be nullNothingnullptra null reference (Nothing in Visual Basic) or blank.
Not exceed 85 characters.
Not contain the .,"[]'()# characters.
Examples
//Remove the extended property
catalogEntitiesExtension.RemovePropertyFromEntity(property1.Name);
//Delete the catalog
catalogContext.DeleteCatalog(catalog.Name);
catalogContext.DeleteCatalog(virtualCatalog.Name);
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.