C# Класс Nexus.Client.ModManagement.CategoryManager

Наследование: ICategoryManager
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddCategory ( ) : IModCategory

Adds a new category to the list with default values.

AddCategory ( IModCategory p_mctCategory ) : IModCategory

Adds a category to the list.

Backup ( ) : void

This backs up the category file.

CategoryManager ( string p_strModInstallDirectory, string p_strCategoryPath ) : System

A simple constructor that initializes the object with its dependencies.

FindCategory ( Int32 p_intCategoryId ) : IModCategory

Finds the category by Id.

LoadCategories ( string p_strDefaultCategories ) : void

Loads the categories.

ReadVersion ( string p_strCategoryPath ) : System.Version

Reads the category manager version from the given category file.

Release ( ) : void

This disposes of the category manager, allowing it to be re-initialized.

RemoveCategory ( IModCategory p_mctCategory ) : void

Removes a category from the list.

ResetCategories ( Uri p_uriDefaultCategories ) : void

Loads the categories from an online source.

ResetCategories ( string p_strDefaultCategories ) : void

Resets to the repository default categories.

Restore ( string p_strCategoryPath ) : bool

This restores the first valid backup of the category file.

Update ( ModManager p_ModManager, IList p_lstMods, Int32 p_intNewValue, ConfirmActionMethod p_camConfirm ) : IBackgroundTask

Runs the managed updaters.

UpdateCategoryFile ( ) : void

Updates the category file.

Защищенные методы

Метод Описание
IsValid ( string p_strCategoryPath ) : bool

Determines if the category file at the given path is valid.

SaveCategories ( ) : void

Save the data to the category file.

Приватные методы

Метод Описание
LoadCategories ( System.Xml.Linq.XDocument p_docCategories ) : void

Loads the data from the category file.

Описание методов

AddCategory() публичный Метод

Adds a new category to the list with default values.
public AddCategory ( ) : IModCategory
Результат IModCategory

AddCategory() публичный Метод

Adds a category to the list.
public AddCategory ( IModCategory p_mctCategory ) : IModCategory
p_mctCategory IModCategory The being added.
Результат IModCategory

Backup() публичный Метод

This backs up the category file.
public Backup ( ) : void
Результат void

CategoryManager() публичный Метод

A simple constructor that initializes the object with its dependencies.
public CategoryManager ( string p_strModInstallDirectory, string p_strCategoryPath ) : System
p_strModInstallDirectory string The path of the directory where all of the mods are installed.
p_strCategoryPath string The path from which to load the categories.
Результат System

FindCategory() публичный Метод

Finds the category by Id.
public FindCategory ( Int32 p_intCategoryId ) : IModCategory
p_intCategoryId System.Int32 The category Id.
Результат IModCategory

IsValid() защищенный статический Метод

Determines if the category file at the given path is valid.
protected static IsValid ( string p_strCategoryPath ) : bool
p_strCategoryPath string The path of the category file to validate.
Результат bool

LoadCategories() публичный Метод

Loads the categories.
public LoadCategories ( string p_strDefaultCategories ) : void
p_strDefaultCategories string The string containing the default categories.
Результат void

ReadVersion() публичный статический Метод

Reads the category manager version from the given category file.
public static ReadVersion ( string p_strCategoryPath ) : System.Version
p_strCategoryPath string The category file whose version is to be read.
Результат System.Version

Release() публичный Метод

This disposes of the category manager, allowing it to be re-initialized.
public Release ( ) : void
Результат void

RemoveCategory() публичный Метод

Removes a category from the list.
public RemoveCategory ( IModCategory p_mctCategory ) : void
p_mctCategory IModCategory The to be removed.
Результат void

ResetCategories() публичный Метод

Loads the categories from an online source.
public ResetCategories ( Uri p_uriDefaultCategories ) : void
p_uriDefaultCategories System.Uri The online path where the category file is stored.
Результат void

ResetCategories() публичный Метод

Resets to the repository default categories.
public ResetCategories ( string p_strDefaultCategories ) : void
p_strDefaultCategories string The string containing the new category list.
Результат void

Restore() публичный статический Метод

This restores the first valid backup of the category file.
public static Restore ( string p_strCategoryPath ) : bool
p_strCategoryPath string The path to the category folder.
Результат bool

SaveCategories() защищенный Метод

Save the data to the category file.
protected SaveCategories ( ) : void
Результат void

Update() публичный Метод

Runs the managed updaters.
public Update ( ModManager p_ModManager, IList p_lstMods, Int32 p_intNewValue, ConfirmActionMethod p_camConfirm ) : IBackgroundTask
p_ModManager ModManager The Mod Manager.
p_lstMods IList The list of mods to update.
p_intNewValue System.Int32 The new category id value.
p_camConfirm ConfirmActionMethod The delegate to call to confirm an action.
Результат IBackgroundTask

UpdateCategoryFile() публичный Метод

Updates the category file.
public UpdateCategoryFile ( ) : void
Результат void