示例#1
0
 public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
 {
     if (value is string)
     {
         return(DiscoveryVersion.FromName((string)value));
     }
     else
     {
         return(base.ConvertFrom(context, culture, value));
     }
 }
示例#2
0
 public void ValidName()
 {
     DiscoveryVersion.FromName("WSDiscovery11");
     DiscoveryVersion.FromName("WSDiscoveryApril2005");
     DiscoveryVersion.FromName("WSDiscoveryCD1");
 }
示例#3
0
 public void InvalidName()
 {
     DiscoveryVersion.FromName("foobar");
 }
示例#4
0
 public void EmptyName()
 {
     DiscoveryVersion.FromName(String.Empty);
 }
示例#5
0
 public void NullName()
 {
     DiscoveryVersion.FromName(null);
 }