C# 클래스 TVSorter.Storage.Xml

Class that manages access to the XML file.
상속: IStorageProvider
파일 보기 프로젝트 열기: a-jackson/tvsorter

공개 메소드들

메소드 설명
GetDuplicateEpisodes ( ) : IEnumerable

Gets the episodes that have more than 1 file grouped by show.

GetMissingEpisodes ( ) : IEnumerable

Gets the episodes that are missing grouped by show.

GetName ( string name ) : System.Xml.Linq.XName

Gets the XName for a name.

LoadMissingEpisodeSettings ( MissingEpisodeSettings settings ) : void

Loads the missing episode settings from the XML file.

LoadSettings ( Settings settings ) : void

Reads the settings from the XML file.

LoadTvShows ( ) : IEnumerable

Loads all the TVShows from the XML file.

RemoveShow ( TvShow show ) : void

Removes the specified show from the storage.

SaveEpisode ( Episode episode ) : void

Saves the specified episode.

SaveMissingEpisodeSettings ( MissingEpisodeSettings settings ) : void

Saves the missing episode settings into the XML file.

SaveSettings ( Settings settings ) : void

Saves the specified settings into the XML file.

SaveShow ( TvShow show ) : void

Saves the specified show. Updates if it already exists and adds if it doesn't

SaveShows ( IEnumerable shows ) : void

Saves a collection of shows.

Xml ( ) : System

Initializes a new instance of the Xml class. Initialises a new instance of the TvShowXml class.

비공개 메소드들

메소드 설명
GetDocument ( ) : void

Get the XDocument instance of the XML file.

GetEpisodes ( bool>.Func fileCountSelector ) : IEnumerable

Gets the episodes based on the specified function of file count.

Initialise ( ) : void

Initialises the class for reading the XML file.

NewTvShow ( System.Xml.Linq.XElement element ) : TvShow

Gets a new TVShow from the specified element.

OnSettingsSaved ( ) : void

Fires the SettingsSaved event.

OnTvShowAdded ( TvShow show ) : void

Fires a TVShow added event.

OnTvShowChanged ( TvShow show ) : void

Fires a TvShowChanged event.

OnTvShowRemoved ( TvShow show ) : void

Fires a TvShowRemoved event.

SanitizeXml ( System.Xml.Linq.XElement root ) : void

Santizes the XML file of empty namespaces

UpdateToVersion2 ( System.Xml.Linq.XElement root ) : void

Updates the specified element to XML format version 2.

UpdateToVersion3 ( System.Xml.Linq.XElement root ) : void

Updates the XML to verison 3.

UpdateToVersion4 ( System.Xml.Linq.XElement root ) : void

Updates the XML to version 4

UpdateToVersion5 ( System.Xml.Linq.XElement root ) : void

Updates the xml to version 5

ValidateXml ( string schema ) : void

Validates the XML file against the specified schema.

메소드 상세

GetDuplicateEpisodes() 공개 메소드

Gets the episodes that have more than 1 file grouped by show.
public GetDuplicateEpisodes ( ) : IEnumerable
리턴 IEnumerable

GetMissingEpisodes() 공개 메소드

Gets the episodes that are missing grouped by show.
public GetMissingEpisodes ( ) : IEnumerable
리턴 IEnumerable

GetName() 공개 정적인 메소드

Gets the XName for a name.
public static GetName ( string name ) : System.Xml.Linq.XName
name string /// The name to get. ///
리턴 System.Xml.Linq.XName

LoadMissingEpisodeSettings() 공개 메소드

Loads the missing episode settings from the XML file.
public LoadMissingEpisodeSettings ( MissingEpisodeSettings settings ) : void
settings TVSorter.Model.MissingEpisodeSettings /// The settings to load into. ///
리턴 void

LoadSettings() 공개 메소드

Reads the settings from the XML file.
public LoadSettings ( Settings settings ) : void
settings TVSorter.Model.Settings /// The settings to set from the XML. ///
리턴 void

LoadTvShows() 공개 메소드

Loads all the TVShows from the XML file.
public LoadTvShows ( ) : IEnumerable
리턴 IEnumerable

RemoveShow() 공개 메소드

Removes the specified show from the storage.
public RemoveShow ( TvShow show ) : void
show TvShow /// The show to remove. ///
리턴 void

SaveEpisode() 공개 메소드

Saves the specified episode.
public SaveEpisode ( Episode episode ) : void
episode Episode /// The episode to save. ///
리턴 void

SaveMissingEpisodeSettings() 공개 메소드

Saves the missing episode settings into the XML file.
public SaveMissingEpisodeSettings ( MissingEpisodeSettings settings ) : void
settings TVSorter.Model.MissingEpisodeSettings /// The settings to save. ///
리턴 void

SaveSettings() 공개 메소드

Saves the specified settings into the XML file.
public SaveSettings ( Settings settings ) : void
settings TVSorter.Model.Settings /// The settings to save. ///
리턴 void

SaveShow() 공개 메소드

Saves the specified show. Updates if it already exists and adds if it doesn't
public SaveShow ( TvShow show ) : void
show TvShow /// The show to save. ///
리턴 void

SaveShows() 공개 메소드

Saves a collection of shows.
public SaveShows ( IEnumerable shows ) : void
shows IEnumerable /// The shows to save. ///
리턴 void

Xml() 공개 메소드

Initializes a new instance of the Xml class. Initialises a new instance of the TvShowXml class.
public Xml ( ) : System
리턴 System