Skip to content

Commit

Permalink
No more Obsoletes
Browse files Browse the repository at this point in the history
  • Loading branch information
anaisbetts committed Feb 8, 2015
1 parent d835eca commit 98570c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion ModernHttpClient.sln
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ Global
{F7290B9E-C821-4DA7-A4E5-824D9B0F70F2}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = src\Playground.Android\Playground.Android.csproj
Policies = $0
$0.DotNetNamingPolicy = $1
$1.DirectoryNamespaceAssociation = PrefixedHierarchical
Expand Down
6 changes: 3 additions & 3 deletions src/ModernHttpClient/Facades.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ namespace ModernHttpClient
{
public class NativeMessageHandler : HttpClientHandler
{
const string wrongVersion = "You're referencing the Portable version in your App - you need to reference the platform (iOS/Android) version";

/// <summary>
/// Initializes a new instance of the <see
/// cref="ModernHttpClient.Portable.NativeMessageHandler"/> class.
Expand All @@ -35,9 +37,9 @@ public NativeMessageHandler(bool throwOnCaptiveNetwork, bool customSSLVerificati
{
}

[Obsolete("You're using NativeMessageHandler on an unsupported platform or are ref'ing the wrong DLL. This method will do nothing!")]
public void RegisterForProgress(HttpRequestMessage request, ProgressDelegate callback)
{
throw new Exception(wrongVersion);
}
}

Expand Down Expand Up @@ -67,13 +69,11 @@ public class NativeCookieHandler
{
const string wrongVersion = "You're referencing the Portable version in your App - you need to reference the platform (iOS/Android) version";

[Obsolete("You're using NativeCookieHandler on an unsupported platform or are ref'ing the wrong DLL. This method will do nothing!")]
public void SetCookies(Cookie[] cookies)
{
throw new Exception(wrongVersion);
}

[Obsolete("You're using NativeCookieHandler on an unsupported platform or are ref'ing the wrong DLL. This method will do nothing!")]
public Cookie[] GetCookies()
{
throw new Exception(wrongVersion);
Expand Down

0 comments on commit 98570c2

Please sign in to comment.