C# Class Nexus.Client.ModRepositories.Nexus.NexusModRepository

The Nexus mod repository is the repository hosted with the Nexus group of websites.
Inheritance: IModRepository
Afficher le fichier Open project: NexusMods/NexusModManager-4.5

Private Properties

Свойство Type Description
Convert IModInfo
GetBestFileserver List
GetFileInfoForFile NexusModFileInfo
GetUserCredentials void
UserStatusUpdateEvent void

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
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

Method Details

FindMods() public méthode

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.
Résultat IList

FindMods() public méthode

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.
Résultat IList

FindMods() public méthode

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.
Résultat IList

GetDefaultFileInfo() public méthode

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.
Résultat IModFileInfo

GetFileInfo() public méthode

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.
Résultat IModFileInfo

GetFileInfoForFile() public méthode

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..
Résultat IModFileInfo

GetFilePartInfo() public méthode

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.
Résultat List

GetFilePartUrls() public méthode

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.
Résultat System.Uri[]

GetModFileInfo() public méthode

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.
Résultat IList

GetModInfo() public méthode

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.
Résultat IModInfo

GetModInfoForFile() public méthode

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..
Résultat IModInfo

GetModListInfo() public méthode

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.
Résultat List

GetProxyFactory() protected méthode

Returns a factory that is used to create proxies to the repository.
protected GetProxyFactory ( ) : ChannelFactory
Résultat ChannelFactory

GetProxyFactory() protected méthode

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.
Résultat ChannelFactory

GetProxyFactory() protected méthode

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.
Résultat ChannelFactory

GetProxyFactory() protected méthode

Returns a factory that is used to create proxies to the repository.
protected GetProxyFactory ( long p_timeout ) : ChannelFactory
p_timeout long
Résultat ChannelFactory

GetRepository() public static méthode

Gets an instance of the Nexus mod repository.
public static GetRepository ( IGameMode p_gmdGameMode ) : IModRepository
p_gmdGameMode IGameMode The current game mode.
Résultat IModRepository

Login() public méthode

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.
Résultat bool

Login() public méthode

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.
Résultat bool

Logout() public méthode

Logs the user out of the mod repository.
public Logout ( ) : void
Résultat void

NexusModRepository() public méthode

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.
Résultat System

ParseModIdFromFilename() protected méthode

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.
Résultat string

SetFileServerZones() protected méthode

protected SetFileServerZones ( ) : void
Résultat void

SetWebsite() protected méthode

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.
Résultat void

ToggleEndorsement() public méthode

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.
Résultat bool