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

            ClassWithMEConverterWithCstrArgs instance = value as ClassWithMEConverterWithCstrArgs;

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

            ClassWithMEWithCstrArgsExtension extension = new ClassWithMEWithCstrArgsExtension();

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

            return(c);
        }