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> /// Wikipedia</a>
/// </para> /// </para>
/// </remarks> /// </remarks>
#if !SILVERLIGHT
[Serializable] [Serializable]
#endif
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
public struct Complex32 : IFormattable, IEquatable<Complex32>, IPrecisionSupport<Complex32> 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> /// <summary>
/// Defines the base class for <c>Matrix</c> classes. /// Defines the base class for <c>Matrix</c> classes.
/// </summary> /// </summary>
#if !SILVERLIGHT
[Serializable] [Serializable]
#endif
public abstract partial class Matrix : public abstract partial class Matrix :
#if SILVERLIGHT #if SILVERLIGHT
IFormattable, IEquatable<Matrix> IFormattable, IEquatable<Matrix>

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

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

2
src/Numerics/Permutation.cs

@ -41,9 +41,7 @@ namespace MathNet.Numerics
/// <summary> /// <summary>
/// Class to represent a permutation for a subset of the natural numbers. /// Class to represent a permutation for a subset of the natural numbers.
/// </summary> /// </summary>
#if !SILVERLIGHT
[Serializable] [Serializable]
#endif
public class Permutation public class Permutation
{ {
#region fields #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, /// 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). /// each representing a region limited by a lower bound (exclusive) and an upper bound (inclusive).
/// </summary> /// </summary>
#if !SILVERLIGHT
[Serializable] [Serializable]
#endif
public class Bucket : public class Bucket :
#if SILVERLIGHT #if SILVERLIGHT
IComparable<Bucket> IComparable<Bucket>
@ -225,9 +223,7 @@ namespace MathNet.Numerics.Statistics
/// <summary> /// <summary>
/// A class which computes histograms of data. /// A class which computes histograms of data.
/// </summary> /// </summary>
#if !SILVERLIGHT
[Serializable] [Serializable]
#endif
public class Histogram public class Histogram
{ {
/// <summary> /// <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> <DependentUpon>Version.tt</DependentUpon>
</Compile> </Compile>
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SerializableAttribute.cs" />
<Compile Include="SilverlightUtilities.cs" /> <Compile Include="SilverlightUtilities.cs" />
<Compile Include="Threading\AggregateException.cs" /> <Compile Include="Threading\AggregateException.cs" />
<Compile Include="Threading\Parallel.cs" /> <Compile Include="Threading\Parallel.cs" />

Loading…
Cancel
Save