From 0e1964a10c46b4002f76638cd2a84a6e7217daaa Mon Sep 17 00:00:00 2001 From: Geoff McElhanon Date: Sun, 6 May 2012 11:43:36 -0500 Subject: [PATCH] Made GetConfigurationValues tolerant of external vendor-supplied values that don't have urls or ids (i.e. RabbitMQ with CloudAMQP). --- AppHarbor.Net/AppHarborApi.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/AppHarbor.Net/AppHarborApi.cs b/AppHarbor.Net/AppHarborApi.cs index 6951d3e..9b57032 100644 --- a/AppHarbor.Net/AppHarborApi.cs +++ b/AppHarbor.Net/AppHarborApi.cs @@ -108,20 +108,20 @@ internal AppHarborApi(AuthInfo authInfo, RestClient restClient) private static long ExtractLongID(string url) { - if (url == null) - throw new ArgumentNullException("url"); + if (url == null) + return 0L; return Convert.ToInt64(ExtractID(url)); } private static string ExtractID(string url) - { - if (url == null) - throw new ArgumentNullException("url"); + { + if (url == null) + return string.Empty; return url.Split('/').Last(); - } - + } + private T ExecuteGet(RestRequest request) where T : new() {