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

            ClassWithNonAttributableMEConverter instance = value as ClassWithNonAttributableMEConverter;

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

            ClassWithNonAttributableMEExtension extension = new ClassWithNonAttributableMEExtension();

            return(extension);
        }
Example #2
0
        public override object ProvideValue(IServiceProvider serviceProvider)
        {
            ClassWithNonAttributableMEConverter c = new ClassWithNonAttributableMEConverter();

            return(c);
        }