示例#1
0
        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
        {
            var gt = value as IGeometryTap;

            if (gt != null)
            {
                if (destinationType == typeof(string))
                {
                    var sink = new WktSink();
                    gt.Populate(sink);
                    return(sink.ToString());
                }
            }

            return(base.ConvertTo(context, culture, value, destinationType));
        }
示例#2
0
        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
        {
            var gt=value as IGeometryTap;
            if (gt!=null)
            {
                if (destinationType==typeof(string))
                {
                    var sink=new WktSink();
                    gt.Populate(sink);
                    return sink.ToString();
                }
            }

            return base.ConvertTo(context, culture, value, destinationType);
        }