Skip to content

Commit

Permalink
Corrected preprocessor macro around [Serializable] attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
alexshtf committed Jan 24, 2018
1 parent b5cdfbf commit 7b85829
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion AutoDiff/Core/AutoDiff/ConstPower.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace AutoDiff
/// <summary>
/// Represents a constant-power function x^n, where n is constant.
/// </summary>
#if DOTNET
#if (!NETSTANDARD1_0 && !NETSTANDARD1_1 && !NETSTANDARD1_2 && !NETSTANDARD1_3 && !NETSTANDARD1_4 && !NETSTANDARD1_5 && !NETSTANDARD1_6)
[Serializable]
#endif
public class ConstPower : Term
Expand Down
2 changes: 1 addition & 1 deletion AutoDiff/Core/AutoDiff/Constant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace AutoDiff
/// <summary>
/// A constant value term
/// </summary>
#if DOTNET
#if (!NETSTANDARD1_0 && !NETSTANDARD1_1 && !NETSTANDARD1_2 && !NETSTANDARD1_3 && !NETSTANDARD1_4 && !NETSTANDARD1_5 && !NETSTANDARD1_6)
[Serializable]
#endif
[DebuggerDisplay("Constant = {" + nameof(Value) + "}")]
Expand Down
2 changes: 1 addition & 1 deletion AutoDiff/Core/AutoDiff/Exp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace AutoDiff
/// <summary>
/// Represents the exponential function <c>e^x</c>
/// </summary>
#if DOTNET
#if (!NETSTANDARD1_0 && !NETSTANDARD1_1 && !NETSTANDARD1_2 && !NETSTANDARD1_3 && !NETSTANDARD1_4 && !NETSTANDARD1_5 && !NETSTANDARD1_6)
[Serializable]
#endif
public class Exp : Term
Expand Down
2 changes: 1 addition & 1 deletion AutoDiff/Core/AutoDiff/Log.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace AutoDiff
/// <summary>
/// Represents a natural logarithm function
/// </summary>
#if DOTNET
#if (!NETSTANDARD1_0 && !NETSTANDARD1_1 && !NETSTANDARD1_2 && !NETSTANDARD1_3 && !NETSTANDARD1_4 && !NETSTANDARD1_5 && !NETSTANDARD1_6)
[Serializable]
#endif
public class Log : Term
Expand Down
2 changes: 1 addition & 1 deletion AutoDiff/Core/AutoDiff/Product.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace AutoDiff
/// <summary>
/// Represents a product between two terms.
/// </summary>
#if DOTNET
#if (!NETSTANDARD1_0 && !NETSTANDARD1_1 && !NETSTANDARD1_2 && !NETSTANDARD1_3 && !NETSTANDARD1_4 && !NETSTANDARD1_5 && !NETSTANDARD1_6)
[Serializable]
#endif
public class Product : Term
Expand Down
3 changes: 3 additions & 0 deletions AutoDiff/Core/AutoDiff/ReadOnlyListWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

namespace AutoDiff
{
#if (!NETSTANDARD1_0 && !NETSTANDARD1_1 && !NETSTANDARD1_2 && !NETSTANDARD1_3 && !NETSTANDARD1_4 && !NETSTANDARD1_5 && !NETSTANDARD1_6)
[Serializable]
#endif
internal class ReadOnlyListWrapper<T> : IReadOnlyList<T>
{
private readonly IReadOnlyList<T> list;
Expand Down
2 changes: 1 addition & 1 deletion AutoDiff/Core/AutoDiff/Sum.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace AutoDiff
/// <summary>
/// Represents a sum of at least two terms.
/// </summary>
#if DOTNET
#if (!NETSTANDARD1_0 && !NETSTANDARD1_1 && !NETSTANDARD1_2 && !NETSTANDARD1_3 && !NETSTANDARD1_4 && !NETSTANDARD1_5 && !NETSTANDARD1_6)
[Serializable]
#endif
[DebuggerDisplay("Sum: {Terms.Count}")]
Expand Down
2 changes: 1 addition & 1 deletion AutoDiff/Core/AutoDiff/TVec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace AutoDiff
/// <summary>
/// A column vector made of terms.
/// </summary>
#if DOTNET
#if (!NETSTANDARD1_0 && !NETSTANDARD1_1 && !NETSTANDARD1_2 && !NETSTANDARD1_3 && !NETSTANDARD1_4 && !NETSTANDARD1_5 && !NETSTANDARD1_6)
[Serializable]
#endif
public class TVec
Expand Down
2 changes: 1 addition & 1 deletion AutoDiff/Core/AutoDiff/Term.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace AutoDiff
/// <summary>
/// Base class for all automatically-differentiable terms.
/// </summary>
#if DOTNET
#if (!NETSTANDARD1_0 && !NETSTANDARD1_1 && !NETSTANDARD1_2 && !NETSTANDARD1_3 && !NETSTANDARD1_4 && !NETSTANDARD1_5 && !NETSTANDARD1_6)
[Serializable]
#endif
public abstract class Term
Expand Down
2 changes: 1 addition & 1 deletion AutoDiff/Core/AutoDiff/Variable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace AutoDiff
/// Represents a variable term. Variable terms are substituted for real values during evaluation and
/// differentiation.
/// </summary>
#if DOTNET
#if (!NETSTANDARD1_0 && !NETSTANDARD1_1 && !NETSTANDARD1_2 && !NETSTANDARD1_3 && !NETSTANDARD1_4 && !NETSTANDARD1_5 && !NETSTANDARD1_6)
[Serializable]
#endif

Expand Down
2 changes: 1 addition & 1 deletion AutoDiff/Core/AutoDiff/Zero.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace AutoDiff
/// <summary>
/// A constant zero term. Similar to <see cref="Constant"/> but represents only the value 0.
/// </summary>
#if DOTNET
#if (!NETSTANDARD1_0 && !NETSTANDARD1_1 && !NETSTANDARD1_2 && !NETSTANDARD1_3 && !NETSTANDARD1_4 && !NETSTANDARD1_5 && !NETSTANDARD1_6)
[Serializable]
#endif
public class Zero : Term
Expand Down

0 comments on commit 7b85829

Please sign in to comment.