Initial support for Dictionary type... (only so I won't forget how to)

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@855 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2010-08-24 10:36:47 +00:00
parent d0c061e7f2
commit 8eafe91ce0

View file

@ -210,6 +210,10 @@ namespace Greenshot.Core {
field.SetValue(section, list);
}
} else if (fieldType.IsGenericType && fieldType.GetGenericTypeDefinition() == typeof(Dictionary<,>)) {
Type type1 = fieldType.GetGenericArguments()[0];
Type type2 = fieldType.GetGenericArguments()[1];
LOG.Info(String.Format("Found Dictionary<{0},{1}>",type1.Name, type2.Name));
} else {
if (fieldType.IsGenericType && fieldType.GetGenericTypeDefinition().Equals(typeof(Nullable<>))) {
// We are dealing with a generic type that is nullable