private static void AppendNotFound(int[] ids, int[] contentIds, RelationSecurityInfo result) { if (contentIds.Any()) { var firstContentId = contentIds.First(); var notFound = ids.Where(n => !result.IsItemMappingExists(firstContentId, n)).ToArray(); foreach (var item in contentIds) { foreach (var nfItem in notFound) { result.AppendToItemMapping(item, nfItem, null); } } } }
private static void ProcessSecurityPathSqlReader(SqlDataReader reader, int[] contentIds, string[] classifierNames, RelationSecurityInfo result) { var id = (int)(decimal)reader["id"]; foreach (var item in contentIds) { var ints = Converter.ToInt32Collection((string)reader[item.ToString()], ','); result.AppendToItemMapping(item, id, ints); } if (classifierNames != null) { foreach (var clName in classifierNames) { var clValue = Converter.ToInt32((decimal)reader[clName]); result.AppendToContentMapping(clValue, id); } } }