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);