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

            ClassWithMEConverterWithParamCstrArgs instance = value as ClassWithMEConverterWithParamCstrArgs;

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

            ClassWithMEWithParamCstrArgsExtension extension = new ClassWithMEWithParamCstrArgsExtension(new int[] { 1, 2, 3 });

            return(extension);
        }
Exemplo n.º 2
0
        public override object ProvideValue(IServiceProvider serviceProvider)
        {
            ClassWithMEConverterWithParamCstrArgs c = new ClassWithMEConverterWithParamCstrArgs();

            return(c);
        }