C# Class Nexus.Client.ModManagement.Scripting.XmlScript.XmlScriptType

Describes the XML script type.
This is the script that allows scripting using an XML language. It is meant to be easier to learn and more accessible than the more advanced C# script.
Inheritance: IScriptType
Afficher le fichier Open project: NexusMods/NexusModManager-4.5 Class Usage Examples

Protected Properties

Свойство Type Description
m_rgxVersion System.Text.RegularExpressions.Regex

Méthodes publiques

Méthode Description
CreateConditionStateManager ( IMod p_modMod, IGameMode p_gmdGameMode, IPluginManager p_pmgPluginManager, IEnvironmentInfo p_eifEnvironmentInfo ) : ConditionStateManager

Creates a ConditionStateManager to use when running an XML script.

CreateEditor ( IList p_lstModFiles ) : IScriptEditor

Creates an editor for the script type.

CreateExecutor ( IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, InstallerGroup p_igpInstallers, SynchronizationContext p_scxUIContext ) : IScriptExecutor

Creates an executor that can run the script type.

GetCplParserFactory ( ) : ICplParserFactory

Gets a CPL Parser factory.

GetSupportedXmlScriptEditCommands ( System.Version p_verXmlScriptVersion ) : XmlScriptEditCommands

Gets the commands supported by the specified XML Script version.

GetXmlScriptNodeAdapter ( System.Version p_verXmlScriptVersion ) : IXmlScriptNodeAdapter

The factory method that returns the appropriate IXmlScriptNodeAdapter for the given xml script version.

GetXmlScriptSchema ( System.Version p_verXmlScriptVersion ) : XmlSchema

Gets the path to the schema file for the specified xml script version.

GetXmlScriptVersion ( System.Xml.Linq.XElement p_xelScript ) : System.Version

Gets the config version used by the given XML configuration file.

GetXmlScriptVersion ( string p_strXml ) : System.Version

Gets the config version used by the given XML configuration file.

IsXmlScriptValid ( System.Xml.Linq.XElement p_xelScript ) : bool

Validates the given Xml Script against the appropriate schema.

LoadScript ( string p_strScriptData ) : IScript

Loads the script from the given text representation.

SaveScript ( IScript p_scpScript ) : string

Saves the given script into a text representation.

ValidateScript ( IScript p_scpScript ) : bool

Determines if the given script is valid.

ValidateXmlScript ( System.Xml.Linq.XElement p_xelScript ) : void

Validates the given Xml Script against the appropriate schema.

Méthodes protégées

Méthode Description
GetParser ( System.Xml.Linq.XElement p_xelScript ) : IParser

Gets a parser for the given script.

GetUnparser ( XmlScript p_xscScript ) : IUnparser

Gets a unparser for the given script.

Method Details

CreateConditionStateManager() public méthode

Creates a ConditionStateManager to use when running an XML script.
public CreateConditionStateManager ( IMod p_modMod, IGameMode p_gmdGameMode, IPluginManager p_pmgPluginManager, IEnvironmentInfo p_eifEnvironmentInfo ) : ConditionStateManager
p_modMod IMod The mod being installed.
p_gmdGameMode IGameMode The game mode currently bieng managed.
p_pmgPluginManager IPluginManager The plugin manager.
p_eifEnvironmentInfo IEnvironmentInfo The application's envrionment info.
Résultat ConditionStateManager

CreateEditor() public méthode

Creates an editor for the script type.
public CreateEditor ( IList p_lstModFiles ) : IScriptEditor
p_lstModFiles IList The list of files if the current mod.
Résultat IScriptEditor

CreateExecutor() public méthode

Creates an executor that can run the script type.
public CreateExecutor ( IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, InstallerGroup p_igpInstallers, SynchronizationContext p_scxUIContext ) : IScriptExecutor
p_modMod IMod The mod being installed.
p_gmdGameMode IGameMode The game mode currently bieng managed.
p_eifEnvironmentInfo IEnvironmentInfo The application's envrionment info.
p_igpInstallers InstallerGroup The utility class to use to install the mod items.
p_scxUIContext System.Threading.SynchronizationContext The to use to marshall UI interactions to the UI thread.
Résultat IScriptExecutor

GetCplParserFactory() public méthode

Gets a CPL Parser factory.
public GetCplParserFactory ( ) : ICplParserFactory
Résultat ICplParserFactory

GetParser() protected méthode

Gets a parser for the given script.
protected GetParser ( System.Xml.Linq.XElement p_xelScript ) : IParser
p_xelScript System.Xml.Linq.XElement The script for which to get a parser.
Résultat IParser

GetSupportedXmlScriptEditCommands() public méthode

Gets the commands supported by the specified XML Script version.
public GetSupportedXmlScriptEditCommands ( System.Version p_verXmlScriptVersion ) : XmlScriptEditCommands
p_verXmlScriptVersion System.Version The XML script file version for which to return a schema.
Résultat XmlScriptEditCommands

GetUnparser() protected méthode

Gets a unparser for the given script.
protected GetUnparser ( XmlScript p_xscScript ) : IUnparser
p_xscScript XmlScript The script for which to get an unparser.
Résultat IUnparser

GetXmlScriptNodeAdapter() public méthode

The factory method that returns the appropriate IXmlScriptNodeAdapter for the given xml script version.
Thrown if no is /// found for the given xml script version.
public GetXmlScriptNodeAdapter ( System.Version p_verXmlScriptVersion ) : IXmlScriptNodeAdapter
p_verXmlScriptVersion System.Version The xml script version for which to create an /// .
Résultat IXmlScriptNodeAdapter

GetXmlScriptSchema() public méthode

Gets the path to the schema file for the specified xml script version.
public GetXmlScriptSchema ( System.Version p_verXmlScriptVersion ) : XmlSchema
p_verXmlScriptVersion System.Version The XML script file version for which to return a schema.
Résultat System.Xml.Schema.XmlSchema

GetXmlScriptVersion() public méthode

Gets the config version used by the given XML configuration file.
public GetXmlScriptVersion ( System.Xml.Linq.XElement p_xelScript ) : System.Version
p_xelScript System.Xml.Linq.XElement The XML file whose version is to be determined.
Résultat System.Version

GetXmlScriptVersion() public méthode

Gets the config version used by the given XML configuration file.
public GetXmlScriptVersion ( string p_strXml ) : System.Version
p_strXml string The XML file whose version is to be determined.
Résultat System.Version

IsXmlScriptValid() public méthode

Validates the given Xml Script against the appropriate schema.
public IsXmlScriptValid ( System.Xml.Linq.XElement p_xelScript ) : bool
p_xelScript System.Xml.Linq.XElement The script file.
Résultat bool

LoadScript() public méthode

Loads the script from the given text representation.
public LoadScript ( string p_strScriptData ) : IScript
p_strScriptData string The text to convert into a script.
Résultat IScript

SaveScript() public méthode

Saves the given script into a text representation.
public SaveScript ( IScript p_scpScript ) : string
p_scpScript IScript The to save.
Résultat string

ValidateScript() public méthode

Determines if the given script is valid.
public ValidateScript ( IScript p_scpScript ) : bool
p_scpScript IScript The script to validate.
Résultat bool

ValidateXmlScript() public méthode

Validates the given Xml Script against the appropriate schema.
public ValidateXmlScript ( System.Xml.Linq.XElement p_xelScript ) : void
p_xelScript System.Xml.Linq.XElement The script file.
Résultat void

Property Details

m_rgxVersion protected_oe static_oe property

Extracts the config version from a XML configuration file.
protected static Regex,System.Text.RegularExpressions m_rgxVersion
Résultat System.Text.RegularExpressions.Regex