diff --git a/src/Numerics/Compatibility.cs b/src/Numerics/Compatibility.cs index 680dd790..a0135350 100644 --- a/src/Numerics/Compatibility.cs +++ b/src/Numerics/Compatibility.cs @@ -1,4 +1,4 @@ -#if PORTABLE || NETSTANDARD1_6 +#if PORTABLE || NETSTANDARD namespace MathNet.Numerics { using System; @@ -139,7 +139,7 @@ namespace MathNet.Numerics } #endif -#if (PORTABLE || NET35 || NETSTANDARD1_6) +#if (PORTABLE || NET35 || NETSTANDARD) namespace MathNet.Numerics { using System; diff --git a/src/Numerics/Complex32.cs b/src/Numerics/Complex32.cs index 804fcd43..10abc015 100644 --- a/src/Numerics/Complex32.cs +++ b/src/Numerics/Complex32.cs @@ -1030,7 +1030,7 @@ namespace MathNet.Numerics } } -#if PORTABLE || NETSTANDARD1_6 +#if PORTABLE || NETSTANDARD var value = GlobalizationHelper.ParseSingle(ref token); #else var value = GlobalizationHelper.ParseSingle(ref token, format.GetCultureInfo()); diff --git a/src/Numerics/ComplexExtensions.cs b/src/Numerics/ComplexExtensions.cs index b2ba2970..1826ba93 100644 --- a/src/Numerics/ComplexExtensions.cs +++ b/src/Numerics/ComplexExtensions.cs @@ -32,7 +32,7 @@ namespace MathNet.Numerics using System; using System.Collections.Generic; -#if !PORTABLE && !NETSTANDARD1_6 +#if !PORTABLE && !NETSTANDARD using System.Runtime; #endif @@ -607,7 +607,7 @@ namespace MathNet.Numerics } } -#if PORTABLE || NETSTANDARD1_6 +#if PORTABLE || NETSTANDARD var value = GlobalizationHelper.ParseDouble(ref token); #else var value = GlobalizationHelper.ParseDouble(ref token, format.GetCultureInfo()); @@ -765,4 +765,4 @@ namespace MathNet.Numerics return Complex32.TryParse(value, formatProvider, out result); } } -} \ No newline at end of file +} diff --git a/src/Numerics/Euclid.cs b/src/Numerics/Euclid.cs index cf3af208..1abe4676 100644 --- a/src/Numerics/Euclid.cs +++ b/src/Numerics/Euclid.cs @@ -430,7 +430,7 @@ namespace MathNet.Numerics while (b != 0) { long rem; -#if PORTABLE || NETSTANDARD1_6 +#if PORTABLE || NETSTANDARD rem = a % b; var quot = a / b; #else diff --git a/src/Numerics/Exceptions.cs b/src/Numerics/Exceptions.cs index 162935de..53544974 100644 --- a/src/Numerics/Exceptions.cs +++ b/src/Numerics/Exceptions.cs @@ -20,7 +20,7 @@ namespace MathNet.Numerics public NonConvergenceException(string message, Exception innerException) : base(message, innerException) { } -#if !PORTABLE && !NETSTANDARD1_6 +#if !PORTABLE && !NETSTANDARD protected NonConvergenceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { @@ -48,7 +48,7 @@ namespace MathNet.Numerics : base(message, innerException) { } -#if !PORTABLE && !NETSTANDARD1_6 +#if !PORTABLE && !NETSTANDARD protected NumericalBreakdownException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { @@ -75,7 +75,7 @@ namespace MathNet.Numerics : base(message, innerException) { } -#if !PORTABLE && !NETSTANDARD1_6 +#if !PORTABLE && !NETSTANDARD protected NativeInterfaceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { @@ -103,7 +103,7 @@ namespace MathNet.Numerics : base(string.Format(Resources.InvalidParameterWithNumber, parameter), innerException) { } -#if !PORTABLE && !NETSTANDARD1_6 +#if !PORTABLE && !NETSTANDARD protected InvalidParameterException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { @@ -126,7 +126,7 @@ namespace MathNet.Numerics : base(Resources.MemoryAllocation, innerException) { } -#if !PORTABLE && !NETSTANDARD1_6 +#if !PORTABLE && !NETSTANDARD protected MemoryAllocationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { @@ -154,7 +154,7 @@ namespace MathNet.Numerics : base(string.Format(Resources.SingularUMatrixWithElement, element), innerException) { } -#if !PORTABLE && !NETSTANDARD1_6 +#if !PORTABLE && !NETSTANDARD protected SingularUMatrixException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { diff --git a/src/Numerics/GlobalizationHelper.cs b/src/Numerics/GlobalizationHelper.cs index b9506ab5..a7a32e45 100644 --- a/src/Numerics/GlobalizationHelper.cs +++ b/src/Numerics/GlobalizationHelper.cs @@ -131,7 +131,7 @@ namespace MathNet.Numerics } } -#if PORTABLE || NETSTANDARD1_6 +#if PORTABLE || NETSTANDARD /// /// Globalized Parsing: Parse a double number /// diff --git a/src/Numerics/LinearAlgebra/Matrix.BCL.cs b/src/Numerics/LinearAlgebra/Matrix.BCL.cs index b8c6bf57..2490512f 100644 --- a/src/Numerics/LinearAlgebra/Matrix.BCL.cs +++ b/src/Numerics/LinearAlgebra/Matrix.BCL.cs @@ -77,7 +77,7 @@ namespace MathNet.Numerics.LinearAlgebra return Storage.GetHashCode(); } -#if !PORTABLE && !NETSTANDARD1_6 +#if !PORTABLE && !NETSTANDARD /// /// Creates a new object that is a copy of the current instance. diff --git a/src/Numerics/LinearAlgebra/Matrix.cs b/src/Numerics/LinearAlgebra/Matrix.cs index e3606f52..11a2d874 100644 --- a/src/Numerics/LinearAlgebra/Matrix.cs +++ b/src/Numerics/LinearAlgebra/Matrix.cs @@ -44,7 +44,7 @@ namespace MathNet.Numerics.LinearAlgebra [Serializable] public abstract partial class Matrix : IFormattable, IEquatable> -#if !PORTABLE && !NETSTANDARD1_6 +#if !PORTABLE && !NETSTANDARD , ICloneable #endif where T : struct, IEquatable, IFormattable diff --git a/src/Numerics/LinearAlgebra/Solvers/SolverSetup.cs b/src/Numerics/LinearAlgebra/Solvers/SolverSetup.cs index 37dc297b..a094040d 100644 --- a/src/Numerics/LinearAlgebra/Solvers/SolverSetup.cs +++ b/src/Numerics/LinearAlgebra/Solvers/SolverSetup.cs @@ -44,7 +44,7 @@ namespace MathNet.Numerics.LinearAlgebra.Solvers /// The types that should not be loaded. public static IEnumerable> LoadFromAssembly(Assembly assembly, bool ignoreFailed = true, params Type[] typesToExclude) { -#if NET45REFLECTION || NETSTANDARD1_6 +#if NET45REFLECTION || NETSTANDARD TypeInfo setupInterfaceType = typeof(IIterativeSolverSetup).GetTypeInfo(); IEnumerable candidates = assembly.DefinedTypes .Where(typeInfo => !typeInfo.IsAbstract && !typeInfo.IsEnum && !typeInfo.IsInterface && typeInfo.IsVisible) @@ -73,7 +73,7 @@ namespace MathNet.Numerics.LinearAlgebra.Solvers } } -#if NET45REFLECTION || NETSTANDARD1_6 +#if NET45REFLECTION || NETSTANDARD var excludedTypes = new List(typesToExclude.Select(type => type.GetTypeInfo())); return setups .Where(s => !excludedTypes.Any(t => t.IsAssignableFrom(s.SolverType.GetTypeInfo()) || t.IsAssignableFrom(s.PreconditionerType.GetTypeInfo()))) @@ -94,7 +94,7 @@ namespace MathNet.Numerics.LinearAlgebra.Solvers /// The types that should not be loaded. public static IEnumerable> LoadFromAssembly(Type typeInAssembly, bool ignoreFailed = true, params Type[] typesToExclude) { -#if NET45REFLECTION || NETSTANDARD1_6 +#if NET45REFLECTION || NETSTANDARD return LoadFromAssembly(typeInAssembly.GetTypeInfo().Assembly, ignoreFailed, typesToExclude); #else return LoadFromAssembly(typeInAssembly.Assembly, ignoreFailed, typesToExclude); @@ -109,7 +109,7 @@ namespace MathNet.Numerics.LinearAlgebra.Solvers /// The types that should not be loaded. public static IEnumerable> LoadFromAssembly(AssemblyName assemblyName, bool ignoreFailed = true, params Type[] typesToExclude) { -#if NET45REFLECTION || NETSTANDARD1_6 +#if NET45REFLECTION || NETSTANDARD return LoadFromAssembly(Assembly.Load(assemblyName), ignoreFailed, typesToExclude); #else return LoadFromAssembly(Assembly.Load(assemblyName.FullName), ignoreFailed, typesToExclude); diff --git a/src/Numerics/LinearAlgebra/Storage/DenseColumnMajorMatrixStorage.cs b/src/Numerics/LinearAlgebra/Storage/DenseColumnMajorMatrixStorage.cs index 6a59cffa..09fe3d66 100644 --- a/src/Numerics/LinearAlgebra/Storage/DenseColumnMajorMatrixStorage.cs +++ b/src/Numerics/LinearAlgebra/Storage/DenseColumnMajorMatrixStorage.cs @@ -115,7 +115,7 @@ namespace MathNet.Numerics.LinearAlgebra.Storage /// void RowColumnAtIndex(int index, out int row, out int column) { -#if PORTABLE || NETSTANDARD1_6 +#if PORTABLE || NETSTANDARD row = index % RowCount; column = index / RowCount; #else diff --git a/src/Numerics/LinearAlgebra/Vector.BCL.cs b/src/Numerics/LinearAlgebra/Vector.BCL.cs index 8e4c1702..c9d917ca 100644 --- a/src/Numerics/LinearAlgebra/Vector.BCL.cs +++ b/src/Numerics/LinearAlgebra/Vector.BCL.cs @@ -77,7 +77,7 @@ namespace MathNet.Numerics.LinearAlgebra return Storage.GetHashCode(); } -#if !PORTABLE && !NETSTANDARD1_6 +#if !PORTABLE && !NETSTANDARD /// /// Creates a new object that is a copy of the current instance. diff --git a/src/Numerics/LinearAlgebra/Vector.cs b/src/Numerics/LinearAlgebra/Vector.cs index acfeed0a..58fff043 100644 --- a/src/Numerics/LinearAlgebra/Vector.cs +++ b/src/Numerics/LinearAlgebra/Vector.cs @@ -43,7 +43,7 @@ namespace MathNet.Numerics.LinearAlgebra [Serializable] public abstract partial class Vector : IFormattable, IEquatable>, IList, IList -#if !PORTABLE && !NETSTANDARD1_6 +#if !PORTABLE && !NETSTANDARD , ICloneable #endif where T : struct, IEquatable, IFormattable diff --git a/src/Numerics/Numerics-2017.csproj b/src/Numerics/Numerics-2017.csproj index 377e9e9b..323f5822 100644 --- a/src/Numerics/Numerics-2017.csproj +++ b/src/Numerics/Numerics-2017.csproj @@ -6,7 +6,7 @@ Math.Numerics - NOSERIALIZATION + NETSTANDARD ..\..\out\test\Net35\ diff --git a/src/Numerics/Properties/AssemblyInfo.cs b/src/Numerics/Properties/AssemblyInfo.cs index 5c497ff1..f480cadf 100644 --- a/src/Numerics/Properties/AssemblyInfo.cs +++ b/src/Numerics/Properties/AssemblyInfo.cs @@ -49,7 +49,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyFileVersion("3.20.0.0")] [assembly: AssemblyInformationalVersion("3.20.0")] -#if PORTABLE || NETSTANDARD1_6 +#if PORTABLE || NETSTANDARD [assembly: AssemblyTitle("Math.NET Numerics - Portable Edition")] [assembly: InternalsVisibleTo("MathNet.Numerics.UnitTests")] diff --git a/src/Numerics/Properties/Resources.Designer.cs b/src/Numerics/Properties/Resources.Designer.cs index 5ad97650..a31c5ef1 100644 --- a/src/Numerics/Properties/Resources.Designer.cs +++ b/src/Numerics/Properties/Resources.Designer.cs @@ -40,7 +40,7 @@ namespace MathNet.Numerics.Properties { [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { -#if NET45REFLECTION || NETSTANDARD1_6 +#if NET45REFLECTION || NETSTANDARD if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MathNet.Numerics.Properties.Resources", typeof(Resources).GetTypeInfo().Assembly); diff --git a/src/Numerics/Statistics/Histogram.cs b/src/Numerics/Statistics/Histogram.cs index 6b603911..c7c51ba5 100644 --- a/src/Numerics/Statistics/Histogram.cs +++ b/src/Numerics/Statistics/Histogram.cs @@ -47,11 +47,9 @@ namespace MathNet.Numerics.Statistics /// [Serializable] [DataContract(Namespace = "urn:MathNet/Numerics")] - public class Bucket : -#if PORTABLE || NETSTANDARD1_6 - IComparable -#else - IComparable, ICloneable + public class Bucket : IComparable +#if !(PORTABLE || NETSTANDARD) + , ICloneable #endif { /// diff --git a/src/Numerics/Threading/CommonParallel.cs b/src/Numerics/Threading/CommonParallel.cs index 4e0885f8..83dfd0cc 100644 --- a/src/Numerics/Threading/CommonParallel.cs +++ b/src/Numerics/Threading/CommonParallel.cs @@ -36,7 +36,7 @@ namespace MathNet.Numerics.Threading #if NET35 using Partitioner = MathNet.Numerics.Partitioner; #endif -#if !PORTABLE && !NETSTANDARD1_6 +#if !PORTABLE && !NETSTANDARD using System.Collections.Concurrent; #endif