Exemplo n.º 1
0
 /// <summary>Archives a SystemFolder record using Metadata Parameters.</summary>
 /// <param name="transaction">Contains the parameters and exceptions for this command.</param>
 public new static void Archive(ParameterList parameters)
 {
     // Accessor for the SystemFolder Table.
     ServerMarketData.SystemFolderDataTable systemFolderTable = ServerMarketData.SystemFolder;
     // Extract the parameters from the command batch.
     AdoTransaction adoTransaction = parameters["adoTransaction"];
     SqlTransaction sqlTransaction = parameters["sqlTransaction"];
     object configurationId = parameters["configurationId"].Value;
     string externalSystemFolderId = parameters["systemFolderId"];
     // The row versioning is largely disabled for external operations.  The value is returned to the caller in the
     // event it's needed for operations within the batch.
     long rowVersion = long.MinValue;
     // Find the internal identifier using the primary key elements.
     // identifier is used to determine if a record exists with the same key.
     int systemFolderId = SystemFolder.FindRequiredKey(configurationId, "systemFolderId", externalSystemFolderId);
     // This disables the concurrency checking logic by finding the current row version and passing it to the
     // internal method.
     ServerMarketData.SystemFolderRow systemFolderRow = systemFolderTable.FindBySystemFolderId(systemFolderId);
     rowVersion = ((long)(systemFolderRow[systemFolderTable.RowVersionColumn]));
     // Call the internal method to complete the operation.
     MarkThree.Guardian.Core.SystemFolder.Archive(adoTransaction, sqlTransaction, rowVersion, systemFolderId);
 }