示例#1
0
 public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
 {
     if (destinationType == typeof(string))
     {
         ClassWithStringConverter c = value as ClassWithStringConverter;
         if (c == null)
         {
             throw new ArgumentException();
         }
         return("(" + c.X.ToString() + "," + c.Y.ToString() + ")");
     }
     return(false);
 }
示例#2
0
 public ClassWithNestedMEExtension2()
 {
     IntData = 1;
     InstanceOfClassWithStringConverter = new ClassWithStringConverter();
     ComplexTypeInstance = new ComplexType();
 }
示例#3
0
 public ComplexTypeExtension2()
 {
     IntData = 100;
     InstanceOfClassWithStringConverter = new ClassWithStringConverter();
 }
示例#4
0
 public MEWithStringConvertersContainer()
 {
     InstanceOfClassWithStringConverter  = new ClassWithStringConverter();
     this.InstanceOfClassWithMEConverter = new ClassWithNestedMEConverter2();
 }