aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/GraphicObject.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2016-02-05 12:10:55 +0100
committerjpbruyere <jp.bruyere@hotmail.com>2016-02-05 12:10:55 +0100
commit6a6ea678c5d0520816753e2baaffc4adf97b36af (patch)
tree9e7e69772b40e8cd3e821cf7a2ace332715ce35f /src/GraphicObjects/GraphicObject.cs
parent016421c29b8daf86c273f919a4e3e13faefc5639 (diff)
code clean
Diffstat (limited to 'src/GraphicObjects/GraphicObject.cs')
-rw-r--r--src/GraphicObjects/GraphicObject.cs19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs
index ffdaa47c..c0f9bab0 100644
--- a/src/GraphicObjects/GraphicObject.cs
+++ b/src/GraphicObjects/GraphicObject.cs
@@ -1243,7 +1243,7 @@ namespace Crow
if (string.IsNullOrEmpty (attValue))
continue;
-
+
MemberInfo mi = thisType.GetMember (attName).FirstOrDefault();
if (mi == null) {
Debug.WriteLine ("GOML: Unknown attribute in " + thisType.ToString() + " : " + attName);
@@ -1256,8 +1256,10 @@ namespace Crow
if (mi.MemberType == MemberTypes.Property) {
PropertyInfo pi = mi as PropertyInfo;
- if (pi.GetSetMethod () == null)
+ if (pi.GetSetMethod () == null) {
+ Debug.WriteLine ("GOML: Read only property in " + thisType.ToString() + " : " + attName);
continue;
+ }
bool isAttribute = false;
object defaultValue = null;
@@ -1278,19 +1280,6 @@ namespace Crow
}
if (!isAttribute)
continue;
-// {
-// //avoid system types automaticaly converted by parser
-// if (defaultValue != null && !pi.PropertyType.Namespace.StartsWith("System")) {
-// if (pi.PropertyType != defaultValue.GetType()) {
-// MethodInfo miParse = pi.PropertyType.GetMethod ("Parse", BindingFlags.Static | BindingFlags.Public);
-// if (miParse != null) {
-// pi.SetValue (this, miParse.Invoke (null, new object[]{ defaultValue }), null);
-// continue;
-// }
-// }
-// }
-// pi.SetValue (this, defaultValue, null);
-// } else {
if (attValue.StartsWith("{")) {
//binding