Fix bugs in sizing TableLayoutPanel (Xamarin bug 18638)
[mono.git] / mcs / class / System.Web.Mvc2 / System.Web.Mvc / ParameterDescriptor.cs
1 /* ****************************************************************************\r
2  *\r
3  * Copyright (c) Microsoft Corporation. All rights reserved.\r
4  *\r
5  * This software is subject to the Microsoft Public License (Ms-PL). \r
6  * A copy of the license can be found in the license.htm file included \r
7  * in this distribution.\r
8  *\r
9  * You must not remove this notice, or any other, from this software.\r
10  *\r
11  * ***************************************************************************/\r
12 \r
13 namespace System.Web.Mvc {\r
14     using System;\r
15     using System.Reflection;\r
16 \r
17     public abstract class ParameterDescriptor : ICustomAttributeProvider {\r
18 \r
19         private static readonly EmptyParameterBindingInfo _emptyBindingInfo = new EmptyParameterBindingInfo();\r
20 \r
21         public abstract ActionDescriptor ActionDescriptor {\r
22             get;\r
23         }\r
24 \r
25         public virtual ParameterBindingInfo BindingInfo {\r
26             get {\r
27                 return _emptyBindingInfo;\r
28             }\r
29         }\r
30 \r
31         public virtual object DefaultValue {\r
32             get {\r
33                 return null;\r
34             }\r
35         }\r
36 \r
37         public abstract string ParameterName {\r
38             get;\r
39         }\r
40 \r
41         public abstract Type ParameterType {\r
42             get;\r
43         }\r
44 \r
45         public virtual object[] GetCustomAttributes(bool inherit) {\r
46             return GetCustomAttributes(typeof(object), inherit);\r
47         }\r
48 \r
49         public virtual object[] GetCustomAttributes(Type attributeType, bool inherit) {\r
50             if (attributeType == null) {\r
51                 throw new ArgumentNullException("attributeType");\r
52             }\r
53 \r
54             return (object[])Array.CreateInstance(attributeType, 0);\r
55         }\r
56 \r
57         public virtual bool IsDefined(Type attributeType, bool inherit) {\r
58             if (attributeType == null) {\r
59                 throw new ArgumentNullException("attributeType");\r
60             }\r
61 \r
62             return false;\r
63         }\r
64 \r
65         private sealed class EmptyParameterBindingInfo : ParameterBindingInfo {\r
66         }\r
67 \r
68     }\r
69 }\r