From 46d46973aaea3808398730e52959195b90862d54 Mon Sep 17 00:00:00 2001 From: PulsarBlow Date: Mon, 2 Mar 2015 14:08:54 +0100 Subject: [PATCH] Code Analysis fixes Signed-off-by: PulsarBlow --- .../SuperMassive/Exceptions/ValidationFailedException.cs | 2 +- Source/SuperMassive/Types/AscendingSortedGuid.cs | 7 +------ Source/SuperMassive/Types/DescendingSortedGuid.cs | 7 +------ 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/Source/SuperMassive/Exceptions/ValidationFailedException.cs b/Source/SuperMassive/Exceptions/ValidationFailedException.cs index 313e942..0e36e24 100644 --- a/Source/SuperMassive/Exceptions/ValidationFailedException.cs +++ b/Source/SuperMassive/Exceptions/ValidationFailedException.cs @@ -8,7 +8,7 @@ namespace SuperMassive /// /// Define an exception which occurs when any data validation process fails /// - [Serializable] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2240:ImplementISerializableCorrectly"), Serializable] public class ValidationFailedException : Exception { /// diff --git a/Source/SuperMassive/Types/AscendingSortedGuid.cs b/Source/SuperMassive/Types/AscendingSortedGuid.cs index ecaf3a3..da692a5 100644 --- a/Source/SuperMassive/Types/AscendingSortedGuid.cs +++ b/Source/SuperMassive/Types/AscendingSortedGuid.cs @@ -15,12 +15,7 @@ public struct AscendingSortedGuid : IComparable, IComparable /// A read-only instance of the AscendingSortedGuid structure whose value is all zeros. /// - public static readonly AscendingSortedGuid Empty; - - static AscendingSortedGuid() - { - AscendingSortedGuid.Empty = new AscendingSortedGuid(); - } + public static readonly AscendingSortedGuid Empty = new AscendingSortedGuid(); /// /// TimeStamp diff --git a/Source/SuperMassive/Types/DescendingSortedGuid.cs b/Source/SuperMassive/Types/DescendingSortedGuid.cs index 66f35fc..1a028c2 100644 --- a/Source/SuperMassive/Types/DescendingSortedGuid.cs +++ b/Source/SuperMassive/Types/DescendingSortedGuid.cs @@ -12,12 +12,7 @@ public struct DescendingSortedGuid : IComparable, IComparable /// A read-only instance of the AscendingSortedGuidDescendingSortedGuid structure whose value is all zeros. /// - public readonly static DescendingSortedGuid Empty; - - static DescendingSortedGuid() - { - DescendingSortedGuid.Empty = new DescendingSortedGuid(); - } + public readonly static DescendingSortedGuid Empty = new DescendingSortedGuid(); /// /// TimeStamp