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