示例#1
0
        public string[] GetPathTo(DatabaseItem databaseItem)
        {
            var result = DescendantExtensions.EnumerateDescendants(
                0x100,
                fid => _edges.Any(e => e.Item1 == fid),
                fid => _edges.Where(e => e.Item1 == fid).Select(e => e.Item2));

            // TODO: Add a call to .First or .Single here.

            return result
                .Select(fid => _databaseItems.Single(x => x.Id == fid))
                .Select(item => item.Title)
                .ToArray();
        }
示例#2
0
 private static DatabaseItem BuildItem(int id, int length, Dictionary<string, string> dictionary)
 {
     // TODO: Items with id >= 0x100 are required to have a valid type. We should probably enforce that.
     DatabaseItem item = new DatabaseItem(id, length, dictionary);
     return item;
 }
 public EmpegSynchronizationItem(EmpegCarPlaylists playlists, DatabaseItem databaseItem)
 {
     _playlists = playlists;
     _databaseItem = databaseItem;
 }