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

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez Gual <lluis@xamarin.com>2015-04-20 19:07:51 +0300
committerLluis Sanchez Gual <lluis@xamarin.com>2015-04-20 19:07:51 +0300
commit95408b1a41b31b645f3a8c3323ab7d3ca4bff26b (patch)
treef8f137cddcb9a40499d303be95722fd2c6081bce /main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/PropertySystem/ShellProperty.cs
parentb70e4e04b4e41b8ec28d7e4b220b401ecf467e7a (diff)
parentde043d330a8bf5855d4d983c804cd36727cb2406 (diff)
Merge remote-tracking branch 'origin/roslyn' into new-project-model
Diffstat (limited to 'main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/PropertySystem/ShellProperty.cs')
-rw-r--r--main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/PropertySystem/ShellProperty.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/PropertySystem/ShellProperty.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/PropertySystem/ShellProperty.cs
index ef4167876c..93650334e4 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/PropertySystem/ShellProperty.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/PropertySystem/ShellProperty.cs
@@ -195,14 +195,15 @@ namespace Microsoft.WindowsAPICodePack.Shell.PropertySystem
// Make sure we use the correct type
Debug.Assert(ValueType == ShellPropertyFactory.VarEnumToSystemType(Description.VarEnumType));
- if (typeof(T) != ValueType)
+ var type = typeof(T);
+ if (type != ValueType)
{
throw new NotSupportedException(
string.Format(System.Globalization.CultureInfo.InvariantCulture,
LocalizedMessages.ShellPropertyWrongType, ValueType.Name));
}
- if (value is Nullable)
+ if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>))
{
Type t = typeof(T);
PropertyInfo pi = t.GetProperty("HasValue");