C# Класс Nexus.Client.ModRepositories.Nexus.NexusModRepository

The Nexus mod repository is the repository hosted with the Nexus group of websites.
Наследование: IModRepository
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
Convert IModInfo
GetBestFileserver List
GetFileInfoForFile NexusModFileInfo
GetUserCredentials void
UserStatusUpdateEvent void

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

Метод Описание
FindMods ( string p_strModNameSearchString, bool p_booIncludeAllTerms ) : IList

Finds the mods containing the given search terms.

FindMods ( string p_strModNameSearchString, string p_strAuthorSearchString ) : IList

Finds the mods by Author name.

FindMods ( string p_strModNameSearchString, string p_strModAuthor, bool p_booIncludeAllTerms ) : IList

Finds the mods containing the given search terms.

GetDefaultFileInfo ( string p_strModId ) : IModFileInfo

Gets the file info for the default file of the speficied mod.

GetFileInfo ( string p_strModId, string p_strFileId ) : IModFileInfo

Gets the file info for the specified download file of the specified mod.

GetFileInfoForFile ( string p_strFilename ) : IModFileInfo

Gets the file info for the specified download file.

GetFilePartInfo ( string p_strModId, string p_strFileId, string p_strUserLocation, string &p_strRepositoryMessage ) : List

Gets the URLs of the file parts for the default download file of the specified mod.

GetFilePartUrls ( string p_strModId, string p_strFileId ) : System.Uri[]

Gets the URLs of the file parts for the default download file of the specified mod.

GetModFileInfo ( string p_strModId ) : IList

Gets the list of files for the specified mod.

GetModInfo ( string p_strModId ) : IModInfo

Gets the info for the specifed mod.

GetModInfoForFile ( string p_strFilename ) : IModInfo

Gets the mod info for the mod to which the specified download file belongs.

GetModListInfo ( List p_lstModList ) : List

Gets the info for the specifed mod list.

GetRepository ( IGameMode p_gmdGameMode ) : IModRepository

Gets an instance of the Nexus mod repository.

Login ( string>.Dictionary p_dicTokens ) : bool

Logs the user into the mod repository.

Login ( string p_strUsername, string p_strPassword, string>.Dictionary &p_dicTokens ) : bool

Logs the user into the mod repository.

Logout ( ) : void

Logs the user out of the mod repository.

NexusModRepository ( IGameMode p_gmdGameMode ) : System

A simple constructor the initializes the object with the required dependencies.

ToggleEndorsement ( string p_strModId, int p_intLocalState ) : bool

Toggles the mod Endorsement state.

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

Метод Описание
GetProxyFactory ( ) : ChannelFactory

Returns a factory that is used to create proxies to the repository.

GetProxyFactory ( bool p_booIsGatekeeper ) : ChannelFactory

Returns a factory that is used to create proxies to the repository.

GetProxyFactory ( bool p_booIsGatekeeper, long p_timeout ) : ChannelFactory

Returns a factory that is used to create proxies to the repository.

GetProxyFactory ( long p_timeout ) : ChannelFactory

Returns a factory that is used to create proxies to the repository.

ParseModIdFromFilename ( string p_strFilename, IModInfo &p_mifInfo ) : string

Parses out the mod id from the given mod file name.

SetFileServerZones ( ) : void
SetWebsite ( IGameMode p_gmdGameMode ) : void

Sets the service endpoint to use for the given game mode.

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

Метод Описание
Convert ( NexusModInfo p_nmiNexusModInfo ) : IModInfo

Converts the native Nexus repository mod info data structure into an IModInfo structure.

GetBestFileserver ( List fsiList, string p_strUserLocation, string &p_strRepositoryMessage ) : List
GetFileInfoForFile ( string p_strFilename, IModInfo &p_mifInfo ) : NexusModFileInfo

Gets the file info for the specified download file.

GetUserCredentials ( ) : void

Gets the user's membership status.

UserStatusUpdateEvent ( ) : void

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

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

Finds the mods containing the given search terms.
Thrown if the repository cannot be reached.
public FindMods ( string p_strModNameSearchString, bool p_booIncludeAllTerms ) : IList
p_strModNameSearchString string The terms to use to search for mods.
p_booIncludeAllTerms bool Whether the returned mods' names should include all of /// the given search terms.
Результат IList

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

Finds the mods by Author name.
Thrown if the repository cannot be reached.
public FindMods ( string p_strModNameSearchString, string p_strAuthorSearchString ) : IList
p_strModNameSearchString string The terms to use to search for mods.
p_strAuthorSearchString string The Author to use to search for mods.
Результат IList

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

Finds the mods containing the given search terms.
Thrown if the repository cannot be reached.
public FindMods ( string p_strModNameSearchString, string p_strModAuthor, bool p_booIncludeAllTerms ) : IList
p_strModNameSearchString string The terms to use to search for mods.
p_strModAuthor string The Mod author.
p_booIncludeAllTerms bool Whether the returned mods' names should include all of /// the given search terms.
Результат IList

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

Gets the file info for the default file of the speficied mod.
Thrown if the repository cannot be reached.
public GetDefaultFileInfo ( string p_strModId ) : IModFileInfo
p_strModId string The id of the mod the whose default file's metadata is to be retrieved.
Результат IModFileInfo

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

Gets the file info for the specified download file of the specified mod.
Thrown if the repository is not available. Thrown if the repository cannot be reached.
public GetFileInfo ( string p_strModId, string p_strFileId ) : IModFileInfo
p_strModId string The id of the mod the whose file's metadata is to be retrieved.
p_strFileId string The id of the download file whose metadata is to be retrieved.
Результат IModFileInfo

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

Gets the file info for the specified download file.
public GetFileInfoForFile ( string p_strFilename ) : IModFileInfo
p_strFilename string The name of the file whose info is to be returned..
Результат IModFileInfo

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

Gets the URLs of the file parts for the default download file of the specified mod.
Thrown if the repository cannot be reached.
public GetFilePartInfo ( string p_strModId, string p_strFileId, string p_strUserLocation, string &p_strRepositoryMessage ) : List
p_strModId string The id of the mod whose default download file's parts' URLs are to be retrieved.
p_strFileId string The id of the file whose parts' URLs are to be retrieved.
p_strUserLocation string The preferred user location.
p_strRepositoryMessage string Custom repository message, if needed.
Результат List

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

Gets the URLs of the file parts for the default download file of the specified mod.
Thrown if the repository cannot be reached.
public GetFilePartUrls ( string p_strModId, string p_strFileId ) : System.Uri[]
p_strModId string The id of the mod whose default download file's parts' URLs are to be retrieved.
p_strFileId string The id of the file whose parts' URLs are to be retrieved.
Результат System.Uri[]

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

Gets the list of files for the specified mod.
Thrown if the repository cannot be reached.
public GetModFileInfo ( string p_strModId ) : IList
p_strModId string The id of the mod whose list of files is to be returned.
Результат IList

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

Gets the info for the specifed mod.
Thrown if the repository cannot be reached.
public GetModInfo ( string p_strModId ) : IModInfo
p_strModId string The id of the mod info is be retrieved.
Результат IModInfo

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

Gets the mod info for the mod to which the specified download file belongs.
public GetModInfoForFile ( string p_strFilename ) : IModInfo
p_strFilename string The name of the file whose mod's info is to be returned..
Результат IModInfo

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

Gets the info for the specifed mod list.
Thrown if the repository cannot be reached.
public GetModListInfo ( List p_lstModList ) : List
p_lstModList List The mod list to.
Результат List

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

Returns a factory that is used to create proxies to the repository.
protected GetProxyFactory ( ) : ChannelFactory
Результат ChannelFactory

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

Returns a factory that is used to create proxies to the repository.
protected GetProxyFactory ( bool p_booIsGatekeeper ) : ChannelFactory
p_booIsGatekeeper bool Whether or not we are communicating with the gatekeeper.
Результат ChannelFactory

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

Returns a factory that is used to create proxies to the repository.
protected GetProxyFactory ( bool p_booIsGatekeeper, long p_timeout ) : ChannelFactory
p_booIsGatekeeper bool Whether or not we are communicating with the gatekeeper.
p_timeout long The timeout value.
Результат ChannelFactory

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

Returns a factory that is used to create proxies to the repository.
protected GetProxyFactory ( long p_timeout ) : ChannelFactory
p_timeout long
Результат ChannelFactory

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

Gets an instance of the Nexus mod repository.
public static GetRepository ( IGameMode p_gmdGameMode ) : IModRepository
p_gmdGameMode IGameMode The current game mode.
Результат IModRepository

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

Logs the user into the mod repository.
public Login ( string>.Dictionary p_dicTokens ) : bool
p_dicTokens string>.Dictionary The authentication tokens with which to login.
Результат bool

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

Logs the user into the mod repository.
Thrown if the repository is not available.
public Login ( string p_strUsername, string p_strPassword, string>.Dictionary &p_dicTokens ) : bool
p_strUsername string The username of the account with which to login.
p_strPassword string The password of the account with which to login.
p_dicTokens string>.Dictionary The returned tokens that can be used to login instead of the username/password /// credentials.
Результат bool

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

Logs the user out of the mod repository.
public Logout ( ) : void
Результат void

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

A simple constructor the initializes the object with the required dependencies.
public NexusModRepository ( IGameMode p_gmdGameMode ) : System
p_gmdGameMode IGameMode The game mode for which mods are being managed.
Результат System

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

Parses out the mod id from the given mod file name.
protected ParseModIdFromFilename ( string p_strFilename, IModInfo &p_mifInfo ) : string
p_strFilename string The filename from which to parse the mod id.
p_mifInfo IModInfo The mod info for the mod identified by the parsed mod id.
Результат string

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

protected SetFileServerZones ( ) : void
Результат void

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

Sets the service endpoint to use for the given game mode.
protected SetWebsite ( IGameMode p_gmdGameMode ) : void
p_gmdGameMode IGameMode The game mode for which mods are being managed.
Результат void

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

Toggles the mod Endorsement state.
Thrown if the repository cannot be reached.
public ToggleEndorsement ( string p_strModId, int p_intLocalState ) : bool
p_strModId string The mod ID.
p_intLocalState int The local Endorsement state.
Результат bool