C# Class Nexus.Client.Games.Gamebryo.Tools.TESsnip.TesPlugin

Encapsulates interacting with a TES plugin.
Inheritance: BaseRecord
Show file Open project: NexusMods/NexusModManager-4.5 Class Usage Examples

Public Properties

Property Type Description
Records List

Public Methods

Method Description
AddRecord ( BaseRecord br ) : void

Adds a record to the plugin.

Clone ( ) : BaseRecord

CLones the plugin.

This method is not implemented.

ContainsFormId ( UInt32 p_uintFormId ) : bool

Determines if the plugin contains the given form id.

DeleteRecord ( BaseRecord br ) : void

Deletes a record from the plugin.

GetDesc ( ) : string

Gets the plugin's decription.

GetIsEsm ( string FilePath ) : bool

Determines if the specified file is a master file.

GetMaster ( Int32 p_intIndex ) : string

Gets the master of the plugin at the given index.

GetMasterIndex ( string p_strPluginName ) : Int32

Gets the index of the specified master.

Save ( ) : byte[]

Save any changes made to the plugin.

TesPlugin ( ) : System

The default constructor.

TesPlugin ( byte data, string name ) : System

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

Private Methods

Method Description
ContainsFormId ( uint p_uintFormId, List p_lstRecords ) : bool

Searched the given records for the given form id.

GetIDs ( bool lower ) : List

Gets a list of the form ids in the plugin.

LoadPlugin ( BinaryReader br, bool headerOnly ) : void

Loads the plugin from the given reader, optionally loading just the header.

Save ( string FilePath ) : void

Saves any changes made to the plugin to the specified file.

If the exists it is overwritten, but the last modified time is maintained.

SaveData ( BinaryWriter bw ) : void

Save the plugin data to the given writer.

TesPlugin ( string FilePath, bool headerOnly ) : System

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

Method Details

AddRecord() public method

Adds a record to the plugin.
Thrown if the type of the given record /// cannot be added to the plugin.
public AddRecord ( BaseRecord br ) : void
br BaseRecord The record to add.
return void

Clone() public method

CLones the plugin.
This method is not implemented.
Thrown always.
public Clone ( ) : BaseRecord
return BaseRecord

ContainsFormId() public method

Determines if the plugin contains the given form id.
public ContainsFormId ( UInt32 p_uintFormId ) : bool
p_uintFormId System.UInt32 The form id to be searched for in the plugin.
return bool

DeleteRecord() public method

Deletes a record from the plugin.
public DeleteRecord ( BaseRecord br ) : void
br BaseRecord The record to delete.
return void

GetDesc() public method

Gets the plugin's decription.
public GetDesc ( ) : string
return string

GetIsEsm() public static method

Determines if the specified file is a master file.
public static GetIsEsm ( string FilePath ) : bool
FilePath string The path to the file for which it is to be determined if it is a master file.
return bool

GetMaster() public method

Gets the master of the plugin at the given index.
public GetMaster ( Int32 p_intIndex ) : string
p_intIndex System.Int32 The index of the master to return.
return string

GetMasterIndex() public method

Gets the index of the specified master.
public GetMasterIndex ( string p_strPluginName ) : Int32
p_strPluginName string The name of the master file whose index in the master list of this pugin /// is to be returned.
return System.Int32

Save() public method

Save any changes made to the plugin.
public Save ( ) : byte[]
return byte[]

TesPlugin() public method

The default constructor.
public TesPlugin ( ) : System
return System

TesPlugin() public method

A simple constructor that initializes the object with the given data.
public TesPlugin ( byte data, string name ) : System
data byte The plugin data.
name string The name of the plugin.
return System

Property Details

Records public property

Gets the records in the plugin file.
public List Records
return List