Remove the unused type converter for CommaDelimitedStringCollection (#11000)

This commit is contained in:
Ilya
2019-11-13 12:33:39 -08:00
committed by Dongbo Wang
parent 57a4d4c721
commit 525dcfeacb
@@ -2426,23 +2426,7 @@ namespace System.Management.Automation
valueToConvert.ToString(), resultType.ToString(), wmiClassException.Message);
}
}
#endif
// System.Configuration.CommaDelimitedStringCollection is derived from the StringCollection class
private static System.Configuration.CommaDelimitedStringCollection ConvertToCommaDelimitedStringCollection(object valueToConvert,
Type resultType,
bool recursion,
PSObject originalValueToConvert,
IFormatProvider formatProvider,
TypeTable backupTable)
{
typeConversion.WriteLine("Standard type conversion to a CommaDelimitedStringCollection.");
var commaDelimitedStringCollection = new System.Configuration.CommaDelimitedStringCollection();
AddItemsToCollection(valueToConvert, resultType, formatProvider, backupTable, commaDelimitedStringCollection);
return commaDelimitedStringCollection;
}
#if !UNIX
private static DirectoryEntry ConvertToADSI(object valueToConvert,
Type resultType,
bool recursion,
@@ -5006,14 +4990,6 @@ namespace System.Management.Automation
return CacheConversion<StringCollection>(fromType, toType, LanguagePrimitives.ConvertToStringCollection, rank);
}
#if !CORECLR // No CommaDelimitedStringCollection In CoreCLR
if (toType == typeof(System.Configuration.CommaDelimitedStringCollection))
{
ConversionRank rank = (fromType.IsArray || IsTypeEnumerable(fromType)) ? ConversionRank.Language : ConversionRank.LanguageS2A;
return CacheConversion<System.Configuration.CommaDelimitedStringCollection>(fromType, toType, LanguagePrimitives.ConvertToCommaDelimitedStringCollection, rank);
}
#endif
if (toType.IsSubclassOf(typeof(System.Delegate))
&& (fromType == typeof(ScriptBlock) || fromType.IsSubclassOf(typeof(ScriptBlock))))
{