Microsoft.Azure.Commands.RecoveryServices.CreateAzureSiteRecoveryProtectionProfileObject.ExecuteCmdlet C# (CSharp) Method

ExecuteCmdlet() public method

ProcessRecord of the command.
public ExecuteCmdlet ( ) : void
return void
        public override void ExecuteCmdlet()
        {
            try
            {
                this.WriteWarningWithTimestamp(
                    string.Format(
                        Properties.Resources.CmdletWillBeDeprecatedSoon,
                        this.MyInvocation.MyCommand.Name));

                switch (this.ParameterSetName)
                {
                    case ASRParameterSets.EnterpriseToEnterprise:
                        this.EnterpriseToEnterpriseProtectionProfileObject();
                        break;
                    case ASRParameterSets.EnterpriseToAzure:
                        this.EnterpriseToAzureProtectionProfileObject();
                        break;
                }
            }
            catch (Exception exception)
            {
                this.HandleException(exception);
            }
        }