diff options
author | Jo Shields <directhex@apebox.org> | 2014-02-19 22:12:43 +0000 |
---|---|---|
committer | Jo Shields <directhex@apebox.org> | 2014-02-19 22:12:43 +0000 |
commit | 9972bf87b4f27d9c8f358ef8414ac1ab957a2f0f (patch) | |
tree | 5bb230c1d698659115f918e243c1d4b0aa4c7f51 /mcs/class/corlib/System.Reflection | |
parent | d0a215f5626219ff7927f576588a777e5331c7be (diff) | |
download | mono-upstream/3.2.8+dfsg.tar.gz |
Imported Upstream version 3.2.8+dfsgupstream/3.2.8+dfsg
Diffstat (limited to 'mcs/class/corlib/System.Reflection')
-rw-r--r-- | mcs/class/corlib/System.Reflection/MonoParameterInfo.cs | 15 | ||||
-rw-r--r-- | mcs/class/corlib/System.Reflection/MonoProperty.cs | 2 | ||||
-rw-r--r-- | mcs/class/corlib/System.Reflection/ParameterInfo.cs | 3 |
3 files changed, 17 insertions, 3 deletions
diff --git a/mcs/class/corlib/System.Reflection/MonoParameterInfo.cs b/mcs/class/corlib/System.Reflection/MonoParameterInfo.cs index 327166e448..ce4fdda324 100644 --- a/mcs/class/corlib/System.Reflection/MonoParameterInfo.cs +++ b/mcs/class/corlib/System.Reflection/MonoParameterInfo.cs @@ -236,5 +236,20 @@ namespace System.Reflection return Type.EmptyTypes; return types; } + +#if NET_4_5 + public override bool HasDefaultValue { + get { + object defaultValue = DefaultValue; + if (defaultValue == null) + return true; + + if (defaultValue.GetType () == typeof(DBNull) || defaultValue.GetType () == typeof(Missing)) + return false; + + return true; + } + } +#endif } } diff --git a/mcs/class/corlib/System.Reflection/MonoProperty.cs b/mcs/class/corlib/System.Reflection/MonoProperty.cs index eb1aa06efe..24dcf8b747 100644 --- a/mcs/class/corlib/System.Reflection/MonoProperty.cs +++ b/mcs/class/corlib/System.Reflection/MonoProperty.cs @@ -299,7 +299,7 @@ namespace System.Reflection { { if (index == null || index.Length == 0) { /*FIXME we should check if the number of arguments matches the expected one, otherwise the error message will be pretty criptic.*/ -#if !MONOTOUCH +#if !FULL_AOT_RUNTIME if (cached_getter == null) { MethodInfo method = GetGetMethod (true); if (!DeclaringType.IsValueType && !method.ContainsGenericParameters) { //FIXME find a way to build an invoke delegate for value types. diff --git a/mcs/class/corlib/System.Reflection/ParameterInfo.cs b/mcs/class/corlib/System.Reflection/ParameterInfo.cs index 890dffd3b2..1c00fb96c1 100644 --- a/mcs/class/corlib/System.Reflection/ParameterInfo.cs +++ b/mcs/class/corlib/System.Reflection/ParameterInfo.cs @@ -193,8 +193,7 @@ namespace System.Reflection public virtual IEnumerable<CustomAttributeData> CustomAttributes { get { return GetCustomAttributesData (); } } - - [MonoTODO] + public virtual bool HasDefaultValue { get { throw new NotImplementedException (); } } |