Microsoft.Azure.Commands.DataFactories.DataFactoryClient.CheckPipelineExists C# (CSharp) Method

CheckPipelineExists() private method

private CheckPipelineExists ( string resourceGroupName, string dataFactoryName, string pipelineName ) : bool
resourceGroupName string
dataFactoryName string
pipelineName string
return bool
        private bool CheckPipelineExists(string resourceGroupName, string dataFactoryName, string pipelineName)
        {
            // ToDo: implement HEAD to check if the pipeline exists
            try
            {
                PSPipeline pipeline = GetPipeline(resourceGroupName, dataFactoryName, pipelineName);

                return true;
            }
            catch (CloudException e)
            {
                //Get throws Exception message with NotFound Status
                if (e.Response.StatusCode == HttpStatusCode.NotFound)
                {
                    return false;
                }
                else
                {
                    throw;
                }
            }
        }
    }