C# 클래스 Nexus.Client.Games.Gamebryo.PluginManagement.Sorter.PluginSorter

The interface for Plugin Sorter functionality.
This use LOOT API to expose PluginSorter's sorting and activation abilities.
상속: IPluginSorter, IDisposable
파일 보기 프로젝트 열기: NexusMods/NexusModManager-4.5 1 사용 예제들

공개 메소드들

메소드 설명
Dispose ( ) : void

Disposes of any resources that the sorter allocated.

MasterlistHasUpdate ( ) : bool

Updates the masterlist at the given path.

PluginSorter ( IEnvironmentInfo p_eifEnvironmentInfo, GamebryoGameModeBase p_gmdGameMode, FileUtil p_futFileUtility, string p_strMasterlistPath ) : System

A simple constructor that initializes the object with the given dependencies.

SetLoadOrder ( string p_strPlugins ) : void

Sets the load order of the plugins.

The returned list of sorted plugins will include plugins that were not included in the specified order list, if plugins exist that weren't included. The extra plugins will be apeended to the end of the given order.

SortPlugins ( string p_strPlugins ) : string[]

Sorts the plugins.

UpdateMasterlist ( ) : void

Updates the masterlist at the given path.

보호된 메소드들

메소드 설명
AddPluginDirectory ( string p_strPlugin ) : string

Makes the given plugin path absolute.

Dispose ( bool p_booDisposing ) : void

Disposes of the unamanged resources need for SORTERAPI.

Load ( string p_strMasterlistPath, string p_strUserlistPath ) : void

Loads the specified masterlist.

Loads the masterlist and userlist from the paths specified. Can be called multiple times. On error, the database is unchanged.

MarshalPluginArray ( IntPtr p_ptrPluginArray, UInt32 p_uintLength, bool p_booKeepRelativePath ) : string[]

Marshal the given pointer to an array of plugins.

This adjusts the plugin paths to be in the format expected by the mod manager.

StripPluginDirectory ( string p_strPlugin ) : string

Removes the plugin directory from the given plugin path.

BAPI expects plugin paths to be relative to the plugins directory. This adjusts the plugin path for that purpose.

StripPluginDirectory ( string p_strPlugins ) : string[]

Removes the plugin directory from the given plugin paths.

BAPI expects plugin paths to be relative to the plugins directory. This adjusts the plugin paths for that purpose.

비공개 메소드들

메소드 설명
Backup ( ) : void

Backup the plugins.txt and loadorder.txt files

CreateSorterDb ( ) : IntPtr

Creates the LOOT DB.

Explicitly manage database lifetime. Allows clients to free memory when they want/need to. This function also checks that plugins.txt and loadorder.txt (if they both exist) are in sync.

DestroySorterDb ( ) : void

Destroys the LOOT DB.

EvaluateMasterlist ( ) : void

Evaluates the loaded masterlist.

Evaluates all conditional lines and regex mods the loaded masterlist. This exists so that Load() doesn't need to be called whenever the mods installed are changed. Evaluation does not take place unless this function is called. Repeated calls re-evaluate the masterlist from scratch each time, ignoring the results of any previous evaluations. Paths are case-sensitive if the underlying filesystem is case-sensitive.

FreeLibrary ( IntPtr hModule ) : bool
GetLastErrorDetails ( ) : string

Gets the details of the last error.

GetProcAddress ( IntPtr handle, [ funcname ) : IntPtr
HandleStatusCode ( UInt32 p_uintStatusCode ) : void

Handles the status code returned by the SORTERAPI methods.

LoadLibrary ( [ fileName ) : IntPtr
LoadMethods ( ) : void

Loads the native SORTERAPI methods.

RemoveNonExistentPlugins ( string p_strPlugins ) : string[]

Removes non-existent and ghosted plugins from the given list.

메소드 상세

AddPluginDirectory() 보호된 메소드

Makes the given plugin path absolute.
protected AddPluginDirectory ( string p_strPlugin ) : string
p_strPlugin string The plugin path to adjust.
리턴 string

Dispose() 공개 메소드

Disposes of any resources that the sorter allocated.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Disposes of the unamanged resources need for SORTERAPI.
protected Dispose ( bool p_booDisposing ) : void
p_booDisposing bool Whether the method is being called from the method.
리턴 void

Load() 보호된 메소드

Loads the specified masterlist.
Loads the masterlist and userlist from the paths specified. Can be called multiple times. On error, the database is unchanged.
protected Load ( string p_strMasterlistPath, string p_strUserlistPath ) : void
p_strMasterlistPath string The path to the masterlist to load.
p_strUserlistPath string The path to the userlist to load.
리턴 void

MarshalPluginArray() 보호된 메소드

Marshal the given pointer to an array of plugins.
This adjusts the plugin paths to be in the format expected by the mod manager.
protected MarshalPluginArray ( IntPtr p_ptrPluginArray, UInt32 p_uintLength, bool p_booKeepRelativePath ) : string[]
p_ptrPluginArray System.IntPtr The pointer to the array of plugin names to marshal.
p_uintLength System.UInt32 the length of the array to marshal.
p_booKeepRelativePath bool
리턴 string[]

MasterlistHasUpdate() 공개 메소드

Updates the masterlist at the given path.
public MasterlistHasUpdate ( ) : bool
리턴 bool

PluginSorter() 공개 메소드

A simple constructor that initializes the object with the given dependencies.
public PluginSorter ( IEnvironmentInfo p_eifEnvironmentInfo, GamebryoGameModeBase p_gmdGameMode, FileUtil p_futFileUtility, string p_strMasterlistPath ) : System
p_eifEnvironmentInfo IEnvironmentInfo The application's envrionment info.
p_gmdGameMode GamebryoGameModeBase The game mode for which plugins are being managed.
p_futFileUtility Nexus.Client.Util.FileUtil The file utility class.
p_strMasterlistPath string The path to the masterlist file to use.
리턴 System

SetLoadOrder() 공개 메소드

Sets the load order of the plugins.
The returned list of sorted plugins will include plugins that were not included in the specified order list, if plugins exist that weren't included. The extra plugins will be apeended to the end of the given order.
public SetLoadOrder ( string p_strPlugins ) : void
p_strPlugins string The list of plugins in the desired order.
리턴 void

SortPlugins() 공개 메소드

Sorts the plugins.
public SortPlugins ( string p_strPlugins ) : string[]
p_strPlugins string The plugins list.
리턴 string[]

StripPluginDirectory() 보호된 메소드

Removes the plugin directory from the given plugin path.
BAPI expects plugin paths to be relative to the plugins directory. This adjusts the plugin path for that purpose.
protected StripPluginDirectory ( string p_strPlugin ) : string
p_strPlugin string The plugin path to adjust.
리턴 string

StripPluginDirectory() 보호된 메소드

Removes the plugin directory from the given plugin paths.
BAPI expects plugin paths to be relative to the plugins directory. This adjusts the plugin paths for that purpose.
protected StripPluginDirectory ( string p_strPlugins ) : string[]
p_strPlugins string The array of plugin paths to adjust.
리턴 string[]

UpdateMasterlist() 공개 메소드

Updates the masterlist at the given path.
public UpdateMasterlist ( ) : void
리턴 void