diff options
Diffstat (limited to 'src/mscorlib/src/System/Reflection/Emit')
21 files changed, 10 insertions, 18 deletions
diff --git a/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilderAccess.cs b/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilderAccess.cs index ead2fafcef..b096960406 100644 --- a/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilderAccess.cs +++ b/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilderAccess.cs @@ -9,7 +9,6 @@ using System; namespace System.Reflection.Emit { - [Serializable] [Flags] public enum AssemblyBuilderAccess { diff --git a/src/mscorlib/src/System/Reflection/Emit/EnumBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/EnumBuilder.cs index 55aa5c5a8f..a36882b036 100644 --- a/src/mscorlib/src/System/Reflection/Emit/EnumBuilder.cs +++ b/src/mscorlib/src/System/Reflection/Emit/EnumBuilder.cs @@ -242,6 +242,8 @@ namespace System.Reflection.Emit return m_typeBuilder.Attributes; } + public override bool IsTypeDefinition => true; + public override bool IsSZArray => false; protected override bool IsArrayImpl() diff --git a/src/mscorlib/src/System/Reflection/Emit/EventToken.cs b/src/mscorlib/src/System/Reflection/Emit/EventToken.cs index 18ec630b5f..e44dc3d0ce 100644 --- a/src/mscorlib/src/System/Reflection/Emit/EventToken.cs +++ b/src/mscorlib/src/System/Reflection/Emit/EventToken.cs @@ -18,7 +18,6 @@ using System.Reflection; namespace System.Reflection.Emit { - [Serializable] public struct EventToken { public static readonly EventToken Empty = new EventToken(); diff --git a/src/mscorlib/src/System/Reflection/Emit/FieldToken.cs b/src/mscorlib/src/System/Reflection/Emit/FieldToken.cs index 6c5d778d8f..c7450ca301 100644 --- a/src/mscorlib/src/System/Reflection/Emit/FieldToken.cs +++ b/src/mscorlib/src/System/Reflection/Emit/FieldToken.cs @@ -22,7 +22,6 @@ namespace System.Reflection.Emit // by the Metadata to represent the field. FieldTokens are generated by // Module.GetFieldToken(). There are no meaningful accessors on this class, // but it can be passed to ILGenerator which understands it's internals. - [Serializable] public struct FieldToken { public static readonly FieldToken Empty = new FieldToken(); diff --git a/src/mscorlib/src/System/Reflection/Emit/FlowControl.cs b/src/mscorlib/src/System/Reflection/Emit/FlowControl.cs index fb8564652f..531d229a5c 100644 --- a/src/mscorlib/src/System/Reflection/Emit/FlowControl.cs +++ b/src/mscorlib/src/System/Reflection/Emit/FlowControl.cs @@ -16,7 +16,6 @@ using System; namespace System.Reflection.Emit { - [Serializable] public enum FlowControl { Branch = 0, diff --git a/src/mscorlib/src/System/Reflection/Emit/GenericTypeParameterBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/GenericTypeParameterBuilder.cs index dd5ffa92a9..75e4acc903 100644 --- a/src/mscorlib/src/System/Reflection/Emit/GenericTypeParameterBuilder.cs +++ b/src/mscorlib/src/System/Reflection/Emit/GenericTypeParameterBuilder.cs @@ -154,6 +154,8 @@ namespace System.Reflection.Emit protected override TypeAttributes GetAttributeFlagsImpl() { return TypeAttributes.Public; } + public override bool IsTypeDefinition => false; + public override bool IsSZArray => false; protected override bool IsArrayImpl() { return false; } diff --git a/src/mscorlib/src/System/Reflection/Emit/ILGenerator.cs b/src/mscorlib/src/System/Reflection/Emit/ILGenerator.cs index 4021410a33..fa31d66f6c 100644 --- a/src/mscorlib/src/System/Reflection/Emit/ILGenerator.cs +++ b/src/mscorlib/src/System/Reflection/Emit/ILGenerator.cs @@ -1605,7 +1605,6 @@ namespace System.Reflection.Emit * takes place. * ***************************/ - [Serializable] internal enum ScopeAction { Open = 0x0, diff --git a/src/mscorlib/src/System/Reflection/Emit/Label.cs b/src/mscorlib/src/System/Reflection/Emit/Label.cs index f6315a67d2..d67c0e6a19 100644 --- a/src/mscorlib/src/System/Reflection/Emit/Label.cs +++ b/src/mscorlib/src/System/Reflection/Emit/Label.cs @@ -26,7 +26,6 @@ namespace System.Reflection.Emit // is passed to the MethodWriter. // Labels are created by using ILGenerator.CreateLabel and their position is set // by using ILGenerator.MarkLabel. - [Serializable] public struct Label { internal int m_label; diff --git a/src/mscorlib/src/System/Reflection/Emit/MethodToken.cs b/src/mscorlib/src/System/Reflection/Emit/MethodToken.cs index 0905ac922a..9698b07333 100644 --- a/src/mscorlib/src/System/Reflection/Emit/MethodToken.cs +++ b/src/mscorlib/src/System/Reflection/Emit/MethodToken.cs @@ -18,7 +18,6 @@ using System.Reflection; namespace System.Reflection.Emit { - [Serializable] public struct MethodToken { public static readonly MethodToken Empty = new MethodToken(); diff --git a/src/mscorlib/src/System/Reflection/Emit/ModuleBuilderData.cs b/src/mscorlib/src/System/Reflection/Emit/ModuleBuilderData.cs index 4f1b8eb713..4a9b774d15 100644 --- a/src/mscorlib/src/System/Reflection/Emit/ModuleBuilderData.cs +++ b/src/mscorlib/src/System/Reflection/Emit/ModuleBuilderData.cs @@ -19,7 +19,6 @@ namespace System.Reflection.Emit // This is a package private class. This class hold all of the managed // data member for ModuleBuilder. Note that what ever data members added to // this class cannot be accessed from the EE. - [Serializable] internal class ModuleBuilderData { internal ModuleBuilderData(ModuleBuilder module, String strModuleName, String strFileName, int tkFile) diff --git a/src/mscorlib/src/System/Reflection/Emit/OpcodeType.cs b/src/mscorlib/src/System/Reflection/Emit/OpcodeType.cs index 2363d607fc..db7fa2f209 100644 --- a/src/mscorlib/src/System/Reflection/Emit/OpcodeType.cs +++ b/src/mscorlib/src/System/Reflection/Emit/OpcodeType.cs @@ -17,7 +17,6 @@ using System; namespace System.Reflection.Emit { - [Serializable] public enum OpCodeType { [Obsolete("This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")] diff --git a/src/mscorlib/src/System/Reflection/Emit/OperandType.cs b/src/mscorlib/src/System/Reflection/Emit/OperandType.cs index 033539b999..db113b1725 100644 --- a/src/mscorlib/src/System/Reflection/Emit/OperandType.cs +++ b/src/mscorlib/src/System/Reflection/Emit/OperandType.cs @@ -17,7 +17,6 @@ using System; namespace System.Reflection.Emit { - [Serializable] public enum OperandType { InlineBrTarget = 0, diff --git a/src/mscorlib/src/System/Reflection/Emit/PEFileKinds.cs b/src/mscorlib/src/System/Reflection/Emit/PEFileKinds.cs index f9246fce6d..f6606c477a 100644 --- a/src/mscorlib/src/System/Reflection/Emit/PEFileKinds.cs +++ b/src/mscorlib/src/System/Reflection/Emit/PEFileKinds.cs @@ -8,7 +8,6 @@ using System; namespace System.Reflection.Emit { // This Enum matchs the CorFieldAttr defined in CorHdr.h - [Serializable] public enum PEFileKinds { Dll = 0x0001, diff --git a/src/mscorlib/src/System/Reflection/Emit/ParameterToken.cs b/src/mscorlib/src/System/Reflection/Emit/ParameterToken.cs index 42f85af464..067bc2d010 100644 --- a/src/mscorlib/src/System/Reflection/Emit/ParameterToken.cs +++ b/src/mscorlib/src/System/Reflection/Emit/ParameterToken.cs @@ -20,7 +20,6 @@ namespace System.Reflection.Emit { // The ParameterToken class is an opaque representation of the Token returned // by the Metadata to represent the parameter. - [Serializable] public struct ParameterToken { public static readonly ParameterToken Empty = new ParameterToken(); diff --git a/src/mscorlib/src/System/Reflection/Emit/PropertyToken.cs b/src/mscorlib/src/System/Reflection/Emit/PropertyToken.cs index b450b198d2..02f34881f4 100644 --- a/src/mscorlib/src/System/Reflection/Emit/PropertyToken.cs +++ b/src/mscorlib/src/System/Reflection/Emit/PropertyToken.cs @@ -18,7 +18,6 @@ using System.Reflection; namespace System.Reflection.Emit { - [Serializable] public struct PropertyToken { public static readonly PropertyToken Empty = new PropertyToken(); diff --git a/src/mscorlib/src/System/Reflection/Emit/StackBehaviour.cs b/src/mscorlib/src/System/Reflection/Emit/StackBehaviour.cs index afcf2ddf0a..b9054b709e 100644 --- a/src/mscorlib/src/System/Reflection/Emit/StackBehaviour.cs +++ b/src/mscorlib/src/System/Reflection/Emit/StackBehaviour.cs @@ -17,7 +17,6 @@ using System; namespace System.Reflection.Emit { - [Serializable] public enum StackBehaviour { Pop0 = 0, diff --git a/src/mscorlib/src/System/Reflection/Emit/StringToken.cs b/src/mscorlib/src/System/Reflection/Emit/StringToken.cs index 1d90816fc6..cc5b734ae8 100644 --- a/src/mscorlib/src/System/Reflection/Emit/StringToken.cs +++ b/src/mscorlib/src/System/Reflection/Emit/StringToken.cs @@ -18,7 +18,6 @@ using System.Reflection; namespace System.Reflection.Emit { - [Serializable] public struct StringToken { internal int m_string; diff --git a/src/mscorlib/src/System/Reflection/Emit/SymbolType.cs b/src/mscorlib/src/System/Reflection/Emit/SymbolType.cs index 16848b43dd..ca2f7d9d6e 100644 --- a/src/mscorlib/src/System/Reflection/Emit/SymbolType.cs +++ b/src/mscorlib/src/System/Reflection/Emit/SymbolType.cs @@ -12,7 +12,6 @@ namespace System.Reflection.Emit using System.Diagnostics.Contracts; using CultureInfo = System.Globalization.CultureInfo; - [Serializable] internal enum TypeKind { IsArray = 1, @@ -271,6 +270,9 @@ namespace System.Reflection.Emit #endregion #region Type Overrides + + public override bool IsTypeDefinition => false; + public override bool IsSZArray => m_cRank <= 1 && m_isSzArray; public override Type MakePointerType() diff --git a/src/mscorlib/src/System/Reflection/Emit/TypeBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/TypeBuilder.cs index a98af2bdcf..2f550a4e40 100644 --- a/src/mscorlib/src/System/Reflection/Emit/TypeBuilder.cs +++ b/src/mscorlib/src/System/Reflection/Emit/TypeBuilder.cs @@ -20,7 +20,6 @@ namespace System.Reflection.Emit using System.Diagnostics.Contracts; - [Serializable] public enum PackingSize { Unspecified = 0, @@ -1109,6 +1108,8 @@ namespace System.Reflection.Emit return m_iAttr; } + public override bool IsTypeDefinition => true; + public override bool IsSZArray => false; protected override bool IsArrayImpl() diff --git a/src/mscorlib/src/System/Reflection/Emit/TypeBuilderInstantiation.cs b/src/mscorlib/src/System/Reflection/Emit/TypeBuilderInstantiation.cs index 6d46362f91..64a38b0995 100644 --- a/src/mscorlib/src/System/Reflection/Emit/TypeBuilderInstantiation.cs +++ b/src/mscorlib/src/System/Reflection/Emit/TypeBuilderInstantiation.cs @@ -189,6 +189,7 @@ namespace System.Reflection.Emit public override MemberInfo[] GetMembers(BindingFlags bindingAttr) { throw new NotSupportedException(); } protected override TypeAttributes GetAttributeFlagsImpl() { return m_type.Attributes; } + public override bool IsTypeDefinition => false; public override bool IsSZArray => false; protected override bool IsArrayImpl() { return false; } diff --git a/src/mscorlib/src/System/Reflection/Emit/TypeToken.cs b/src/mscorlib/src/System/Reflection/Emit/TypeToken.cs index 4f0c1b3dac..15a0816a50 100644 --- a/src/mscorlib/src/System/Reflection/Emit/TypeToken.cs +++ b/src/mscorlib/src/System/Reflection/Emit/TypeToken.cs @@ -19,7 +19,6 @@ using System.Threading; namespace System.Reflection.Emit { - [Serializable] public struct TypeToken { public static readonly TypeToken Empty = new TypeToken(); |