Просмотр исходного кода

2002-04-22 Duncan Mak <[email protected]>

	* AutomationProxyAttribute.cs:
	* CoClassAttribute.cs:
	* ComAliasNameAttribute.cs:
	* ComConventionLossAttribute.cs:
	* ComEventInterfaceAttribute.cs:
	* ComImportAttribute.cs:
	* ComRegisterFunctionAttribute.cs:
	* ComUnregisterFunctionAttribute.cs:
	* DispIdAttribute.cs:
	* ImportedFromTypeLibAttribute.cs:
	* LCIDConversionAttribute.cs:
	* PreserveSigAttribute.cs:
	* PrimaryInteropAssemblyAttribute.cs:
	* ProgIdAttribute.cs:
	* TypeLibFuncAttribute.cs:
	* TypeLibFuncFlags.cs:
	* TypeLibTypeAttribute.cs:
	* TypeLibTypeFlags.cs:
	* TypeLibVarAttribute.cs:
	* TypeLibVarFlags.cs:  Added to CVS.

svn path=/trunk/mcs/; revision=3971
Duncan Mak 24 лет назад
Родитель
Сommit
c36c8dd2b1
21 измененных файлов с 545 добавлено и 0 удалено
  1. 28 0
      mcs/class/corlib/System.Runtime.InteropServices/AutomationProxyAttribute.cs
  2. 23 0
      mcs/class/corlib/System.Runtime.InteropServices/ChangeLog
  3. 26 0
      mcs/class/corlib/System.Runtime.InteropServices/CoClassAttribute.cs
  4. 27 0
      mcs/class/corlib/System.Runtime.InteropServices/ComAliasNameAttribute.cs
  5. 21 0
      mcs/class/corlib/System.Runtime.InteropServices/ComConventionLossAttribute.cs
  6. 34 0
      mcs/class/corlib/System.Runtime.InteropServices/ComEventInterfaceAttribute.cs
  7. 21 0
      mcs/class/corlib/System.Runtime.InteropServices/ComImportAttribute.cs
  8. 18 0
      mcs/class/corlib/System.Runtime.InteropServices/ComRegisterFunctionAttribute.cs
  9. 20 0
      mcs/class/corlib/System.Runtime.InteropServices/ComUnregisterFunctionAttribute.cs
  10. 25 0
      mcs/class/corlib/System.Runtime.InteropServices/DispIdAttribute.cs
  11. 25 0
      mcs/class/corlib/System.Runtime.InteropServices/ImportedFromTypeLibAttribute.cs
  12. 27 0
      mcs/class/corlib/System.Runtime.InteropServices/LCIDConversionAttribute.cs
  13. 18 0
      mcs/class/corlib/System.Runtime.InteropServices/PreserveSigAttribute.cs
  14. 32 0
      mcs/class/corlib/System.Runtime.InteropServices/PrimaryInteropAssemblyAttribute.cs
  15. 28 0
      mcs/class/corlib/System.Runtime.InteropServices/ProgIdAttribute.cs
  16. 32 0
      mcs/class/corlib/System.Runtime.InteropServices/TypeLibFuncAttribute.cs
  17. 25 0
      mcs/class/corlib/System.Runtime.InteropServices/TypeLibFuncFlags.cs
  18. 32 0
      mcs/class/corlib/System.Runtime.InteropServices/TypeLibTypeAttribute.cs
  19. 25 0
      mcs/class/corlib/System.Runtime.InteropServices/TypeLibTypeFlags.cs
  20. 32 0
      mcs/class/corlib/System.Runtime.InteropServices/TypeLibVarAttribute.cs
  21. 26 0
      mcs/class/corlib/System.Runtime.InteropServices/TypeLibVarFlags.cs

+ 28 - 0
mcs/class/corlib/System.Runtime.InteropServices/AutomationProxyAttribute.cs

@@ -0,0 +1,28 @@
+//
+// System.Runtime.InteropServices.AutomationProxyAttribute.cs
+//
+// Name: Duncan Mak  ([email protected])
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+	[AttributeUsage (AttributeTargets.Assembly | AttributeTargets.Class |
+			 AttributeTargets.Interface)]
+	public sealed class AutomationProxyAttribute : Attribute
+	{
+		bool val;
+		
+		public AutomationProxyAttribute (bool val)
+		{
+			this.val = val;
+		}
+
+		public bool Value {
+			get { return val; }
+		}
+	}
+}

+ 23 - 0
mcs/class/corlib/System.Runtime.InteropServices/ChangeLog

@@ -1,3 +1,26 @@
+2002-04-22  Duncan Mak  <[email protected]>
+
+	* AutomationProxyAttribute.cs: 
+	* CoClassAttribute.cs: 
+	* ComAliasNameAttribute.cs: 
+	* ComConventionLossAttribute.cs: 
+	* ComEventInterfaceAttribute.cs: 
+	* ComImportAttribute.cs: 
+	* ComRegisterFunctionAttribute.cs: 
+	* ComUnregisterFunctionAttribute.cs: 
+	* DispIdAttribute.cs: 
+	* ImportedFromTypeLibAttribute.cs: 
+	* LCIDConversionAttribute.cs: 
+	* PreserveSigAttribute.cs: 
+	* PrimaryInteropAssemblyAttribute.cs: 
+	* ProgIdAttribute.cs: 
+	* TypeLibFuncAttribute.cs: 
+	* TypeLibFuncFlags.cs: 
+	* TypeLibTypeAttribute.cs: 
+	* TypeLibTypeFlags.cs: 
+	* TypeLibVarAttribute.cs: 
+	* TypeLibVarFlags.cs:  Added to CVS.
+
 2002-04-08  Nick Drochak  <[email protected]>
 
 	* Marshal.cs: Make class public.

+ 26 - 0
mcs/class/corlib/System.Runtime.InteropServices/CoClassAttribute.cs

@@ -0,0 +1,26 @@
+//
+// System.Runtime.InteropServices.CoClassAttribute.cs
+//
+// Name: Duncan Mak  ([email protected])
+//
+// (C) Ximian, Inc.
+//
+
+namespace System.Runtime.InteropServices {
+
+	[AttributeUsage (AttributeTargets.Interface)]
+	public sealed class CoClassAttribute : Attribute
+	{
+
+		Type klass;
+		
+		public CoClassAttribute (Type coClass)
+		{
+			klass = coClass;
+		}
+
+		public Type CoClass {
+			get { return klass; }
+		}
+	}
+}

+ 27 - 0
mcs/class/corlib/System.Runtime.InteropServices/ComAliasNameAttribute.cs

@@ -0,0 +1,27 @@
+//
+// System.Runtime.InteropServices.ComAliasNameAttribute.cs
+//
+// Name: Duncan Mak  ([email protected])
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+	[AttributeUsage (AttributeTargets.Property | AttributeTargets.Field |
+			 AttributeTargets.Parameter | AttributeTargets.ReturnValue)]
+	public sealed class ComAliasNameAttribute : Attribute
+	{
+		string val;
+		
+		public ComAliasNameAttribute (string alias)
+		{
+			val = alias;
+		}
+
+		public string Value {
+			get { return val; }
+		}
+	}
+}

+ 21 - 0
mcs/class/corlib/System.Runtime.InteropServices/ComConventionLossAttribute.cs

@@ -0,0 +1,21 @@
+//
+// System.Runtime.InteropServices.ComConventionLossAttribute.cs
+//
+// Name: Duncan Mak  ([email protected])
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+	[AttributeUsage (AttributeTargets.All)]
+	public sealed class ComConventionLossAttribute : Attribute
+	{
+		public ComConventionLossAttribute ()
+		{
+		}
+	}
+	
+}

+ 34 - 0
mcs/class/corlib/System.Runtime.InteropServices/ComEventInterfaceAttribute.cs

@@ -0,0 +1,34 @@
+//
+// System.Runtime.InteropServices.ComEventInterfaceAttribute.cs
+//
+// Name: Duncan Mak  ([email protected])
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+	[AttributeUsage (AttributeTargets.Interface)]
+	public sealed class ComEventInterfaceAttribute : Attribute
+	{
+		Type si, ep;
+		
+		public ComEventInterfaceAttribute (Type SourceInterface,
+						   Type EventProvider)
+		{
+			si = SourceInterface;
+			ep = EventProvider;
+		}
+
+		public Type EventProvider {
+			get { return ep; }
+		}
+
+		public Type SourceInterface {
+			get { return si; }
+		}
+	}
+}
+		

+ 21 - 0
mcs/class/corlib/System.Runtime.InteropServices/ComImportAttribute.cs

@@ -0,0 +1,21 @@
+//
+// System.Runtime.InteropServices.ComImportAttribute.cs
+//
+// Name: Duncan Mak  ([email protected])
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+	[AttributeUsage (AttributeTargets.Class |
+			 AttributeTargets.Interface)]
+	public sealed class ComImportAttribute : Attribute
+	{
+		public ComImportAttribute ()
+		{
+		}
+	}
+}

+ 18 - 0
mcs/class/corlib/System.Runtime.InteropServices/ComRegisterFunctionAttribute.cs

@@ -0,0 +1,18 @@
+//
+// System.Runtime.InteropServices.ComRegisterFunctionAttribute.cs
+//
+// Name: Duncan Mak  ([email protected])
+//
+// (C) Ximian, Inc.
+//
+
+namespace System.Runtime.InteropServices {
+
+	[AttributeUsage (AttributeTargets.Method)]
+	public sealed class ComRegisterFunctionAttribute : Attribute
+	{
+		public ComRegisterFunctionAttribute ()
+		{
+		}
+	}
+}

+ 20 - 0
mcs/class/corlib/System.Runtime.InteropServices/ComUnregisterFunctionAttribute.cs

@@ -0,0 +1,20 @@
+//
+// System.Runtime.InteropServices.ComUnregisterFunctionAttribute.cs
+//
+// Name: Duncan Mak  ([email protected])
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+	[AttributeUsage (AttributeTargets.Method)]
+	public sealed class ComUnregisterFunctionAttribute : Attribute
+	{
+		public ComUnregisterFunctionAttribute ()
+		{
+		}
+	}
+}

+ 25 - 0
mcs/class/corlib/System.Runtime.InteropServices/DispIdAttribute.cs

@@ -0,0 +1,25 @@
+//
+// System.Runtime.InteropServices.DispIdAttribute.cs
+//
+// Name: Duncan Mak  ([email protected])
+//
+// (C) Ximian, Inc.
+
+namespace System.Runtime.InteropServices {
+
+	[AttributeUsage (AttributeTargets.Method | AttributeTargets.Property |
+			 AttributeTargets.Field | AttributeTargets.Event)]
+	public sealed class DispIdAttribute : Attribute
+	{
+		int id;
+		
+		public DispIdAttribute (int dispId)
+		{
+			id = dispId;
+		}
+
+		public int Value {
+			get { return id; }
+		}
+	}
+}

+ 25 - 0
mcs/class/corlib/System.Runtime.InteropServices/ImportedFromTypeLibAttribute.cs

@@ -0,0 +1,25 @@
+//
+// System.Runtime.InteropServices.ImportedFromTypeLibAttribute.cs
+//
+// Name: Duncan Mak  ([email protected])
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+	public sealed class ImportedFromTypeLibAttribute : Attribute
+	{
+		string TlbFile;
+		public ImportedFromTypeLibAttribute (string tlbFile)
+		{
+			TlbFile = tlbFile;
+		}
+
+		public string Value {
+			get { return TlbFile; }
+		}
+	} 
+}

+ 27 - 0
mcs/class/corlib/System.Runtime.InteropServices/LCIDConversionAttribute.cs

@@ -0,0 +1,27 @@
+//
+// System.Runtime.InteropServices.LCIDConversionAttribute.cs
+//
+// Name: Duncan Mak  ([email protected])
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+	[AttributeUsage (AttributeTargets.Method)]
+	public sealed class LCIDConversionAttribute : Attribute
+	{
+		int id;
+		
+		public LCIDConversionAttribute (int lcid)
+		{
+			id = lcid;
+		}
+
+		public int Value {
+			get { return id; }
+		}
+	}
+}

+ 18 - 0
mcs/class/corlib/System.Runtime.InteropServices/PreserveSigAttribute.cs

@@ -0,0 +1,18 @@
+// System.Runtime.InteropServices.PreserveSigAttribute.cs
+//
+// Name: Duncan Mak  ([email protected])
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+	public sealed class PreserveSigAttribute : Attribute
+	{
+		public PreserveSigAttribute ()
+		{
+		}
+	}
+}

+ 32 - 0
mcs/class/corlib/System.Runtime.InteropServices/PrimaryInteropAssemblyAttribute.cs

@@ -0,0 +1,32 @@
+//
+// System.Runtime.InteropServices.PrimaryInteropAssemblyAttribute.cs
+//
+// Name: Duncan Mak  ([email protected])
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+	[AttributeUsage (AttributeTargets.Assembly)]
+	public sealed class PrimaryInteropAssemblyAttribute : Attribute
+	{
+		int major, minor;
+		
+		public PrimaryInteropAssemblyAttribute (int major, int minor)
+		{
+			this.major = major;
+			this.minor = minor;
+		}
+
+		public int MajorVersion {
+			get { return major; }
+		}
+
+		public int MinorVersion {
+			get { return minor; }
+		}
+	}
+}

+ 28 - 0
mcs/class/corlib/System.Runtime.InteropServices/ProgIdAttribute.cs

@@ -0,0 +1,28 @@
+//
+// System.Runtime.InteropServices.ProgIdAttribute.cs
+//
+// Name: Duncan Mak  ([email protected])
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+	[AttributeUsage (AttributeTargets.Class)]
+	public sealed class ProgIdAttribute : Attribute
+	{
+		string pid;
+		
+		public ProgIdAttribute (string progId)
+		{
+			pid = progId;
+		}
+
+		public string Value {
+			get { return pid; }
+		}
+	}
+
+}

+ 32 - 0
mcs/class/corlib/System.Runtime.InteropServices/TypeLibFuncAttribute.cs

@@ -0,0 +1,32 @@
+//
+// System.Runtime.InteropServices.TypeLibFuncAttribute.cs
+//
+// Name: Duncan Mak  ([email protected])
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+	[AttributeUsage (AttributeTargets.Method)]
+	public sealed class TypeLibFuncAttribute : Attribute
+	{
+		TypeLibFuncFlags flags;
+		
+		[MonoTODO]
+		public TypeLibFuncAttribute (short flags)
+		{
+		}
+
+		public TypeLibFuncAttribute (TypeLibFuncFlags flags)
+		{
+			this.flags = flags;
+		}
+
+		public TypeLibFuncFlags Value {
+			get { return flags; }
+		}
+	}
+}

+ 25 - 0
mcs/class/corlib/System.Runtime.InteropServices/TypeLibFuncFlags.cs

@@ -0,0 +1,25 @@
+// System.Runtime.InteropServices.TypeLibFuncFlags.cs
+// 
+// Name: Duncan Mak  ([email protected])
+// 
+// (C) Ximian, Inc.
+// 
+
+namespace System.Runtime.InteropServices {
+	[Flags] [Serializable]
+	public enum TypeLibFuncFlags {
+		FReadOnly = 1,
+		FSource = 2,
+		FBindable = 4,
+		FRequestEdit = 8,
+		FDisplayBind = 16,
+		FDefaultBind = 32,
+		FHidden = 64,
+		FRestricted = 128,
+		FDefaultCollelem = 256,
+		FUiDefault = 512,
+		FNonBrowable = 1024,
+		FReplaceable = 2048,
+		FImmediateBind = 4096,
+	}
+}

+ 32 - 0
mcs/class/corlib/System.Runtime.InteropServices/TypeLibTypeAttribute.cs

@@ -0,0 +1,32 @@
+//
+// System.Runtime.InteropServices.TypeLibTypeAttribute.cs
+//
+// Name: Duncan Mak  ([email protected])
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+	[AttributeUsage (AttributeTargets.Method)]
+	public sealed class TypeLibTypeAttribute : Attribute
+	{
+		TypeLibTypeFlags flags;
+		
+		[MonoTODO]
+		public TypeLibTypeAttribute (short flags)
+		{
+		}
+
+		public TypeLibTypeAttribute (TypeLibTypeFlags flags)
+		{
+			this.flags = flags;
+		}
+
+		public TypeLibTypeFlags Value {
+			get { return flags; }
+		}
+	}
+}

+ 25 - 0
mcs/class/corlib/System.Runtime.InteropServices/TypeLibTypeFlags.cs

@@ -0,0 +1,25 @@
+// System.Runtime.InteropServices.TypeLibTypeFlags.cs
+// 
+// Name: Duncan Mak  ([email protected])
+// 
+// (C) Ximian, Inc.
+// 
+
+namespace System.Runtime.InteropServices {
+	[Flags] [Serializable]
+	public enum TypeLibTypeFlags {
+		FAppObject = 1,
+		FCanCreate = 2,
+		FLicensed = 4,
+		FPreDeclId = 8,
+		FHidden= 16,
+		FControl = 32,
+		FDual = 64,
+		FNonExtensible = 128,
+		FOleAutomation = 256,
+		FRestricted = 512,
+		FAggregatable = 1024,
+		FDispatchable = 2048,
+		FReverseBind = 4096,
+	}
+}

+ 32 - 0
mcs/class/corlib/System.Runtime.InteropServices/TypeLibVarAttribute.cs

@@ -0,0 +1,32 @@
+//
+// System.Runtime.InteropServices.TypeLibTypeAttribute.cs
+//
+// Name: Duncan Mak  ([email protected])
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+	[AttributeUsage (AttributeTargets.Method)]
+	public sealed class TypeLibVarAttribute : Attribute
+	{
+		TypeLibVarFlags flags;
+		
+		[MonoTODO]
+		public TypeLibVarAttribute (short flags)
+		{
+		}
+
+		public TypeLibVarAttribute (TypeLibVarFlags flags)
+		{
+			this.flags = flags;
+		}
+
+		public TypeLibVarFlags Value {
+			get { return flags; }
+		}
+	}
+}

+ 26 - 0
mcs/class/corlib/System.Runtime.InteropServices/TypeLibVarFlags.cs

@@ -0,0 +1,26 @@
+// System.Runtime.InteropServices.TypeLibVarFlags.cs
+// 
+// Name: Duncan Mak  ([email protected])
+// 
+// (C) Ximian, Inc.
+// 
+
+namespace System.Runtime.InteropServices {
+	
+	[Flags] [Serializable]
+	public enum TypeLibVarFlags {
+		FReadOnly = 1,
+		FSource = 2,
+		FBindable = 4,
+		FRequestEdit = 8,
+		FDisplayBind = 16,
+		FDefaultBind = 32,
+		FHidden = 64,
+		FRestricted = 128,
+		FDefaultCollelem = 256,
+		FUiDefault = 512,
+		FNonBrowable = 1024,
+		FReplaceable = 2048,
+		FImmediateBind = 4096,
+	}
+}