diff options
author | Morgan Brown <morganbr@users.noreply.github.com> | 2017-05-12 05:24:42 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2017-05-12 16:16:04 +0300 |
commit | 497ab1f7b38175c75aecd8d653b2e512b521babb (patch) | |
tree | 9d51f94e639b3af23c6a80ecb467cbc613fee341 /src | |
parent | a8e4ab5ed59111ed6246c50b61f0717610c23443 (diff) |
Removes unneeded Serializable attributes from enums and delegates. They can be serialized without attributes and this will remove noise from future serialization changes. (#11535)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Diffstat (limited to 'src')
16 files changed, 0 insertions, 17 deletions
diff --git a/src/System.Private.CoreLib/shared/System/AsyncCallback.cs b/src/System.Private.CoreLib/shared/System/AsyncCallback.cs index 5c49535cf..036d44a4b 100644 --- a/src/System.Private.CoreLib/shared/System/AsyncCallback.cs +++ b/src/System.Private.CoreLib/shared/System/AsyncCallback.cs @@ -12,6 +12,5 @@ namespace System { - [Serializable] public delegate void AsyncCallback(IAsyncResult ar); } diff --git a/src/System.Private.CoreLib/shared/System/AttributeTargets.cs b/src/System.Private.CoreLib/shared/System/AttributeTargets.cs index fdfa4ab73..c33d19e85 100644 --- a/src/System.Private.CoreLib/shared/System/AttributeTargets.cs +++ b/src/System.Private.CoreLib/shared/System/AttributeTargets.cs @@ -10,7 +10,6 @@ namespace System // Enum used to indicate all the elements of the // VOS it is valid to attach this element to. [Flags] - [Serializable] public enum AttributeTargets { Assembly = 0x0001, diff --git a/src/System.Private.CoreLib/shared/System/DateTimeKind.cs b/src/System.Private.CoreLib/shared/System/DateTimeKind.cs index 6b5e690df..33c9bd925 100644 --- a/src/System.Private.CoreLib/shared/System/DateTimeKind.cs +++ b/src/System.Private.CoreLib/shared/System/DateTimeKind.cs @@ -7,7 +7,6 @@ namespace System // This enum is used to indentify DateTime instances in cases when they are known to be in local time, // UTC time or if this information has not been specified or is not applicable. - [Serializable] public enum DateTimeKind { Unspecified = 0, diff --git a/src/System.Private.CoreLib/shared/System/DayOfWeek.cs b/src/System.Private.CoreLib/shared/System/DayOfWeek.cs index 5d8425715..f67d10e18 100644 --- a/src/System.Private.CoreLib/shared/System/DayOfWeek.cs +++ b/src/System.Private.CoreLib/shared/System/DayOfWeek.cs @@ -13,7 +13,6 @@ namespace System { - [Serializable] public enum DayOfWeek { Sunday = 0, diff --git a/src/System.Private.CoreLib/shared/System/EventHandler.cs b/src/System.Private.CoreLib/shared/System/EventHandler.cs index e6923cf63..3d1cbfef2 100644 --- a/src/System.Private.CoreLib/shared/System/EventHandler.cs +++ b/src/System.Private.CoreLib/shared/System/EventHandler.cs @@ -6,9 +6,7 @@ using System; namespace System { - [Serializable] public delegate void EventHandler(Object sender, EventArgs e); - [Serializable] public delegate void EventHandler<TEventArgs>(Object sender, TEventArgs e); // Removed TEventArgs constraint post-.NET 4 } diff --git a/src/System.Private.CoreLib/shared/System/Globalization/CalendarWeekRule.cs b/src/System.Private.CoreLib/shared/System/Globalization/CalendarWeekRule.cs index b381b5c54..f683ed05e 100644 --- a/src/System.Private.CoreLib/shared/System/Globalization/CalendarWeekRule.cs +++ b/src/System.Private.CoreLib/shared/System/Globalization/CalendarWeekRule.cs @@ -4,7 +4,6 @@ namespace System.Globalization { - [Serializable] public enum CalendarWeekRule { FirstDay = 0, // Week 1 begins on the first day of the year diff --git a/src/System.Private.CoreLib/shared/System/Globalization/GregorianCalendarTypes.cs b/src/System.Private.CoreLib/shared/System/Globalization/GregorianCalendarTypes.cs index 1b61e5256..46f13b00e 100644 --- a/src/System.Private.CoreLib/shared/System/Globalization/GregorianCalendarTypes.cs +++ b/src/System.Private.CoreLib/shared/System/Globalization/GregorianCalendarTypes.cs @@ -6,7 +6,6 @@ namespace System.Globalization { // Note: The values of the members of this enum must match the coresponding values // in the CalendarId enum (since we cast between GregorianCalendarTypes and CalendarId). - [Serializable] public enum GregorianCalendarTypes { Localized = CalendarId.GREGORIAN, diff --git a/src/System.Private.CoreLib/shared/System/IO/FileAccess.cs b/src/System.Private.CoreLib/shared/System/IO/FileAccess.cs index c6e583b34..1b70bae17 100644 --- a/src/System.Private.CoreLib/shared/System/IO/FileAccess.cs +++ b/src/System.Private.CoreLib/shared/System/IO/FileAccess.cs @@ -9,7 +9,6 @@ namespace System.IO // Contains constants for specifying the access you want for a file. // You can have Read, Write or ReadWrite access. // - [Serializable] [Flags] public enum FileAccess { diff --git a/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CompilationRelaxations.cs b/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CompilationRelaxations.cs index 4da95024c..88e2657a6 100644 --- a/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CompilationRelaxations.cs +++ b/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CompilationRelaxations.cs @@ -6,7 +6,6 @@ namespace System.Runtime.CompilerServices { /// IMPORTANT: Keep this in sync with corhdr.h [Flags] - [Serializable] public enum CompilationRelaxations : int { NoStringInterning = 0x0008 // Start in 0x0008, we had other non public flags in this enum before, diff --git a/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/LoadHint.cs b/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/LoadHint.cs index ae6d9b937..3820f8544 100644 --- a/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/LoadHint.cs +++ b/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/LoadHint.cs @@ -4,7 +4,6 @@ namespace System.Runtime.CompilerServices { - [Serializable] public enum LoadHint { Default = 0x0000, // No preference specified diff --git a/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/MethodCodeType.cs b/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/MethodCodeType.cs index e82993a5d..841b66619 100644 --- a/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/MethodCodeType.cs +++ b/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/MethodCodeType.cs @@ -6,7 +6,6 @@ using System.Reflection; namespace System.Runtime.CompilerServices { - [Serializable] public enum MethodCodeType { IL = MethodImplAttributes.IL, diff --git a/src/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/Cer.cs b/src/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/Cer.cs index c142ec9ec..77ab3ea77 100644 --- a/src/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/Cer.cs +++ b/src/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/Cer.cs @@ -4,7 +4,6 @@ namespace System.Runtime.ConstrainedExecution { - [Serializable] public enum Cer : int { None = 0, diff --git a/src/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/Consistency.cs b/src/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/Consistency.cs index 7ee8480e8..e2cc79ec3 100644 --- a/src/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/Consistency.cs +++ b/src/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/Consistency.cs @@ -4,7 +4,6 @@ namespace System.Runtime.ConstrainedExecution { - [Serializable] public enum Consistency : int { MayCorruptProcess = 0, diff --git a/src/System.Private.CoreLib/shared/System/StringComparison.cs b/src/System.Private.CoreLib/shared/System/StringComparison.cs index 8b4e2ae2f..d5c18c802 100644 --- a/src/System.Private.CoreLib/shared/System/StringComparison.cs +++ b/src/System.Private.CoreLib/shared/System/StringComparison.cs @@ -4,7 +4,6 @@ namespace System { - [Serializable] public enum StringComparison { CurrentCulture = 0, diff --git a/src/System.Private.CoreLib/shared/System/TypeCode.cs b/src/System.Private.CoreLib/shared/System/TypeCode.cs index 293eb1f1a..296198656 100644 --- a/src/System.Private.CoreLib/shared/System/TypeCode.cs +++ b/src/System.Private.CoreLib/shared/System/TypeCode.cs @@ -23,7 +23,6 @@ namespace System { - [Serializable] public enum TypeCode { Empty = 0, // Null reference diff --git a/src/System.Private.CoreLib/shared/System/UnhandledExceptionEventHandler.cs b/src/System.Private.CoreLib/shared/System/UnhandledExceptionEventHandler.cs index b99414c18..14e31c7bb 100644 --- a/src/System.Private.CoreLib/shared/System/UnhandledExceptionEventHandler.cs +++ b/src/System.Private.CoreLib/shared/System/UnhandledExceptionEventHandler.cs @@ -4,6 +4,5 @@ namespace System { - [Serializable] public delegate void UnhandledExceptionEventHandler(Object sender, UnhandledExceptionEventArgs e); } |