private LibraryItem CreateFolderLibraryItem(string folder) { var libraryItem = new LibraryItem { ItemType = ItemType.Folder, Name = folder.Replace(_rootFolder, "") }; ItemParsed?.Invoke(this, new ItemParsedEventArgs(libraryItem.ToString())); return(libraryItem); }
private LibraryItem CreateFileLibraryItem(string file) { var itemType = GetItemType(file); if (_includeScope == Scope.MusicOnly && itemType != ItemType.MusicFile) { return(null); } var libraryItem = new LibraryItem { ItemType = itemType, Name = file.Replace(_rootFolder, ""), Size = (_includeSize)?GetItemSize(file):0 }; ItemParsed?.Invoke(this, new ItemParsedEventArgs(libraryItem.ToString())); return(libraryItem); }
/// <summary> /// Обработчик добавления Stead. /// </summary> /// <param name="s">Отправитель</param> /// <param name="item">Обработанный документ</param> protected virtual void OnItemParsed(object s, House item) { ItemParsed?.Invoke(s, new HouseEventArgs(item, Count)); }
/// <summary> /// Обработчик добавления Stead. /// </summary> /// <param name="s">Отправитель</param> /// <param name="item">Обработанный документ</param> protected virtual void OnItemParsed(object s, Room item) { ItemParsed?.Invoke(s, new RoomEventArgs(item, Count)); }