Update NSUrlSessionHandler to handle nint StatusCode

This commit is contained in:
Paul Betts 2014-09-14 13:23:32 -07:00
Родитель 796a106b1a
Коммит 5b25fc5b56
1 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -2,7 +2,6 @@ using System;
using System.Net.Http;
using System.Threading.Tasks;
using System.Threading;
using MonoTouch.Foundation;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@ -11,6 +10,12 @@ using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
using System.Text.RegularExpressions;
#if UNIFIED
using Foundation;
#else
using MonoTouch.Foundation;
#endif
namespace ModernHttpClient
{
class InflightOperation
@ -149,7 +154,9 @@ namespace ModernHttpClient
content.Progress = data.Progress;
var ret = new HttpResponseMessage((HttpStatusCode)resp.StatusCode) {
// NB: The double cast is because of a Xamarin compiler bug
int status = (int)resp.StatusCode;
var ret = new HttpResponseMessage((HttpStatusCode)status) {
Content = content,
RequestMessage = data.Request,
};