General fixes and adjusted ParseSize method.

pull/2/head
Taloth Saldono 10 years ago
parent 518a75ea5c
commit 82061cf5a0

@ -1,3 +1,4 @@
using System;
using System.IO; using System.IO;
using System.Net; using System.Net;
using System.Linq; using System.Linq;
@ -35,12 +36,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.Blackhole
}; };
} }
protected void WithSuccessfulDownload() protected void GivenFailedDownload()
{
}
protected void WithFailedDownload()
{ {
Mocker.GetMock<IHttpClient>() Mocker.GetMock<IHttpClient>()
.Setup(c => c.DownloadFile(It.IsAny<string>(), It.IsAny<string>())) .Setup(c => c.DownloadFile(It.IsAny<string>(), It.IsAny<string>()))
@ -110,5 +106,15 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.Blackhole
result.Status.Should().Be(DownloadItemStatus.Downloading); result.Status.Should().Be(DownloadItemStatus.Downloading);
} }
[Test]
public void should_return_status_with_outputdirs()
{
var result = Subject.GetStatus();
result.IsLocalhost.Should().BeTrue();
result.OutputRootFolders.Should().NotBeNull();
result.OutputRootFolders.First().Should().Be(_completedDownloadFolder);
}
} }
} }

@ -92,26 +92,26 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
.Returns(configItems); .Returns(configItems);
} }
protected void WithMountPoint(String mountPath) protected void GivenMountPoint(String mountPath)
{ {
(Subject.Definition.Settings as NzbgetSettings).TvCategoryLocalPath = mountPath; (Subject.Definition.Settings as NzbgetSettings).TvCategoryLocalPath = mountPath;
} }
protected void WithFailedDownload() protected void GivenFailedDownload()
{ {
Mocker.GetMock<INzbgetProxy>() Mocker.GetMock<INzbgetProxy>()
.Setup(s => s.DownloadNzb(It.IsAny<Stream>(), It.IsAny<String>(), It.IsAny<String>(), It.IsAny<int>(), It.IsAny<NzbgetSettings>())) .Setup(s => s.DownloadNzb(It.IsAny<Stream>(), It.IsAny<String>(), It.IsAny<String>(), It.IsAny<int>(), It.IsAny<NzbgetSettings>()))
.Returns((String)null); .Returns((String)null);
} }
protected void WithSuccessfulDownload() protected void GivenSuccessfulDownload()
{ {
Mocker.GetMock<INzbgetProxy>() Mocker.GetMock<INzbgetProxy>()
.Setup(s => s.DownloadNzb(It.IsAny<Stream>(), It.IsAny<String>(), It.IsAny<String>(), It.IsAny<int>(), It.IsAny<NzbgetSettings>())) .Setup(s => s.DownloadNzb(It.IsAny<Stream>(), It.IsAny<String>(), It.IsAny<String>(), It.IsAny<int>(), It.IsAny<NzbgetSettings>()))
.Returns(Guid.NewGuid().ToString().Replace("-", "")); .Returns(Guid.NewGuid().ToString().Replace("-", ""));
} }
protected virtual void WithQueue(NzbgetQueueItem queue) protected virtual void GivenQueue(NzbgetQueueItem queue)
{ {
var list = new List<NzbgetQueueItem>(); var list = new List<NzbgetQueueItem>();
@ -129,7 +129,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
.Returns(new List<NzbgetPostQueueItem>()); .Returns(new List<NzbgetPostQueueItem>());
} }
protected virtual void WithHistory(NzbgetHistoryItem history) protected virtual void GivenHistory(NzbgetHistoryItem history)
{ {
var list = new List<NzbgetHistoryItem>(); var list = new List<NzbgetHistoryItem>();
@ -146,8 +146,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
[Test] [Test]
public void GetItems_should_return_no_items_when_queue_is_empty() public void GetItems_should_return_no_items_when_queue_is_empty()
{ {
WithQueue(null); GivenQueue(null);
WithHistory(null); GivenHistory(null);
Subject.GetItems().Should().BeEmpty(); Subject.GetItems().Should().BeEmpty();
} }
@ -157,8 +157,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
{ {
_queued.ActiveDownloads = 0; _queued.ActiveDownloads = 0;
WithQueue(_queued); GivenQueue(_queued);
WithHistory(null); GivenHistory(null);
var result = Subject.GetItems().Single(); var result = Subject.GetItems().Single();
@ -170,8 +170,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
{ {
_queued.PausedSizeLo = _queued.RemainingSizeLo; _queued.PausedSizeLo = _queued.RemainingSizeLo;
WithQueue(_queued); GivenQueue(_queued);
WithHistory(null); GivenHistory(null);
var result = Subject.GetItems().Single(); var result = Subject.GetItems().Single();
@ -183,8 +183,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
{ {
_queued.ActiveDownloads = 1; _queued.ActiveDownloads = 1;
WithQueue(_queued); GivenQueue(_queued);
WithHistory(null); GivenHistory(null);
var result = Subject.GetItems().Single(); var result = Subject.GetItems().Single();
@ -194,8 +194,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
[Test] [Test]
public void completed_download_should_have_required_properties() public void completed_download_should_have_required_properties()
{ {
WithQueue(null); GivenQueue(null);
WithHistory(_completed); GivenHistory(_completed);
var result = Subject.GetItems().Single(); var result = Subject.GetItems().Single();
@ -205,8 +205,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
[Test] [Test]
public void failed_item_should_have_required_properties() public void failed_item_should_have_required_properties()
{ {
WithQueue(null); GivenQueue(null);
WithHistory(_failed); GivenHistory(_failed);
var result = Subject.GetItems().Single(); var result = Subject.GetItems().Single();
@ -216,7 +216,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
[Test] [Test]
public void Download_should_return_unique_id() public void Download_should_return_unique_id()
{ {
WithSuccessfulDownload(); GivenSuccessfulDownload();
var remoteEpisode = CreateRemoteEpisode(); var remoteEpisode = CreateRemoteEpisode();
@ -230,8 +230,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
{ {
_completed.Category = "mycat"; _completed.Category = "mycat";
WithQueue(null); GivenQueue(null);
WithHistory(_completed); GivenHistory(_completed);
var items = Subject.GetItems(); var items = Subject.GetItems();
@ -251,7 +251,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
[Test] [Test]
public void should_return_status_with_mounted_outputdir() public void should_return_status_with_mounted_outputdir()
{ {
WithMountPoint(@"O:\mymount".AsOsAgnostic()); GivenMountPoint(@"O:\mymount".AsOsAgnostic());
var result = Subject.GetStatus(); var result = Subject.GetStatus();
@ -263,10 +263,10 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
[Test] [Test]
public void should_remap_storage_if_mounted() public void should_remap_storage_if_mounted()
{ {
WithMountPoint(@"O:\mymount".AsOsAgnostic()); GivenMountPoint(@"O:\mymount".AsOsAgnostic());
WithQueue(null); GivenQueue(null);
WithHistory(_completed); GivenHistory(_completed);
var result = Subject.GetItems().Single(); var result = Subject.GetItems().Single();

@ -106,19 +106,19 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabnzbdTests
.Returns(_config); .Returns(_config);
} }
protected void WithMountPoint(String mountPath) protected void GivenMountPoint(String mountPath)
{ {
(Subject.Definition.Settings as SabnzbdSettings).TvCategoryLocalPath = mountPath; (Subject.Definition.Settings as SabnzbdSettings).TvCategoryLocalPath = mountPath;
} }
protected void WithFailedDownload() protected void GivenFailedDownload()
{ {
Mocker.GetMock<ISabnzbdProxy>() Mocker.GetMock<ISabnzbdProxy>()
.Setup(s => s.DownloadNzb(It.IsAny<Stream>(), It.IsAny<String>(), It.IsAny<String>(), It.IsAny<int>(), It.IsAny<SabnzbdSettings>())) .Setup(s => s.DownloadNzb(It.IsAny<Stream>(), It.IsAny<String>(), It.IsAny<String>(), It.IsAny<int>(), It.IsAny<SabnzbdSettings>()))
.Returns((SabnzbdAddResponse)null); .Returns((SabnzbdAddResponse)null);
} }
protected void WithSuccessfulDownload() protected void GivenSuccessfulDownload()
{ {
Mocker.GetMock<ISabnzbdProxy>() Mocker.GetMock<ISabnzbdProxy>()
.Setup(s => s.DownloadNzb(It.IsAny<Stream>(), It.IsAny<String>(), It.IsAny<String>(), It.IsAny<int>(), It.IsAny<SabnzbdSettings>())) .Setup(s => s.DownloadNzb(It.IsAny<Stream>(), It.IsAny<String>(), It.IsAny<String>(), It.IsAny<int>(), It.IsAny<SabnzbdSettings>()))
@ -129,7 +129,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabnzbdTests
}); });
} }
protected virtual void WithQueue(SabnzbdQueue queue) protected virtual void GivenQueue(SabnzbdQueue queue)
{ {
if (queue == null) if (queue == null)
{ {
@ -145,7 +145,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabnzbdTests
.Returns(queue); .Returns(queue);
} }
protected virtual void WithHistory(SabnzbdHistory history) protected virtual void GivenHistory(SabnzbdHistory history)
{ {
if (history == null) if (history == null)
history = new SabnzbdHistory() { Items = new List<SabnzbdHistoryItem>() }; history = new SabnzbdHistory() { Items = new List<SabnzbdHistoryItem>() };
@ -158,8 +158,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabnzbdTests
[Test] [Test]
public void GetItems_should_return_no_items_when_queue_is_empty() public void GetItems_should_return_no_items_when_queue_is_empty()
{ {
WithQueue(null); GivenQueue(null);
WithHistory(null); GivenHistory(null);
Subject.GetItems().Should().BeEmpty(); Subject.GetItems().Should().BeEmpty();
} }
@ -170,8 +170,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabnzbdTests
{ {
_queued.Items.First().Status = status; _queued.Items.First().Status = status;
WithQueue(_queued); GivenQueue(_queued);
WithHistory(null); GivenHistory(null);
var result = Subject.GetItems().Single(); var result = Subject.GetItems().Single();
@ -184,8 +184,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabnzbdTests
{ {
_queued.Items.First().Status = status; _queued.Items.First().Status = status;
WithQueue(_queued); GivenQueue(_queued);
WithHistory(null); GivenHistory(null);
var result = Subject.GetItems().Single(); var result = Subject.GetItems().Single();
@ -205,8 +205,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabnzbdTests
{ {
_queued.Items.First().Status = status; _queued.Items.First().Status = status;
WithQueue(_queued); GivenQueue(_queued);
WithHistory(null); GivenHistory(null);
var result = Subject.GetItems().Single(); var result = Subject.GetItems().Single();
@ -217,8 +217,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabnzbdTests
[Test] [Test]
public void completed_download_should_have_required_properties() public void completed_download_should_have_required_properties()
{ {
WithQueue(null); GivenQueue(null);
WithHistory(_completed); GivenHistory(_completed);
var result = Subject.GetItems().Single(); var result = Subject.GetItems().Single();
@ -230,8 +230,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabnzbdTests
{ {
_completed.Items.First().Status = SabnzbdDownloadStatus.Failed; _completed.Items.First().Status = SabnzbdDownloadStatus.Failed;
WithQueue(null); GivenQueue(null);
WithHistory(_completed); GivenHistory(_completed);
var result = Subject.GetItems().Single(); var result = Subject.GetItems().Single();
@ -241,7 +241,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabnzbdTests
[Test] [Test]
public void Download_should_return_unique_id() public void Download_should_return_unique_id()
{ {
WithSuccessfulDownload(); GivenSuccessfulDownload();
var remoteEpisode = CreateRemoteEpisode(); var remoteEpisode = CreateRemoteEpisode();
@ -255,8 +255,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabnzbdTests
{ {
_completed.Items.First().Category = "myowncat"; _completed.Items.First().Category = "myowncat";
WithQueue(null); GivenQueue(null);
WithHistory(_completed); GivenHistory(_completed);
var items = Subject.GetItems(); var items = Subject.GetItems();
@ -292,8 +292,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabnzbdTests
_completed.Items.First().Title = title; _completed.Items.First().Title = title;
_completed.Items.First().Storage = (@"C:\sorted\" + title + @"\" + storage).AsOsAgnostic(); _completed.Items.First().Storage = (@"C:\sorted\" + title + @"\" + storage).AsOsAgnostic();
WithQueue(null); GivenQueue(null);
WithHistory(_completed); GivenHistory(_completed);
var result = Subject.GetItems().Single(); var result = Subject.GetItems().Single();
@ -303,10 +303,10 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabnzbdTests
[Test] [Test]
public void should_remap_storage_if_mounted() public void should_remap_storage_if_mounted()
{ {
WithMountPoint(@"O:\mymount".AsOsAgnostic()); GivenMountPoint(@"O:\mymount".AsOsAgnostic());
WithQueue(null); GivenQueue(null);
WithHistory(_completed); GivenHistory(_completed);
var result = Subject.GetItems().Single(); var result = Subject.GetItems().Single();
@ -318,8 +318,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabnzbdTests
{ {
_completed.Items.First().Storage = @"C:\".AsOsAgnostic(); _completed.Items.First().Storage = @"C:\".AsOsAgnostic();
WithQueue(null); GivenQueue(null);
WithHistory(_completed); GivenHistory(_completed);
var result = Subject.GetItems().Single(); var result = Subject.GetItems().Single();
@ -331,8 +331,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabnzbdTests
{ {
_completed.Items.First().Storage = @"C:\sorted\somewhere\asdfasdf\asdfasdf.mkv".AsOsAgnostic(); _completed.Items.First().Storage = @"C:\sorted\somewhere\asdfasdf\asdfasdf.mkv".AsOsAgnostic();
WithQueue(null); GivenQueue(null);
WithHistory(_completed); GivenHistory(_completed);
var result = Subject.GetItems().Single(); var result = Subject.GetItems().Single();
@ -349,7 +349,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabnzbdTests
_config.Misc.complete_dir = completeDir; _config.Misc.complete_dir = completeDir;
_config.Categories.First().Dir = categoryDir; _config.Categories.First().Dir = categoryDir;
WithQueue(null); GivenQueue(null);
var result = Subject.GetStatus(); var result = Subject.GetStatus();
@ -361,9 +361,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabnzbdTests
[Test] [Test]
public void should_return_status_with_mounted_outputdir() public void should_return_status_with_mounted_outputdir()
{ {
WithMountPoint(@"O:\mymount".AsOsAgnostic()); GivenMountPoint(@"O:\mymount".AsOsAgnostic());
WithQueue(null); GivenQueue(null);
var result = Subject.GetStatus(); var result = Subject.GetStatus();

@ -16,7 +16,7 @@ namespace NzbDrone.Core.Test.IndexerTests
[TestCase("845 MB", 886046720)] [TestCase("845 MB", 886046720)]
public void parse_size(string sizeString, long expectedSize) public void parse_size(string sizeString, long expectedSize)
{ {
var result = RssParserBase.ParseSize(sizeString); var result = RssParserBase.ParseSize(sizeString, true);
result.Should().Be(expectedSize); result.Should().Be(expectedSize);
} }

@ -1,9 +1,7 @@
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using FluentValidation.Results; using System.Collections.Generic;
using NLog;
using NzbDrone.Common; using NzbDrone.Common;
using NzbDrone.Common.Disk; using NzbDrone.Common.Disk;
using NzbDrone.Common.Http; using NzbDrone.Common.Http;
@ -13,6 +11,9 @@ using NzbDrone.Core.Organizer;
using NzbDrone.Core.Parser; using NzbDrone.Core.Parser;
using NzbDrone.Core.Parser.Model; using NzbDrone.Core.Parser.Model;
using NzbDrone.Core.MediaFiles; using NzbDrone.Core.MediaFiles;
using NLog;
using Omu.ValueInjecter;
using FluentValidation.Results;
namespace NzbDrone.Core.Download.Clients.UsenetBlackhole namespace NzbDrone.Core.Download.Clients.UsenetBlackhole
{ {
@ -115,6 +116,7 @@ namespace NzbDrone.Core.Download.Clients.UsenetBlackhole
else else
{ {
historyItem.Status = DownloadItemStatus.Completed; historyItem.Status = DownloadItemStatus.Completed;
historyItem.RemainingTime = TimeSpan.Zero;
} }
historyItem.RemoteEpisode = GetRemoteEpisode(historyItem.Title); historyItem.RemoteEpisode = GetRemoteEpisode(historyItem.Title);

@ -106,8 +106,9 @@ namespace NzbDrone.Core.Download
else else
{ {
//TODO: Make this more configurable (ignore failure reasons) to support changes and other failures that should be ignored //TODO: Make this more configurable (ignore failure reasons) to support changes and other failures that should be ignored
if (trackedDownload.DownloadItem.Message.Equals("Unpacking failed, write error or disk is full?", if (!trackedDownload.DownloadItem.Message.IsNullOrWhiteSpace() &&
StringComparison.InvariantCultureIgnoreCase)) trackedDownload.DownloadItem.Message.Equals("Unpacking failed, write error or disk is full?",
StringComparison.InvariantCultureIgnoreCase))
{ {
UpdateStatusMessage(trackedDownload, LogLevel.Error, "Download failed due to lack of disk space, not blacklisting."); UpdateStatusMessage(trackedDownload, LogLevel.Error, "Download failed due to lack of disk space, not blacklisting.");
return; return;

@ -45,7 +45,7 @@ namespace NzbDrone.Core.Indexers.Newznab
return Convert.ToInt64(sizeElement.Attribute("value").Value); return Convert.ToInt64(sizeElement.Attribute("value").Value);
} }
return ParseSize(item.Description()); return ParseSize(item.Description(), true);
} }
public override IEnumerable<ReleaseInfo> Process(string xml, string url) public override IEnumerable<ReleaseInfo> Process(string xml, string url)

@ -23,7 +23,7 @@ namespace NzbDrone.Core.Indexers.Omgwtfnzbs
protected override long GetSize(XElement item) protected override long GetSize(XElement item)
{ {
var sizeString = Regex.Match(item.Description(), @"(?:Size:\<\/b\>\s\d+\.)\d{1,2}\s\w{2}(?:\<br \/\>)", RegexOptions.IgnoreCase | RegexOptions.Compiled).Value; var sizeString = Regex.Match(item.Description(), @"(?:Size:\<\/b\>\s\d+\.)\d{1,2}\s\w{2}(?:\<br \/\>)", RegexOptions.IgnoreCase | RegexOptions.Compiled).Value;
return ParseSize(sizeString); return ParseSize(sizeString, true);
} }
} }
} }

@ -31,7 +31,7 @@ namespace NzbDrone.Core.Indexers
{ {
PreProcess(xml, url); PreProcess(xml, url);
using (var xmlTextReader = XmlReader.Create(new StringReader(xml), new XmlReaderSettings { DtdProcessing = DtdProcessing.Parse, IgnoreComments = true })) using (var xmlTextReader = XmlReader.Create(new StringReader(xml), new XmlReaderSettings { DtdProcessing = DtdProcessing.Ignore, IgnoreComments = true }))
{ {
var document = XDocument.Load(xmlTextReader); var document = XDocument.Load(xmlTextReader);
@ -124,7 +124,7 @@ namespace NzbDrone.Core.Indexers
private static readonly Regex ReportSizeRegex = new Regex(@"(?<value>\d+\.\d{1,2}|\d+\,\d+\.\d{1,2}|\d+)\W?(?<unit>GB|MB|GiB|MiB)", private static readonly Regex ReportSizeRegex = new Regex(@"(?<value>\d+\.\d{1,2}|\d+\,\d+\.\d{1,2}|\d+)\W?(?<unit>GB|MB|GiB|MiB)",
RegexOptions.IgnoreCase | RegexOptions.Compiled); RegexOptions.IgnoreCase | RegexOptions.Compiled);
public static long ParseSize(string sizeString) public static Int64 ParseSize(String sizeString, Boolean defaultToBinaryPrefix)
{ {
var match = ReportSizeRegex.Matches(sizeString); var match = ReportSizeRegex.Matches(sizeString);
@ -133,26 +133,33 @@ namespace NzbDrone.Core.Indexers
var cultureInfo = new CultureInfo("en-US"); var cultureInfo = new CultureInfo("en-US");
var value = Decimal.Parse(Regex.Replace(match[0].Groups["value"].Value, "\\,", ""), cultureInfo); var value = Decimal.Parse(Regex.Replace(match[0].Groups["value"].Value, "\\,", ""), cultureInfo);
var unit = match[0].Groups["unit"].Value; var unit = match[0].Groups["unit"].Value.ToLower();
if (unit.Equals("MB", StringComparison.InvariantCultureIgnoreCase) || switch (unit)
unit.Equals("MiB", StringComparison.InvariantCultureIgnoreCase))
{ {
return ConvertToBytes(Convert.ToDouble(value), 2); case "kb":
} return ConvertToBytes(Convert.ToDouble(value), 1, defaultToBinaryPrefix);
case "mb":
if (unit.Equals("GB", StringComparison.InvariantCultureIgnoreCase) || return ConvertToBytes(Convert.ToDouble(value), 2, defaultToBinaryPrefix);
unit.Equals("GiB", StringComparison.InvariantCultureIgnoreCase)) case "gb":
{ return ConvertToBytes(Convert.ToDouble(value), 3, defaultToBinaryPrefix);
return ConvertToBytes(Convert.ToDouble(value), 3); case "kib":
return ConvertToBytes(Convert.ToDouble(value), 1, true);
case "mib":
return ConvertToBytes(Convert.ToDouble(value), 2, true);
case "gib":
return ConvertToBytes(Convert.ToDouble(value), 3, true);
default:
return (Int64)value;
} }
} }
return 0; return 0;
} }
private static long ConvertToBytes(double value, int power) private static Int64 ConvertToBytes(Double value, Int32 power, Boolean binaryPrefix)
{ {
var multiplier = Math.Pow(1024, power); var prefix = binaryPrefix ? 1024 : 1000;
var multiplier = Math.Pow(prefix, power);
var result = value * multiplier; var result = value * multiplier;
return Convert.ToInt64(result); return Convert.ToInt64(result);

@ -49,6 +49,11 @@ namespace NzbDrone.Core.Rest
{ {
restResponse.ValidateResponse(restClient); restResponse.ValidateResponse(restClient);
if (restResponse.Content != null)
{
Logger.Trace("Response: " + restResponse.Content);
}
return Json.Deserialize<T>(restResponse.Content); return Json.Deserialize<T>(restResponse.Content);
} }

Loading…
Cancel
Save