* *.cs: Updates for net 2.0 beta 2.
svn path=/trunk/mcs/; revision=45572
// 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,
+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.
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System.Runtime.InteropServices;
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 {
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;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System.Runtime.InteropServices;
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 {
// 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>
/// <summary>
/// Annotation for ann.phi instruction.
/// </summary>
+#if NET_2_0
+ [Obsolete ("This API has been deprecated.")]
+#endif
Phi = 6,
/// <summary>
// 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;
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 ();
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System.Runtime.InteropServices;
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 {
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;
// 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>
/// additional information to particular
/// MSIL processor.
/// </summary>
+#if NET_2_0
+ [Obsolete ("This API has been deprecated.")]
+#endif
Annotation = 0,
/// <summary>
// 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>
/// <summary>
/// </summary>
+#if NET_2_0
+ [Obsolete ("This API has been deprecated.")]
+#endif
InlinePhi = 6,
/// <summary>
// 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,
// 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]
+#endif
+#if NET_2_0
+ [ComVisible (true)]
#endif
public enum PackingSize {
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;
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System.Runtime.InteropServices;
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 {
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System.Runtime.InteropServices;
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 {
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System.Runtime.InteropServices;
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 {
// 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>
/// <summary>
/// </summary>
Varpush = 0x1B
+
+#if NET_2_0
+ ,
+ Popref_popi_pop1 = 0x1C
+#endif
}
}
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System.Runtime.InteropServices;
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 {
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System.Runtime.InteropServices;
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;
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;