Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/referencesource/mscorlib/system/runtime/interopservices/attributes.cs')
-rw-r--r--mcs/class/referencesource/mscorlib/system/runtime/interopservices/attributes.cs35
1 files changed, 3 insertions, 32 deletions
diff --git a/mcs/class/referencesource/mscorlib/system/runtime/interopservices/attributes.cs b/mcs/class/referencesource/mscorlib/system/runtime/interopservices/attributes.cs
index 6a45bbc64ce..1b6027e25a2 100644
--- a/mcs/class/referencesource/mscorlib/system/runtime/interopservices/attributes.cs
+++ b/mcs/class/referencesource/mscorlib/system/runtime/interopservices/attributes.cs
@@ -79,10 +79,8 @@ namespace System.Runtime.InteropServices{
InterfaceIsIUnknown = 1,
InterfaceIsIDispatch = 2,
-#if FEATURE_COMINTEROP
[System.Runtime.InteropServices.ComVisible(false)]
InterfaceIsIInspectable = 3,
-#endif // FEATURE_COMINTEROP
}
[AttributeUsage(AttributeTargets.Interface, Inherited = false)]
@@ -165,7 +163,7 @@ namespace System.Runtime.InteropServices{
public String Value { get { return _importClassName; } }
}
-#if FEATURE_COMINTEROP || MOBILE_LEGACY
+#if MOBILE_LEGACY
[AttributeUsage(AttributeTargets.Method, Inherited = false)]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class LCIDConversionAttribute : Attribute
@@ -395,7 +393,6 @@ namespace System.Runtime.InteropServices{
}
public TypeLibVarFlags Value { get {return _val;} }
}
-#endif //FEATURE_COMINTEROP
[Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
@@ -410,9 +407,7 @@ namespace System.Runtime.InteropServices{
VT_CY = 6,
VT_DATE = 7,
VT_BSTR = 8,
-#if FEATURE_COMINTEROP
VT_DISPATCH = 9,
-#endif // FEATURE_COMINTEROP
VT_ERROR = 10,
VT_BOOL = 11,
VT_VARIANT = 12,
@@ -451,7 +446,7 @@ namespace System.Runtime.InteropServices{
[Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
- // Note that this enum should remain in-[....] with the CorNativeType enum in corhdr.h
+ // Note that this enum should remain in-sync with the CorNativeType enum in corhdr.h
public enum UnmanagedType
{
Bool = 0x2, // 4 byte boolean value (true != 0, false == 0)
@@ -478,9 +473,7 @@ namespace System.Runtime.InteropServices{
Currency = 0xf, // A currency
-#if FEATURE_COMINTEROP || FEATURE_LEGACYNETCF || MONO
BStr = 0x13, // OLE Unicode BSTR
-#endif //FEATURE_COMINTEROP || FEATURE_LEGACYNETCF
LPStr = 0x14, // Ptr to SBCS string
@@ -492,17 +485,13 @@ namespace System.Runtime.InteropServices{
IUnknown = 0x19, // COM IUnknown pointer.
-#if FEATURE_COMINTEROP || FEATURE_LEGACYNETCF || MONO
IDispatch = 0x1a, // COM IDispatch pointer
-#endif //FEATURE_COMINTEROP || FEATURE_LEGACYNETCF
Struct = 0x1b, // Structure
-#if FEATURE_COMINTEROP || FEATURE_LEGACYNETCF || MONO
Interface = 0x1c, // COM interface
SafeArray = 0x1d, // OLE SafeArray
-#endif //FEATURE_COMINTEROP || FEATURE_LEGACYNETCF
ByValArray = 0x1e, // Array of fixed size (only valid in structs)
@@ -510,7 +499,6 @@ namespace System.Runtime.InteropServices{
SysUInt = 0x20,
-#if FEATURE_COMINTEROP || FEATURE_LEGACYNETCF || MONO
VBByRefStr = 0x22,
AnsiBStr = 0x23, // OLE BSTR containing SBCS characters
@@ -518,7 +506,6 @@ namespace System.Runtime.InteropServices{
TBStr = 0x24, // Ptr to OS preferred (SBCS/Unicode) BSTR
VariantBool = 0x25, // OLE defined BOOLEAN (2 bytes, true == -1, false == 0)
-#endif //FEATURE_COMINTEROP || FEATURE_LEGACYNETCF
FunctionPtr = 0x26, // Function pointer
@@ -528,20 +515,15 @@ namespace System.Runtime.InteropServices{
LPStruct = 0x2b, // Pointer to a structure
-#if FEATURE_COMINTEROP || FEATURE_LEGACYNETCF || MONO
CustomMarshaler = 0x2c,
-#endif //FEATURE_COMINTEROP || FEATURE_LEGACYNETCF
Error = 0x2d,
-#if FEATURE_COMINTEROP
[System.Runtime.InteropServices.ComVisible(false)]
IInspectable = 0x2e,
[System.Runtime.InteropServices.ComVisible(false)]
HString = 0x2f, // Windows Runtime HSTRING
-
-#endif //FEATURE_COMINTEROP
}
#if !MONO
@@ -620,11 +602,9 @@ namespace System.Runtime.InteropServices{
short sizeParamIndex, int sizeConst, string marshalType, RuntimeType marshalTypeRef, string marshalCookie, int iidParamIndex)
{
_val = val;
-#if FEATURE_COMINTEROP
SafeArraySubType = safeArraySubType;
SafeArrayUserDefinedSubType = safeArrayUserDefinedSubType;
IidParameterIndex = iidParamIndex;
-#endif // FEATURE_COMINTEROP
ArraySubType = arraySubType;
SizeParamIndex = sizeParamIndex;
SizeConst = sizeConst;
@@ -644,14 +624,12 @@ namespace System.Runtime.InteropServices{
}
public UnmanagedType Value { get { return _val; } }
-#if FEATURE_COMINTEROP
// Fields used with SubType = SafeArray.
public VarEnum SafeArraySubType;
public Type SafeArrayUserDefinedSubType;
// Field used with iid_is attribute (interface pointers).
public int IidParameterIndex;
-#endif // FEATURE_COMINTEROP
// Fields used with SubType = ByValArray and LPArray.
// Array size = parameter(PI) * PM + C
@@ -1018,7 +996,7 @@ namespace System.Runtime.InteropServices{
public int Value { get { return _val; } }
}
-#if FEATURE_COMINTEROP || MOBILE_LEGACY
+#if MOBILE_LEGACY
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.ReturnValue, Inherited = false)]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class ComAliasNameAttribute : Attribute
@@ -1059,7 +1037,6 @@ namespace System.Runtime.InteropServices{
public int MajorVersion { get {return _major;} }
public int MinorVersion { get {return _minor;} }
}
-#endif //FEATURE_COMINTEROP
[AttributeUsage(AttributeTargets.Interface, Inherited = false)]
[System.Runtime.InteropServices.ComVisible(true)]
@@ -1075,8 +1052,6 @@ namespace System.Runtime.InteropServices{
public Type CoClass { get { return _CoClass; } }
}
-#if FEATURE_COMINTEROP || MONO
-
[AttributeUsage(AttributeTargets.Interface, Inherited = false)]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class ComEventInterfaceAttribute : Attribute
@@ -1135,8 +1110,6 @@ namespace System.Runtime.InteropServices{
public int RevisionNumber { get {return _revision;} }
}
-#endif //FEATURE_COMINTEROP
-
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Interface | AttributeTargets.Class | AttributeTargets.Struct, Inherited = false)]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class BestFitMappingAttribute : Attribute
@@ -1176,7 +1149,6 @@ namespace System.Runtime.InteropServices{
}
}
-#if FEATURE_COMINTEROP
[AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)]
[System.Runtime.InteropServices.ComVisible(false)]
public sealed class ManagedToNativeComInteropStubAttribute : Attribute
@@ -1193,7 +1165,6 @@ namespace System.Runtime.InteropServices{
public Type ClassType { get { return _classType; } }
public String MethodName { get { return _methodName; } }
}
-#endif // FEATURE_COMINTEROP
}