From 673848563ef2a209b5aa50297a58dcfbf40969cd Mon Sep 17 00:00:00 2001 From: apobekiaris Date: Fri, 28 Dec 2012 21:15:56 +0200 Subject: [PATCH] Interfacebuilder bugs http://www.expandframework.com/forum/6-bugs/3097-cant-start-fc-web-in-122415.html#3097 --- .../ModelAdapter/InterfaceBuilder.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Xpand/Xpand.Persistent/Xpand.Persistent.Base/ModelAdapter/InterfaceBuilder.cs b/Xpand/Xpand.Persistent/Xpand.Persistent.Base/ModelAdapter/InterfaceBuilder.cs index 26f4013ae8..ef37dc21a0 100644 --- a/Xpand/Xpand.Persistent/Xpand.Persistent.Base/ModelAdapter/InterfaceBuilder.cs +++ b/Xpand/Xpand.Persistent/Xpand.Persistent.Base/ModelAdapter/InterfaceBuilder.cs @@ -318,19 +318,19 @@ string GetAttributeCode(object attribute, DynamicModelPropertyInfo info) { var typeConverterAttribute = attribute as TypeConverterAttribute; if (typeConverterAttribute != null) { var type = Type.GetType((typeConverterAttribute).ConverterTypeName); - if (type != null && type.IsPublic) + if (type != null && type.IsPublic && !type.FullName.Contains(".Design.")) return string.Format("{1}(typeof({0}))", type.FullName, TypeToString(attribute.GetType())); return null; } Type attributeType = attribute.GetType(); - // if (attributeType == typeof(DXDescriptionAttribute)) { - // string description = ((DXDescriptionAttribute)attribute).Description.Replace(@"""", @""""""); - // return string.Format(@"{1}(@""{0}"")", description, TypeToString(typeof(DescriptionAttribute))); - // } - // if (typeof(DescriptionAttribute).IsAssignableFrom(attributeType)) { - // string description = ((DescriptionAttribute)attribute).Description.Replace(@"""", @""""""); - // return string.Format(@"{1}(@""{0}"")", description, TypeToString(typeof(DescriptionAttribute))); - // } + if (attributeType == typeof(DXDescriptionAttribute)) { + string description = ((DXDescriptionAttribute)attribute).Description.Replace(@"""", @""""""); + return string.Format(@"{1}(@""{0}"")", description, TypeToString(typeof(DescriptionAttribute))); + } + if (typeof(DescriptionAttribute).IsAssignableFrom(attributeType)) { + string description = ((DescriptionAttribute)attribute).Description.Replace(@"""", @""""""); + return string.Format(@"{1}(@""{0}"")", description, TypeToString(typeof(DescriptionAttribute))); + } if (attributeType == typeof(DefaultValueAttribute)) { string value = GetStringValue(((DefaultValueAttribute)attribute).Value); return string.Format(@"System.ComponentModel.DefaultValue({0})", value);