From 5a0963c9b850afb48c70383d4bd4c1794752edad Mon Sep 17 00:00:00 2001 From: roelofb Date: Wed, 16 Apr 2008 07:29:05 +0000 Subject: [PATCH] Applied patch from Jan Limpens 'ReflectionBasedDictionaryAdapter needs to check if a Property is not write only before attempting to read from it' git-svn-id: https://svn.castleproject.org/svn/castle/trunk@5002 73e77b4c-caa6-f847-a29a-24ab75ae54b6 --- Core/Castle.Core/ReflectionBasedDictionaryAdapter.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Core/Castle.Core/ReflectionBasedDictionaryAdapter.cs b/Core/Castle.Core/ReflectionBasedDictionaryAdapter.cs index 8317b0b64..cb42996f2 100644 --- a/Core/Castle.Core/ReflectionBasedDictionaryAdapter.cs +++ b/Core/Castle.Core/ReflectionBasedDictionaryAdapter.cs @@ -41,6 +41,7 @@ namespace Castle.Core foreach(PropertyInfo property in targetType.GetProperties(BindingFlags.Public | BindingFlags.Instance)) { + if (!property.CanRead) continue; object value = property.GetValue(target, null); properties[property.Name] = value; @@ -267,4 +268,4 @@ namespace Castle.Core } } } -} \ No newline at end of file +} -- 2.11.4.GIT