2005-06-07 Zoltan Varga <vargaz@freemail.hu>
authorZoltan Varga <vargaz@gmail.com>
Tue, 7 Jun 2005 12:37:46 +0000 (12:37 -0000)
committerZoltan Varga <vargaz@gmail.com>
Tue, 7 Jun 2005 12:37:46 +0000 (12:37 -0000)
* *.cs: Updates for net 2.0 beta 2.

svn path=/trunk/mcs/; revision=45572

22 files changed:
mcs/class/corlib/System.Reflection.Emit/AssemblyBuilderAccess.cs
mcs/class/corlib/System.Reflection.Emit/ChangeLog
mcs/class/corlib/System.Reflection.Emit/EventToken.cs
mcs/class/corlib/System.Reflection.Emit/FieldBuilder.cs
mcs/class/corlib/System.Reflection.Emit/FieldToken.cs
mcs/class/corlib/System.Reflection.Emit/FlowControl.cs
mcs/class/corlib/System.Reflection.Emit/Label.cs
mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
mcs/class/corlib/System.Reflection.Emit/MethodToken.cs
mcs/class/corlib/System.Reflection.Emit/OpCode.cs
mcs/class/corlib/System.Reflection.Emit/OpCodeType.cs
mcs/class/corlib/System.Reflection.Emit/OperandType.cs
mcs/class/corlib/System.Reflection.Emit/PEFileKinds.cs
mcs/class/corlib/System.Reflection.Emit/PackingSize.cs
mcs/class/corlib/System.Reflection.Emit/ParameterBuilder.cs
mcs/class/corlib/System.Reflection.Emit/ParameterToken.cs
mcs/class/corlib/System.Reflection.Emit/PropertyToken.cs
mcs/class/corlib/System.Reflection.Emit/SignatureToken.cs
mcs/class/corlib/System.Reflection.Emit/StackBehaviour.cs
mcs/class/corlib/System.Reflection.Emit/StringToken.cs
mcs/class/corlib/System.Reflection.Emit/TypeToken.cs
mcs/class/corlib/System.Reflection.Emit/UnmanagedMarshal.cs

index 1cd71d8c0ea8a391eacad22fba2a3a1ea803967f..3afda39703a097dab7e8cfe4d822d7a12dff7759 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.Runtime.InteropServices;
+
 namespace System.Reflection.Emit
 {
 #if NET_2_0
-#else
-       [Flags]
+       [ComVisible (true)]
 #endif
+  [Flags]
   public enum AssemblyBuilderAccess
   {
     Run = 1,
index b81597f74bba5088a72d17cc24569a5979f366c8..20bde6546853a3b343d683f4d4a135a5f042ef79 100644 (file)
@@ -1,3 +1,7 @@
+2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
+
+       * *.cs: Updates for net 2.0 beta 2.
+
 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
 
        * AssemblyBuilder.cs: Update after PortableExecutableKinds name change.
index b8406c21374ecf97cc4c46927570dd1effcc089e..29a2e057e9d43952ffc22578d4190f5e1239cad0 100644 (file)
@@ -25,6 +25,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
 
@@ -32,6 +33,9 @@ namespace System.Reflection.Emit {
        /// <summary>
        ///  Represents the Token returned by the metadata to represent a Event.
        /// </summary>
+#if NET_2_0
+       [ComVisible (true)]
+#endif
        [Serializable]
        public struct EventToken {
 
index 200f1cb4e577dd9f5d1573005fd6c6f0832206ab..6525cb98a30d40eb7228052f874acb11f0065205 100644 (file)
@@ -164,6 +164,9 @@ namespace System.Reflection.Emit {
                        SetCustomAttribute (new CustomAttributeBuilder (con, binaryAttribute));
                }
 
+#if NET_2_0
+               [Obsolete ("An alternate API is available: Emit the MarshalAs custom attribute instead.")]
+#endif
                public void SetMarshal( UnmanagedMarshal unmanagedMarshal) {
                        RejectIfCreated ();
                        marshal_info = unmanagedMarshal;
index 71384e02492d3c4a182b13410d6c9ba0c7dd7a21..7bcb162d6c7ecbc2209e4ec3836f55131ab3dbc4 100644 (file)
@@ -25,6 +25,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
 
@@ -32,6 +33,9 @@ namespace System.Reflection.Emit {
        /// <summary>
        ///  Represents the Token returned by the metadata to represent a Field.
        /// </summary>
+#if NET_2_0
+       [ComVisible (true)]
+#endif
        [Serializable]
        public struct FieldToken {
 
index 3caf276fa36ec4cbfd8402b382ca915250a82c2d..fdc14b45c3522dc0529767eefde242f1b1099ae7 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-
+using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
 
        /// <summary>
        ///  Describes how an instruction alters the flow of control.
        /// </summary>
+#if NET_2_0
+       [ComVisible (true)]
+#endif
        public enum FlowControl {
 
                /// <summary>
@@ -69,6 +72,9 @@ namespace System.Reflection.Emit {
                /// <summary>
                ///  Annotation for ann.phi instruction.
                /// </summary>
+#if NET_2_0
+               [Obsolete ("This API has been deprecated.")]
+#endif
                Phi = 6,
 
                /// <summary>
index c27b447ec38fe92fc484254ec99d5b9a79df3d06..e6d99bc2bc56391fc40937156990ad8400f334e7 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.Runtime.InteropServices;
+
 namespace System.Reflection.Emit {
+
+#if NET_2_0
+       [ComVisible (true)]
+#endif
        [Serializable]
        public struct Label {
                internal int label;
index 57db5de308beab5d6f8486aafa1bcc65c5add61c..d08d1cbdc7f3238bfd8f5fbc9038352b2547a317 100644 (file)
@@ -397,7 +397,9 @@ namespace System.Reflection.Emit {
                        attrs |= MethodAttributes.HasSecurity;
                }
 
-               [MonoTODO]
+#if NET_2_0
+               [Obsolete ("An alternate API is available: Emit the MarshalAs custom attribute instead.")]
+#endif
                public void SetMarshal (UnmanagedMarshal unmanagedMarshal)
                {
                        RejectIfCreated ();
index 8fc9455c082f450c82e7d3b1cf72d613aebe3fa6..a6d28f826aeb7509193579cff4558e0ac4f0c615 100644 (file)
@@ -25,6 +25,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
 
@@ -32,6 +33,9 @@ namespace System.Reflection.Emit {
        /// <summary>
        ///  Represents the Token returned by the metadata to represent a Method.
        /// </summary>
+#if NET_2_0
+       [ComVisible (true)]
+#endif
        [Serializable]
        public struct MethodToken {
 
index b0755484185bddc6e2a2dcc830b535b45dfba42b..e7fbc7c85af4ba07848bdf555175c9c271ce0e96 100644 (file)
 using System;
 using System.Reflection;
 using System.Reflection.Emit;
+using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
 
+#if NET_2_0
+       [ComVisible (true)]
+#endif
        public struct OpCode {
 
                internal byte op1, op2;
index dae861f21e9a96158ee45d05993c323e5c433241..36d327b2f69f937047fec6608a3b70ca676a804e 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
 
        /// <summary>
        ///  Describes the types of MSIL instructions.
        /// </summary>
+#if NET_2_0
+       [ComVisible (true)]
+#endif
        public enum OpCodeType {
 
                /// <summary>
@@ -39,6 +43,9 @@ namespace System.Reflection.Emit {
                ///  additional information to particular
                ///  MSIL processor.
                /// </summary>
+#if NET_2_0
+               [Obsolete ("This API has been deprecated.")]
+#endif
                Annotation = 0,
 
                /// <summary>
index 795d6ef60d3e35c94f68f03a191477ed0e3f7f6b..a04e983da81d63f8c0a18c7ed476f024a1824e3d 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
 
        /// <summary>
        ///  Describes the operand types of MSIL instructions.
        /// </summary>
+#if NET_2_0
+       [ComVisible (true)]
+#endif
        public enum OperandType {
 
                /// <summary>
@@ -59,6 +63,9 @@ namespace System.Reflection.Emit {
 
                /// <summary>
                /// </summary>
+#if NET_2_0
+               [Obsolete ("This API has been deprecated.")]
+#endif
                InlinePhi = 6,
 
                /// <summary>
index 444db0027163876ede160a1c20f816f46155a5eb..fcf2b2080aa6877ecf8c70370ff0c612d0721020 100644 (file)
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
+
+using System.Runtime.InteropServices;
+
 namespace System.Reflection.Emit {
+
+#if NET_2_0
+       [ComVisible (true)]
+#endif
        public enum PEFileKinds {
                Dll = 1,
                ConsoleApplication = 2,
index d579856137a676ea1d9f4bb7dc3f87e941093a8a..2b4183a97107234452ecaac9bcfc137b20c84939 100644 (file)
@@ -25,6 +25,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
 
@@ -34,6 +35,9 @@ namespace System.Reflection.Emit {
 #if NET_2_0
 #else
        [Flags]
+#endif
+#if NET_2_0
+       [ComVisible (true)]
 #endif
        public enum PackingSize {
 
index b7765488ba0569218d785b047147a249fe4fec8e..968c265cba878fa2b7500a300a8215f0737e9f4f 100644 (file)
@@ -117,6 +117,9 @@ namespace System.Reflection.Emit {
                        SetCustomAttribute (new CustomAttributeBuilder (con, binaryAttribute));
                }
 
+#if NET_2_0
+               [Obsolete ("An alternate API is available: Emit the MarshalAs custom attribute instead.")]
+#endif
                public virtual void SetMarshal( UnmanagedMarshal unmanagedMarshal) {
                        marshal_info = unmanagedMarshal;
                        attrs |= ParameterAttributes.HasFieldMarshal;
index d612eddd0a96713be24e8d2de9027f4ff28272d9..d146d02216c9a129c868894f1498b45f0f13a2b5 100644 (file)
@@ -25,6 +25,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
 
@@ -32,6 +33,9 @@ namespace System.Reflection.Emit {
        /// <summary>
        ///  Represents the Token returned by the metadata to represent a Parameter.
        /// </summary>
+#if NET_2_0
+       [ComVisible (true)]
+#endif
        [Serializable]
        public struct ParameterToken {
 
index 5564e57c70d36058de5ef1eddb4617dffd30cdae..a332a8e2405ed4f3dcf49cef118d4e53e894b51c 100644 (file)
@@ -25,6 +25,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
 
@@ -32,6 +33,9 @@ namespace System.Reflection.Emit {
        /// <summary>
        ///  Represents the Token returned by the metadata to represent a Property.
        /// </summary>
+#if NET_2_0
+       [ComVisible (true)]
+#endif
        [Serializable]
        public struct PropertyToken {
 
index 4d734d3754cfd262954bdccd1ed3e7f2f1a70e65..624891f1ae38f4e85c88a38bcb765b9b86c69eaf 100644 (file)
@@ -25,6 +25,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
 
@@ -32,6 +33,9 @@ namespace System.Reflection.Emit {
        /// <summary>
        ///  Represents the Token returned by the metadata to represent a Signature.
        /// </summary>
+#if NET_2_0
+       [ComVisible (true)]
+#endif
        [Serializable]
        public struct SignatureToken {
 
index 0b4d45637b233fff2b301c0047bcb7ff32137d89..ee9ce52d2808222de93814ae7e3b40fb2b5e580d 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
 
        /// <summary>
        ///  Describes how values are pushed onto or popped off a stack.
        /// </summary>
+#if NET_2_0
+       [ComVisible (true)]
+#endif
        public enum StackBehaviour {
 
                /// <summary>
@@ -144,6 +148,11 @@ namespace System.Reflection.Emit {
                /// <summary>
                /// </summary>
                Varpush = 0x1B
+
+#if NET_2_0
+               ,
+               Popref_popi_pop1 = 0x1C
+#endif
        }
 
 }
index 3f0083310c83ea4faec4d25f9ca28f8c7f91edb8..fbdef8235218bc2d7dcfa6865f35a8530ee9a3dd 100644 (file)
@@ -25,6 +25,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
 
@@ -32,6 +33,9 @@ namespace System.Reflection.Emit {
        /// <summary>
        ///  Represents the Token returned by the metadata to represent a String.
        /// </summary>
+#if NET_2_0
+       [ComVisible (true)]
+#endif
        [Serializable]
        public struct StringToken {
 
index 9745aa83a7446fbee55ac3cba5f0c0bd1b794af9..96411bef5bd42b037dfb348deffebabed285cd63 100644 (file)
@@ -25,6 +25,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
 
@@ -33,6 +34,9 @@ namespace System.Reflection.Emit {
        ///  Represents the Token returned by the metadata to represent a Type.
        /// </summary>
        [Serializable]
+#if NET_2_0
+       [ComVisible (true)]
+#endif
        public struct TypeToken {
 
                internal int tokValue;
index 096fafc5e3a388a472db2b2c36c7610c0793c9e9..d0cff0903a44ad2b0331b69ac1e3062cfa6f2c2d 100644 (file)
@@ -37,6 +37,10 @@ using System;
 
 namespace System.Reflection.Emit {
 
+#if NET_2_0
+       [Obsolete ("An alternate API is available: Emit the MarshalAs custom attribute instead.")]
+       [ComVisible (true)]
+#endif
        [Serializable]
        public sealed class UnmanagedMarshal {
                private int count;