private CheckHubExists ( string resourceGroupName, string dataFactoryName, string hubName ) : bool | ||
resourceGroupName | string | |
dataFactoryName | string | |
hubName | string | |
return | bool |
private bool CheckHubExists(string resourceGroupName, string dataFactoryName, string hubName)
{
try
{
PSHub hub = this.GetHub(resourceGroupName, dataFactoryName, hubName);
return true;
}
catch (CloudException e)
{
if (e.Response.StatusCode == HttpStatusCode.NotFound)
{
return false;
}
throw;
}
}
}