示例#1
0
        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
        {
            if (destinationType != typeof(MarkupExtension))
            {
                throw new ArgumentException();
            }

            ClassWithMEConverter instance = value as ClassWithMEConverter;

            if (null == instance)
            {
                throw new ArgumentException();
            }

            ClassWithMEExtension extension = new ClassWithMEExtension();

            return(extension);
        }
示例#2
0
        public override object ProvideValue(IServiceProvider serviceProvider)
        {
            ClassWithMEConverter c = new ClassWithMEConverter();

            return(c);
        }