Remove excessive shortcut key matching in ToolStrip
[mono.git] / mcs / class / System.ComponentModel.Composition / src / ComponentModel / System / ComponentModel / Composition / InheritedExportAttribute.cs
1 // -----------------------------------------------------------------------\r
2 // Copyright (c) Microsoft Corporation.  All rights reserved.\r
3 // -----------------------------------------------------------------------\r
4 using System;\r
5 using System.ComponentModel.Composition.Hosting;\r
6 using System.Diagnostics.CodeAnalysis;\r
7 \r
8 namespace System.ComponentModel.Composition\r
9 {\r
10     /// <summary>\r
11     ///     Specifies that a type or interface that provides a particular export.\r
12     /// </summary>\r
13     [SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")]\r
14     [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = true, Inherited = true)]\r
15     public class InheritedExportAttribute : ExportAttribute\r
16     {\r
17         /// <summary>\r
18         ///     Initializes a new instance of the <see cref="ExportAttribute"/> class, exporting the\r
19         ///     type marked with this attribute under the default contract name.\r
20         /// </summary>\r
21         /// <remarks>\r
22         ///     <para>\r
23         ///         The default contract name is the result of calling \r
24         ///         <see cref="AttributedModelServices.GetContractName(Type)"/> on the type itself, \r
25         ///         that is marked with this attribute. \r
26         ///     </para>\r
27         ///     <para>\r
28         ///         The contract name is compared using a case-sensitive, non-linguistic comparison \r
29         ///         using <see cref="StringComparer.Ordinal"/>.\r
30         ///     </para>\r
31         /// </remarks>\r
32         public InheritedExportAttribute()\r
33             : this((string)null, (Type)null)\r
34         {\r
35         }\r
36 \r
37         /// <summary>\r
38         ///     Initializes a new instance of the <see cref="ExportAttribute"/> class, exporting the\r
39         ///     type marked with this attribute under a contract name derived from the specified type.\r
40         /// </summary>\r
41         /// <param name="contractType">\r
42         ///     A <see cref="Type"/> of which to derive the contract name to export the type  \r
43         ///     marked with this attribute, under; or <see langword="null"/> to use the \r
44         ///     default contract name.\r
45         /// </param>\r
46         /// <remarks>\r
47         ///     <para>\r
48         ///         The contract name is the result of calling \r
49         ///         <see cref="AttributedModelServices.GetContractName(Type)"/> on \r
50         ///         <paramref name="contractType"/>.\r
51         ///     </para>\r
52         ///     <para>\r
53         ///         The default contract name is the result of calling \r
54         ///         <see cref="AttributedModelServices.GetContractName(Type)"/> on the type of the \r
55         ///         itself, that is marked with this attribute. \r
56         ///     </para>\r
57         ///     <para>\r
58         ///         The contract name is compared using a case-sensitive, non-linguistic comparison \r
59         ///         using <see cref="StringComparer.Ordinal"/>.\r
60         ///     </para>\r
61         /// </remarks>\r
62         public InheritedExportAttribute(Type contractType)\r
63             : this((string)null, contractType)\r
64         {\r
65         }\r
66 \r
67         /// <summary>\r
68         ///     Initializes a new instance of the <see cref="ExportAttribute"/> class, exporting the\r
69         ///     type or member marked with this attribute under the specified contract name.\r
70         /// </summary>\r
71         /// <param name="contractName">\r
72         ///      A <see cref="String"/> containing the contract name to export the type \r
73         ///      marked with this attribute, under; or <see langword="null"/> or an empty string \r
74         ///      ("") to use the default contract name.\r
75         /// </param>\r
76         /// <remarks>\r
77         ///     <para>\r
78         ///         The default contract name is the result of calling \r
79         ///         <see cref="AttributedModelServices.GetContractName(Type)"/> on \r
80         ///         the type itself that this is marked with this attribute. \r
81         ///     </para>\r
82         ///     <para>\r
83         ///         The contract name is compared using a case-sensitive, non-linguistic comparison \r
84         ///         using <see cref="StringComparer.Ordinal"/>.\r
85         ///     </para>\r
86         /// </remarks>\r
87         public InheritedExportAttribute(string contractName)\r
88             : this(contractName, (Type)null)\r
89         {\r
90         }\r
91 \r
92         /// <summary>\r
93         ///     Initializes a new instance of the <see cref="ExportAttribute"/> class, exporting the\r
94         ///     type or member marked with this attribute under the specified contract name.\r
95         /// </summary>\r
96         /// <param name="contractName">\r
97         ///      A <see cref="String"/> containing the contract name to export the type \r
98         ///      marked with this attribute, under; or <see langword="null"/> or an empty string \r
99         ///      ("") to use the default contract name.\r
100         /// </param>\r
101         /// <param name="contractType">\r
102         ///     A <see cref="Type"/> of which to derive the contract name to export the type  \r
103         ///     marked with this attribute, under; or <see langword="null"/> to use the \r
104         ///     default contract name.\r
105         /// </param>\r
106         /// <remarks>\r
107         ///     <para>\r
108         ///         The default contract name is the result of calling \r
109         ///         <see cref="AttributedModelServices.GetContractName(Type)"/> on \r
110         ///         the type itself that this is marked with this attribute. \r
111         ///     </para>\r
112         ///     <para>\r
113         ///         The contract name is compared using a case-sensitive, non-linguistic comparison \r
114         ///         using <see cref="StringComparer.Ordinal"/>.\r
115         ///     </para>\r
116         /// </remarks>\r
117         public InheritedExportAttribute(string contractName, Type contractType)\r
118             : base(contractName, contractType)\r
119         {\r
120         }\r
121     }\r
122 }