public string[] FlattenToStrings(object[] results) { object[] flattened = Plugins.Flatten(results); List <string> strings = new List <string>(); foreach (object result in flattened) { strings.Add(result as string); } return(strings.ToArray()); }
public static IEnumerable <string> FlattenToStrings(IEnumerable <object> results) { IEnumerable <object> flattened = PluginServices.Flatten(results); return(flattened.Select(result => result as string).ToArray()); }
public static string[] FlattenToStrings(object[] results) { object[] flattened = PluginServices.Flatten(results); return(flattened.Select(result => result as string).ToArray()); }