diff options
Diffstat (limited to 'src/mscorlib/shared/System/Runtime')
23 files changed, 23 insertions, 22 deletions
diff --git a/src/mscorlib/shared/System/Runtime/CompilerServices/AsyncStateMachineAttribute.cs b/src/mscorlib/shared/System/Runtime/CompilerServices/AsyncStateMachineAttribute.cs index 198ed3d0e7..66c9175ee7 100644 --- a/src/mscorlib/shared/System/Runtime/CompilerServices/AsyncStateMachineAttribute.cs +++ b/src/mscorlib/shared/System/Runtime/CompilerServices/AsyncStateMachineAttribute.cs @@ -4,7 +4,6 @@ namespace System.Runtime.CompilerServices { - [Serializable] [AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)] public sealed class AsyncStateMachineAttribute : StateMachineAttribute { diff --git a/src/mscorlib/shared/System/Runtime/CompilerServices/CompilationRelaxations.cs b/src/mscorlib/shared/System/Runtime/CompilerServices/CompilationRelaxations.cs index 4da95024c5..88e2657a6a 100644 --- a/src/mscorlib/shared/System/Runtime/CompilerServices/CompilationRelaxations.cs +++ b/src/mscorlib/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/mscorlib/shared/System/Runtime/CompilerServices/CompilationRelaxationsAttribute.cs b/src/mscorlib/shared/System/Runtime/CompilerServices/CompilationRelaxationsAttribute.cs index 1f100bd415..d6da23fdf2 100644 --- a/src/mscorlib/shared/System/Runtime/CompilerServices/CompilationRelaxationsAttribute.cs +++ b/src/mscorlib/shared/System/Runtime/CompilerServices/CompilationRelaxationsAttribute.cs @@ -4,7 +4,6 @@ namespace System.Runtime.CompilerServices { - [Serializable] [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Method)] public class CompilationRelaxationsAttribute : Attribute { diff --git a/src/mscorlib/shared/System/Runtime/CompilerServices/CompilerGeneratedAttribute.cs b/src/mscorlib/shared/System/Runtime/CompilerServices/CompilerGeneratedAttribute.cs index 3da2a95aeb..1c05abd1fe 100644 --- a/src/mscorlib/shared/System/Runtime/CompilerServices/CompilerGeneratedAttribute.cs +++ b/src/mscorlib/shared/System/Runtime/CompilerServices/CompilerGeneratedAttribute.cs @@ -4,7 +4,6 @@ namespace System.Runtime.CompilerServices { - [Serializable] [AttributeUsage(AttributeTargets.All, Inherited = true)] public sealed class CompilerGeneratedAttribute : Attribute { diff --git a/src/mscorlib/shared/System/Runtime/CompilerServices/CompilerGlobalScopeAttribute.cs b/src/mscorlib/shared/System/Runtime/CompilerServices/CompilerGlobalScopeAttribute.cs index 22fa694200..752295e876 100644 --- a/src/mscorlib/shared/System/Runtime/CompilerServices/CompilerGlobalScopeAttribute.cs +++ b/src/mscorlib/shared/System/Runtime/CompilerServices/CompilerGlobalScopeAttribute.cs @@ -6,7 +6,6 @@ namespace System.Runtime.CompilerServices { // Attribute used to communicate to the VS7 debugger that a class should be treated as if it has global scope. - [Serializable] [AttributeUsage(AttributeTargets.Class)] public class CompilerGlobalScopeAttribute : Attribute { diff --git a/src/mscorlib/shared/System/Runtime/CompilerServices/DefaultDependencyAttribute.cs b/src/mscorlib/shared/System/Runtime/CompilerServices/DefaultDependencyAttribute.cs index f5419d413b..4c1f489215 100644 --- a/src/mscorlib/shared/System/Runtime/CompilerServices/DefaultDependencyAttribute.cs +++ b/src/mscorlib/shared/System/Runtime/CompilerServices/DefaultDependencyAttribute.cs @@ -4,7 +4,6 @@ namespace System.Runtime.CompilerServices { - [Serializable] [AttributeUsage(AttributeTargets.Assembly)] public sealed class DefaultDependencyAttribute : Attribute { diff --git a/src/mscorlib/shared/System/Runtime/CompilerServices/DependencyAttribute.cs b/src/mscorlib/shared/System/Runtime/CompilerServices/DependencyAttribute.cs index 56f4242bb1..0fe07edc9e 100644 --- a/src/mscorlib/shared/System/Runtime/CompilerServices/DependencyAttribute.cs +++ b/src/mscorlib/shared/System/Runtime/CompilerServices/DependencyAttribute.cs @@ -4,7 +4,6 @@ namespace System.Runtime.CompilerServices { - [Serializable] [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] public sealed class DependencyAttribute : Attribute { diff --git a/src/mscorlib/shared/System/Runtime/CompilerServices/FixedAddressValueTypeAttribute.cs b/src/mscorlib/shared/System/Runtime/CompilerServices/FixedAddressValueTypeAttribute.cs index baf5824241..8dc6c43126 100644 --- a/src/mscorlib/shared/System/Runtime/CompilerServices/FixedAddressValueTypeAttribute.cs +++ b/src/mscorlib/shared/System/Runtime/CompilerServices/FixedAddressValueTypeAttribute.cs @@ -4,7 +4,6 @@ namespace System.Runtime.CompilerServices { - [Serializable] [AttributeUsage(AttributeTargets.Field)] public sealed class FixedAddressValueTypeAttribute : Attribute { diff --git a/src/mscorlib/shared/System/Runtime/CompilerServices/IndexerNameAttribute.cs b/src/mscorlib/shared/System/Runtime/CompilerServices/IndexerNameAttribute.cs index 65653a44d9..ea843b3daa 100644 --- a/src/mscorlib/shared/System/Runtime/CompilerServices/IndexerNameAttribute.cs +++ b/src/mscorlib/shared/System/Runtime/CompilerServices/IndexerNameAttribute.cs @@ -4,7 +4,6 @@ namespace System.Runtime.CompilerServices { - [Serializable] [AttributeUsage(AttributeTargets.Property, Inherited = true)] public sealed class IndexerNameAttribute : Attribute { diff --git a/src/mscorlib/shared/System/Runtime/CompilerServices/IsByRefLikeAttribute.cs b/src/mscorlib/shared/System/Runtime/CompilerServices/IsByRefLikeAttribute.cs new file mode 100644 index 0000000000..90e49d2a42 --- /dev/null +++ b/src/mscorlib/shared/System/Runtime/CompilerServices/IsByRefLikeAttribute.cs @@ -0,0 +1,21 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.ComponentModel; + +namespace System.Runtime.CompilerServices +{ + /// <summary> + /// Reserved to be used by the compiler for tracking metadata. + /// This attribute should not be used by developers in source code. + /// </summary> + [EditorBrowsable(EditorBrowsableState.Never)] + [AttributeUsage(AttributeTargets.Struct)] + public sealed class IsByRefLikeAttribute : Attribute + { + public IsByRefLikeAttribute() + { + } + } +} diff --git a/src/mscorlib/shared/System/Runtime/CompilerServices/IteratorStateMachineAttribute.cs b/src/mscorlib/shared/System/Runtime/CompilerServices/IteratorStateMachineAttribute.cs index 5ac3918028..53afc95664 100644 --- a/src/mscorlib/shared/System/Runtime/CompilerServices/IteratorStateMachineAttribute.cs +++ b/src/mscorlib/shared/System/Runtime/CompilerServices/IteratorStateMachineAttribute.cs @@ -4,7 +4,6 @@ namespace System.Runtime.CompilerServices { - [Serializable] [AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)] public sealed class IteratorStateMachineAttribute : StateMachineAttribute { diff --git a/src/mscorlib/shared/System/Runtime/CompilerServices/LoadHint.cs b/src/mscorlib/shared/System/Runtime/CompilerServices/LoadHint.cs index ae6d9b9372..3820f8544b 100644 --- a/src/mscorlib/shared/System/Runtime/CompilerServices/LoadHint.cs +++ b/src/mscorlib/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/mscorlib/shared/System/Runtime/CompilerServices/MethodCodeType.cs b/src/mscorlib/shared/System/Runtime/CompilerServices/MethodCodeType.cs index e82993a5de..841b666198 100644 --- a/src/mscorlib/shared/System/Runtime/CompilerServices/MethodCodeType.cs +++ b/src/mscorlib/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/mscorlib/shared/System/Runtime/CompilerServices/ReferenceAssemblyAttribute.cs b/src/mscorlib/shared/System/Runtime/CompilerServices/ReferenceAssemblyAttribute.cs index 6e307e72af..f3842ec562 100644 --- a/src/mscorlib/shared/System/Runtime/CompilerServices/ReferenceAssemblyAttribute.cs +++ b/src/mscorlib/shared/System/Runtime/CompilerServices/ReferenceAssemblyAttribute.cs @@ -15,7 +15,6 @@ namespace System.Runtime.CompilerServices { - [Serializable] [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)] public sealed class ReferenceAssemblyAttribute : Attribute { diff --git a/src/mscorlib/shared/System/Runtime/CompilerServices/RuntimeCompatibilityAttribute.cs b/src/mscorlib/shared/System/Runtime/CompilerServices/RuntimeCompatibilityAttribute.cs index 55dba0d113..609c560330 100644 --- a/src/mscorlib/shared/System/Runtime/CompilerServices/RuntimeCompatibilityAttribute.cs +++ b/src/mscorlib/shared/System/Runtime/CompilerServices/RuntimeCompatibilityAttribute.cs @@ -13,7 +13,6 @@ namespace System.Runtime.CompilerServices { - [Serializable] [AttributeUsage(AttributeTargets.Assembly, Inherited = false, AllowMultiple = false)] public sealed class RuntimeCompatibilityAttribute : Attribute { diff --git a/src/mscorlib/shared/System/Runtime/CompilerServices/StateMachineAttribute.cs b/src/mscorlib/shared/System/Runtime/CompilerServices/StateMachineAttribute.cs index 94ed5b5c74..e081d63e71 100644 --- a/src/mscorlib/shared/System/Runtime/CompilerServices/StateMachineAttribute.cs +++ b/src/mscorlib/shared/System/Runtime/CompilerServices/StateMachineAttribute.cs @@ -6,7 +6,6 @@ using System; namespace System.Runtime.CompilerServices { - [Serializable] [AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)] public class StateMachineAttribute : Attribute { diff --git a/src/mscorlib/shared/System/Runtime/CompilerServices/StringFreezingAttribute.cs b/src/mscorlib/shared/System/Runtime/CompilerServices/StringFreezingAttribute.cs index 7772a1a263..25a8bfbc26 100644 --- a/src/mscorlib/shared/System/Runtime/CompilerServices/StringFreezingAttribute.cs +++ b/src/mscorlib/shared/System/Runtime/CompilerServices/StringFreezingAttribute.cs @@ -6,7 +6,6 @@ namespace System.Runtime.CompilerServices { // Custom attribute to indicate that strings should be frozen. - [Serializable] [AttributeUsage(AttributeTargets.Assembly, Inherited = false)] public sealed class StringFreezingAttribute : Attribute { diff --git a/src/mscorlib/shared/System/Runtime/CompilerServices/UnsafeValueTypeAttribute.cs b/src/mscorlib/shared/System/Runtime/CompilerServices/UnsafeValueTypeAttribute.cs index 162676efe8..f049c89b3f 100644 --- a/src/mscorlib/shared/System/Runtime/CompilerServices/UnsafeValueTypeAttribute.cs +++ b/src/mscorlib/shared/System/Runtime/CompilerServices/UnsafeValueTypeAttribute.cs @@ -4,7 +4,6 @@ namespace System.Runtime.CompilerServices { - [Serializable] [AttributeUsage(AttributeTargets.Struct)] sealed public class UnsafeValueTypeAttribute : Attribute { diff --git a/src/mscorlib/shared/System/Runtime/ConstrainedExecution/Cer.cs b/src/mscorlib/shared/System/Runtime/ConstrainedExecution/Cer.cs index c142ec9ecc..77ab3ea770 100644 --- a/src/mscorlib/shared/System/Runtime/ConstrainedExecution/Cer.cs +++ b/src/mscorlib/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/mscorlib/shared/System/Runtime/ConstrainedExecution/Consistency.cs b/src/mscorlib/shared/System/Runtime/ConstrainedExecution/Consistency.cs index 7ee8480e89..e2cc79ec35 100644 --- a/src/mscorlib/shared/System/Runtime/ConstrainedExecution/Consistency.cs +++ b/src/mscorlib/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/mscorlib/shared/System/Runtime/InteropServices/ExternalException.cs b/src/mscorlib/shared/System/Runtime/InteropServices/ExternalException.cs index d7bde79c43..81b9a46928 100644 --- a/src/mscorlib/shared/System/Runtime/InteropServices/ExternalException.cs +++ b/src/mscorlib/shared/System/Runtime/InteropServices/ExternalException.cs @@ -21,7 +21,6 @@ namespace System.Runtime.InteropServices // Base exception for COM Interop errors &; Structured Exception Handler // exceptions. // - [Serializable] public class ExternalException : SystemException { public ExternalException() @@ -51,6 +50,7 @@ namespace System.Runtime.InteropServices protected ExternalException(SerializationInfo info, StreamingContext context) : base(info, context) { + throw new PlatformNotSupportedException(); } public virtual int ErrorCode diff --git a/src/mscorlib/shared/System/Runtime/Serialization/SerializationException.cs b/src/mscorlib/shared/System/Runtime/Serialization/SerializationException.cs index a359daf4f9..bfe3313659 100644 --- a/src/mscorlib/shared/System/Runtime/Serialization/SerializationException.cs +++ b/src/mscorlib/shared/System/Runtime/Serialization/SerializationException.cs @@ -6,7 +6,6 @@ using System.Runtime.Serialization; namespace System.Runtime.Serialization { - [Serializable] public class SerializationException : SystemException { private static String s_nullMessage = SR.SerializationException; @@ -34,6 +33,7 @@ namespace System.Runtime.Serialization protected SerializationException(SerializationInfo info, StreamingContext context) : base(info, context) { + throw new PlatformNotSupportedException(); } } } diff --git a/src/mscorlib/shared/System/Runtime/Serialization/StreamingContext.cs b/src/mscorlib/shared/System/Runtime/Serialization/StreamingContext.cs index 1026a87d1e..4fe90cad8d 100644 --- a/src/mscorlib/shared/System/Runtime/Serialization/StreamingContext.cs +++ b/src/mscorlib/shared/System/Runtime/Serialization/StreamingContext.cs @@ -4,7 +4,6 @@ namespace System.Runtime.Serialization { - [Serializable] public struct StreamingContext { private readonly object _additionalContext; |