From 9995b33cb9f4e551879c94a1061fd5325f8d99e7 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Mon, 28 Apr 2014 07:38:29 -0500 Subject: [PATCH] Simplify the handling of OperationCanceledException in net35-cf library --- .../Antlr4.Runtime/Misc/ParseCanceledException.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/runtime/CSharp/Antlr4.Runtime/Misc/ParseCanceledException.cs b/runtime/CSharp/Antlr4.Runtime/Misc/ParseCanceledException.cs index 511fcf839..1b9ea218a 100644 --- a/runtime/CSharp/Antlr4.Runtime/Misc/ParseCanceledException.cs +++ b/runtime/CSharp/Antlr4.Runtime/Misc/ParseCanceledException.cs @@ -30,6 +30,10 @@ using System; using Antlr4.Runtime.Sharpen; +#if COMPACT +using OperationCanceledException = System.Exception; +#endif + namespace Antlr4.Runtime.Misc { /// This exception is thrown to cancel a parsing operation. @@ -47,12 +51,7 @@ namespace Antlr4.Runtime.Misc #if !PORTABLE [System.Serializable] #endif - public class ParseCanceledException -#if COMPACT - : Exception -#else - : OperationCanceledException -#endif + public class ParseCanceledException : OperationCanceledException { public ParseCanceledException() {