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;
}
}
}
}