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

CheckDatasetExists() private method

private CheckDatasetExists ( string resourceGroupName, string dataFactoryName, string datasetName ) : bool
resourceGroupName string
dataFactoryName string
datasetName string
return bool
        private bool CheckDatasetExists(string resourceGroupName, string dataFactoryName, string datasetName)
        {
            // ToDo: implement HEAD to check if the dataset exists
            try
            {
                PSDataset dataset = this.GetDataset(resourceGroupName, dataFactoryName, datasetName);

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