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

            ClassWithNestedMEConverter2 instance = value as ClassWithNestedMEConverter2;

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

            ClassWithNestedMEExtension2 extension = new ClassWithNestedMEExtension2();

            return(extension);
        }
Пример #2
0
        public override object ProvideValue(IServiceProvider serviceProvider)
        {
            ClassWithNestedMEConverter2 c = new ClassWithNestedMEConverter2();

            return(c);
        }