diff --git a/src/json-ld.net/Core/Context.cs b/src/json-ld.net/Core/Context.cs index ad69599d..48bd4471 100644 --- a/src/json-ld.net/Core/Context.cs +++ b/src/json-ld.net/Core/Context.cs @@ -14,9 +14,6 @@ namespace JsonLD.Core /// tristan //[System.Serializable] public class Context : JObject -#if !PORTABLE && !IS_CORECLR - , ICloneable -#endif { private JsonLdOptions options; diff --git a/src/json-ld.net/Core/JsonLdApi.cs b/src/json-ld.net/Core/JsonLdApi.cs index 6672070a..6c595f69 100644 --- a/src/json-ld.net/Core/JsonLdApi.cs +++ b/src/json-ld.net/Core/JsonLdApi.cs @@ -2196,7 +2196,6 @@ public virtual RDFDataset ToRDF() /// public virtual object Normalize(RDFDataset dataset) { -#if !PORTABLE // create quads and map bnodes to their associated quads IList quads = new List(); IDictionary> bnodes = new Dictionary>(); @@ -2247,9 +2246,6 @@ public virtual object Normalize(RDFDataset dataset) NormalizeUtils normalizeUtils = new NormalizeUtils(quads, bnodes, new UniqueNamer ("_:c14n"), opts); return normalizeUtils.HashBlankNodes(bnodes.Keys); -#else - throw new PlatformNotSupportedException(); -#endif } } } diff --git a/src/json-ld.net/Core/JsonLdProcessor.cs b/src/json-ld.net/Core/JsonLdProcessor.cs index b77acbb1..5ba2e7b0 100644 --- a/src/json-ld.net/Core/JsonLdProcessor.cs +++ b/src/json-ld.net/Core/JsonLdProcessor.cs @@ -487,24 +487,16 @@ public static object ToRDF(JToken input) /// public static object Normalize(JToken input, JsonLdOptions options) { -#if !PORTABLE JsonLdOptions opts = options.Clone(); opts.format = null; RDFDataset dataset = (RDFDataset)ToRDF(input, opts); return new JsonLdApi(options).Normalize(dataset); -#else - throw new PlatformNotSupportedException(); -#endif } /// public static object Normalize(JToken input) { -#if !PORTABLE return Normalize(input, new JsonLdOptions(string.Empty)); -#else - throw new PlatformNotSupportedException(); -#endif } } } diff --git a/src/json-ld.net/Core/NormalizeUtils.cs b/src/json-ld.net/Core/NormalizeUtils.cs index bf746edc..6d6adce1 100644 --- a/src/json-ld.net/Core/NormalizeUtils.cs +++ b/src/json-ld.net/Core/NormalizeUtils.cs @@ -29,7 +29,6 @@ public NormalizeUtils(IList quads, IDictionary public virtual object HashBlankNodes(IEnumerable unnamed_) { -#if !PORTABLE IList unnamed = new List(unnamed_); IList nextUnnamed = new List(); IDictionary> duplicates = new Dictionary unnamed_) } } } -#else - throw new PlatformNotSupportedException(); -#endif } private sealed class _IComparer_145 : IComparer @@ -245,7 +241,6 @@ private class HashResult /// (err, result) called once the operation completes. private static NormalizeUtils.HashResult HashPaths(string id, IDictionary> bnodes, UniqueNamer namer, UniqueNamer pathNamer) { -#if !PORTABLE MessageDigest md = null; try @@ -460,9 +455,6 @@ private static NormalizeUtils.HashResult HashPaths(string id, IDictionaryHashes all of the quads about a blank node. @@ -500,7 +492,6 @@ private static string HashQuads(string id, IDictionary private static string Sha1hash(ICollection nquads) { -#if !PORTABLE try { // create SHA-1 digest @@ -515,9 +506,6 @@ private static string Sha1hash(ICollection nquads) { throw; } -#else - throw new PlatformNotSupportedException(); -#endif } // TODO: this is something to optimize diff --git a/src/json-ld.net/Util/JavaCompat.cs b/src/json-ld.net/Util/JavaCompat.cs index 90e4c48f..3c6e0102 100644 --- a/src/json-ld.net/Util/JavaCompat.cs +++ b/src/json-ld.net/Util/JavaCompat.cs @@ -6,10 +6,7 @@ using System.Linq; using System.Text; using System.Text.RegularExpressions; - -#if !PORTABLE using System.Security.Cryptography; -#endif namespace JsonLD { @@ -281,13 +278,7 @@ public Matcher Matcher(string str) public string GetPattern() { -#if !PORTABLE && !IS_CORECLR - return this.pattern; -#elif !PORTABLE return _rx; -#else - throw new PlatformNotSupportedException(); -#endif } new public static bool Matches(string val, string rx) @@ -357,7 +348,6 @@ public bool Find() } -#if !PORTABLE internal class MessageDigest : IDisposable { SHA1 md; @@ -392,5 +382,4 @@ public void Dispose() md.Dispose(); } } -#endif } diff --git a/src/json-ld.net/json-ld.net.csproj b/src/json-ld.net/json-ld.net.csproj index 62f84ac8..3fc28a80 100644 --- a/src/json-ld.net/json-ld.net.csproj +++ b/src/json-ld.net/json-ld.net.csproj @@ -5,15 +5,14 @@ Implements the W3C JSON-LD 1.0 standard. 1.0.7 NuGet;linked-data-dotnet - netstandard1.3;netstandard2.0;netcoreapp2.1 + netstandard1.1;netstandard2.0;net40 json-ld.net json-ld.net json-ld;jsonld;json;linked-data;rdf;semantic;web http://json-ld.org/images/json-ld-logo-64.png https://github.com/linked-data-dotnet/json-ld.net/ https://raw.githubusercontent.com/linked-data-dotnet/json-ld.net/master/LICENSE - $(PackageTargetFallback);dnxcore50;portable-net45+win8 - 1.6.0 + $(PackageTargetFallback);dnxcore50;portable-net45+win8 false false false @@ -22,19 +21,12 @@ Implements the W3C JSON-LD 1.0 standard. - - - - - - $(DefineConstants);PORTABLE - - - $(DefineConstants);IS_CORECLR - - - + - + + + + +