C# Class Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.RecoveryServicesBackupCmdletBase

Base class for Recovery Services Backup cmdlets
Inheritance: Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet
Show file Open project: Azure/azure-powershell

Public Methods

Method Description
GetJobObject ( string jobId ) : JobBase

Get the job PS model after fetching the job object from the service given the job ID.

GetJobObject ( IList jobIds ) : List

Gets list of job PS models after fetching the job objects from the service given the list of job IDs.

Protected Methods

Method Description
BeginProcessing ( ) : void
ExecutionBlock ( System.Action action ) : void

Wrapper method which executes the cmdlet processing blocks. Catches and logs any exception occuring during the execution.

HandleCreatedJob ( Microsoft.Azure.Management.RecoveryServices.Backup.Models.BaseRecoveryServicesJobResponse itemResponse, string operationName ) : void

Based on the response from the service, handles the job created in the service appropriately.

InitializeAzureBackupCmdlet ( ) : void

Initializes the service clients and the logging utility

Private Methods

Method Description
HandleException ( Exception exception ) : void

Handles set of exceptions thrown by client

Method Details

BeginProcessing() protected method

protected BeginProcessing ( ) : void
return void

ExecutionBlock() protected method

Wrapper method which executes the cmdlet processing blocks. Catches and logs any exception occuring during the execution.
protected ExecutionBlock ( System.Action action ) : void
action System.Action Delegate representing the cmdlet processing block
return void

GetJobObject() public method

Get the job PS model after fetching the job object from the service given the job ID.
public GetJobObject ( string jobId ) : JobBase
jobId string ID of the job to be fetched
return Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.JobBase

GetJobObject() public method

Gets list of job PS models after fetching the job objects from the service given the list of job IDs.
public GetJobObject ( IList jobIds ) : List
jobIds IList List of IDs of jobs to be fetched
return List

HandleCreatedJob() protected method

Based on the response from the service, handles the job created in the service appropriately.
protected HandleCreatedJob ( Microsoft.Azure.Management.RecoveryServices.Backup.Models.BaseRecoveryServicesJobResponse itemResponse, string operationName ) : void
itemResponse Microsoft.Azure.Management.RecoveryServices.Backup.Models.BaseRecoveryServicesJobResponse Response from service
operationName string Name of the operation
return void

InitializeAzureBackupCmdlet() protected method

Initializes the service clients and the logging utility
protected InitializeAzureBackupCmdlet ( ) : void
return void