Beispiel #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);
        }
Beispiel #2
0
        public override object ProvideValue(IServiceProvider serviceProvider)
        {
            ClassWithMEConverterWithParamCstrArgs c = new ClassWithMEConverterWithParamCstrArgs();

            return(c);
        }