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