Browse Source

simplify silverlight support for the Serializable attribute

la-knuth
Christoph Ruegg 17 years ago
parent
commit
aa971b484c
  1. 2
      src/Numerics/Complex32.cs
  2. 2
      src/Numerics/LinearAlgebra/Double/Matrix.cs
  3. 2
      src/Numerics/LinearAlgebra/Double/Vector.cs
  4. 2
      src/Numerics/Permutation.cs
  5. 4
      src/Numerics/Statistics/Histogram.cs
  6. 9
      src/Silverlight/SerializableAttribute.cs
  7. 1
      src/Silverlight/Silverlight.csproj

2
src/Numerics/Complex32.cs

@ -71,9 +71,7 @@ namespace MathNet.Numerics
/// Wikipedia</a>
/// </para>
/// </remarks>
#if !SILVERLIGHT
[Serializable]
#endif
[StructLayout(LayoutKind.Sequential)]
public struct Complex32 : IFormattable, IEquatable<Complex32>, IPrecisionSupport<Complex32>
{

2
src/Numerics/LinearAlgebra/Double/Matrix.cs

@ -35,9 +35,7 @@ namespace MathNet.Numerics.LinearAlgebra.Double
/// <summary>
/// Defines the base class for <c>Matrix</c> classes.
/// </summary>
#if !SILVERLIGHT
[Serializable]
#endif
public abstract partial class Matrix :
#if SILVERLIGHT
IFormattable, IEquatable<Matrix>

2
src/Numerics/LinearAlgebra/Double/Vector.cs

@ -37,9 +37,7 @@ namespace MathNet.Numerics.LinearAlgebra.Double
/// <summary>
/// Defines the base class for <c>Vector</c> classes.
/// </summary>
#if !SILVERLIGHT
[Serializable]
#endif
public abstract class Vector :
#if SILVERLIGHT
IFormattable, IEnumerable<double>, IEquatable<Vector>

2
src/Numerics/Permutation.cs

@ -41,9 +41,7 @@ namespace MathNet.Numerics
/// <summary>
/// Class to represent a permutation for a subset of the natural numbers.
/// </summary>
#if !SILVERLIGHT
[Serializable]
#endif
public class Permutation
{
#region fields

4
src/Numerics/Statistics/Histogram.cs

@ -39,9 +39,7 @@ namespace MathNet.Numerics.Statistics
/// A <see cref="Histogram"/> consists of a series of <see cref="Bucket"/>s,
/// each representing a region limited by a lower bound (exclusive) and an upper bound (inclusive).
/// </summary>
#if !SILVERLIGHT
[Serializable]
#endif
public class Bucket :
#if SILVERLIGHT
IComparable<Bucket>
@ -225,9 +223,7 @@ namespace MathNet.Numerics.Statistics
/// <summary>
/// A class which computes histograms of data.
/// </summary>
#if !SILVERLIGHT
[Serializable]
#endif
public class Histogram
{
/// <summary>

9
src/Silverlight/SerializableAttribute.cs

@ -0,0 +1,9 @@
using System;
namespace MathNet.Numerics
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
public class SerializableAttribute : Attribute
{
}
}

1
src/Silverlight/Silverlight.csproj

@ -360,6 +360,7 @@
<DependentUpon>Version.tt</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SerializableAttribute.cs" />
<Compile Include="SilverlightUtilities.cs" />
<Compile Include="Threading\AggregateException.cs" />
<Compile Include="Threading\Parallel.cs" />

Loading…
Cancel
Save