private bool CheckFunctionExists(string resourceGroupName, string jobName, string functionName)
{
try
{
PSFunction function = GetFunction(resourceGroupName, jobName, functionName);
return true;
}
catch (CloudException e)
{
//Get throws Exception message with NotFound Status
if (e.Response.StatusCode == HttpStatusCode.NotFound)
{
return false;
}
else
{
throw;
}
}
}
}