@@ -23,9 +23,6 @@ public class GenericDictionaryTypeConverter<K, V> : TypeConverter
2323 /// </summary>
2424 protected readonly TypeConverter typeConverterValue ;
2525
26- /// <summary>
27- /// Ctor
28- /// </summary>
2926 public GenericDictionaryTypeConverter ( )
3027 {
3128 typeConverterKey = TypeDescriptor . GetConverter ( typeof ( K ) ) ;
@@ -61,7 +58,7 @@ public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceT
6158 /// <returns>Result</returns>
6259 public override object ConvertFrom ( ITypeDescriptorContext context , CultureInfo culture , object value )
6360 {
64- if ( ! ( value is string ) )
61+ if ( ! ( value is string ) )
6562 return base . ConvertFrom ( context , culture , value ) ;
6663
6764 var input = ( string ) value ;
@@ -71,12 +68,12 @@ public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo c
7168 Array . ForEach ( items , s =>
7269 {
7370 var keyValueStr = string . IsNullOrEmpty ( s ) ? new string [ 0 ] : s . Split ( ',' ) . Select ( x => x . Trim ( ) ) . ToArray ( ) ;
74- if ( keyValueStr . Length != 2 )
71+ if ( keyValueStr . Length != 2 )
7572 return ;
7673
7774 object dictionaryKey = ( K ) typeConverterKey . ConvertFromInvariantString ( keyValueStr [ 0 ] ) ;
7875 object dictionaryValue = ( V ) typeConverterValue . ConvertFromInvariantString ( keyValueStr [ 1 ] ) ;
79- if ( dictionaryKey == null || dictionaryValue == null )
76+ if ( dictionaryKey == null || dictionaryValue == null )
8077 return ;
8178
8279 if ( ! result . ContainsKey ( ( K ) dictionaryKey ) )
@@ -96,11 +93,11 @@ public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo c
9693 /// <returns>Result</returns>
9794 public override object ConvertTo ( ITypeDescriptorContext context , CultureInfo culture , object value , Type destinationType )
9895 {
99- if ( destinationType != typeof ( string ) )
96+ if ( destinationType != typeof ( string ) )
10097 return base . ConvertTo ( context , culture , value , destinationType ) ;
10198
10299 var result = string . Empty ;
103- if ( value == null )
100+ if ( value == null )
104101 return result ;
105102
106103 //we don't use string.Join() because it doesn't support invariant culture
@@ -118,4 +115,4 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul
118115 return result ;
119116 }
120117 }
121- }
118+ }
0 commit comments