public static bool AddOrUpdate(this IFileData fileData, IEnumerable <MetaDataItem> metaDataItems, ISet <string> names) { var source = fileData.MetaDatas.ToDictionary( metaDataItem => metaDataItem.Name, StringComparer.OrdinalIgnoreCase ); foreach (var metaDataItem in metaDataItems) { if (fileData.AddOrUpdate(source, metaDataItem.Name, metaDataItem.Type, metaDataItem.Value)) { names.Add(metaDataItem.Name); } } return(names.Any()); }
public static bool AddOrUpdate(this IFileData fileData, IEnumerable <MetaDataItem> metaDataItems, out ISet <string> names) { names = new HashSet <string>(StringComparer.OrdinalIgnoreCase); return(fileData.AddOrUpdate(metaDataItems, names)); }
public static bool AddOrUpdate(this IFileData fileData, Func <IDictionary <string, MetaDataItem>, IEnumerable <MetaDataItem> > factory, out ISet <string> names) { names = new HashSet <string>(StringComparer.OrdinalIgnoreCase); return(fileData.AddOrUpdate(factory, names)); }