Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Add .NetStandard Support #261

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions Core/Requests/HangingServiceRequestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ namespace Microsoft.Exchange.WebServices.Data
{
using System;
using System.IO;
using System.IO.Compression;
using System.Net;
using System.Text;
using System.Threading;
using System.Web;
using System.Xml;

#if NETSTANDARD2_0
using System.Net.Http;
#endif

/// <summary>
/// Enumeration of reasons that a hanging request may disconnect.
/// </summary>
Expand Down Expand Up @@ -242,12 +244,21 @@ private void ParseResponses(object state)
this.Disconnect(HangingRequestDisconnectReason.Exception, ex);
return;
}
#if NETSTANDARD2_0
catch (HttpRequestException ex)
{
// Stream is closed, so disconnect.
this.Disconnect(HangingRequestDisconnectReason.Exception, ex);
return;
}
#else
catch (HttpException ex)
{
// Stream is closed, so disconnect.
this.Disconnect(HangingRequestDisconnectReason.Exception, ex);
return;
}
#endif
catch (WebException ex)
{
// Stream is closed, so disconnect.
Expand Down
Loading