Add 4.5 compatible MEF
[mono.git] / mcs / class / System.ComponentModel.Composition.4.5 / src / ComponentModel / PlatformWorkarounds.cs
1 // -----------------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation.  All rights reserved.
3 // -----------------------------------------------------------------------
4 using System;
5 using System.Collections;
6 using System.Collections.Generic;
7 using System.Diagnostics;
8 using System.Diagnostics.CodeAnalysis;
9
10 #if !FEATURE_SERIALIZATION
11 namespace System
12 {
13     [Conditional("NOT_FEATURE_SERIALIZATION")]    // Trick so that the attribute is never actually applied
14     [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Delegate, Inherited = false)]
15     internal sealed class SerializableAttribute : Attribute
16     {
17     }
18 }
19 #endif //!FEATURE_SERIALIZATION
20
21 #if !FEATURE_LEGACYCOMPONENTMODEL
22 namespace System.ComponentModel
23 {
24     [Conditional("NOT_FEATURE_LEGACYCOMPONENTMODEL")]    // Trick so that the attribute is never actually applied
25     internal sealed class LocalizableAttribute : Attribute
26     {
27         [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "isLocalizable")]
28         public LocalizableAttribute(bool isLocalizable)
29         {
30         }
31     }
32 }
33 #endif //!FEATURE_LEGACYCOMPONENTMODEL
34
35 // This is temporary as contracts should actually be everywhere. Once CORE_CLR adds back this attribute, this will be gone
36 #if FEATURE_MISSINGCONTRACTARGUMENTVALIDATOR
37 namespace System.Diagnostics.Contracts
38 {
39     [Conditional("NOT_FEATURE_MISSINGCONTRACTARGUMENTVALIDATOR")]    // Trick so that the attribute is never actually applied
40     [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
41     internal sealed class ContractArgumentValidatorAttribute : Attribute
42     {
43     }
44 }
45 #endif //FEATURE_MISSINGCONTRACTARGUMENTVALIDATOR