Show / Hide Table of Contents

Class XMLManager

Read XML files from disk for modding purposes

Inheritance
Object
XMLManager
Namespace: DaggerfallWorkshop.Utility.AssetInjection
Assembly: Assembly-CSharp.dll
Syntax
public class XMLManager

Constructors

| Improve this Doc View Source

XMLManager(TextReader)

Declaration
public XMLManager(TextReader textReader)
Parameters
Type Name Description
TextReader textReader
| Improve this Doc View Source

XMLManager(String)

Declaration
public XMLManager(string path)
Parameters
Type Name Description
String path

Methods

| Improve this Doc View Source

GetBool(String, Boolean)

Declaration
public bool GetBool(string key, bool defaultValue = false)
Parameters
Type Name Description
String key
Boolean defaultValue
Returns
Type Description
Boolean
| Improve this Doc View Source

GetColor(Color)

Declaration
public Color GetColor(Color baseColor)
Parameters
Type Name Description
Color baseColor
Returns
Type Description
Color
| Improve this Doc View Source

GetRect(String, Rect, Single)

Gets a rect and scale all its value to the requested requestedScale. The xml element can provide an attribute with a specified scale different than one.

Declaration
public Rect GetRect(string name, Rect baseRect, float requestedScale = 1F)
Parameters
Type Name Description
String name

The name of the rect element.

Rect baseRect

Default values for the rect.

Single requestedScale

A value to scale the rect.

Returns
Type Description
Rect

Rect read from xml file.

| Improve this Doc View Source

GetVector2(String, String, Vector2)

Declaration
public Vector2 GetVector2(string keyX, string keyY, Vector2 baseVector)
Parameters
Type Name Description
String keyX
String keyY
Vector2 baseVector
Returns
Type Description
Vector2
| Improve this Doc View Source

GetVector3(String, String, Vector3)

Declaration
public Vector3 GetVector3(string keyX, string keyY, Vector3 baseVector)
Parameters
Type Name Description
String keyX
String keyY
Vector3 baseVector
Returns
Type Description
Vector3
| Improve this Doc View Source

TryGetColor(Single, out Color)

Declaration
public bool TryGetColor(float defaultAlpha, out Color color)
Parameters
Type Name Description
Single defaultAlpha
Color color
Returns
Type Description
Boolean
| Improve this Doc View Source

TryGetColor(out Color)

Declaration
public bool TryGetColor(out Color color)
Parameters
Type Name Description
Color color
Returns
Type Description
Boolean
| Improve this Doc View Source

TryGetFloat(String, out Single)

Declaration
public bool TryGetFloat(string key, out float value)
Parameters
Type Name Description
String key
Single value
Returns
Type Description
Boolean
| Improve this Doc View Source

TryGetString(String, out String)

Declaration
public bool TryGetString(string key, out string value)
Parameters
Type Name Description
String key
String value
Returns
Type Description
Boolean
| Improve this Doc View Source

TryGetVector2(String, String, out Vector2)

Declaration
public bool TryGetVector2(string keyX, string keyY, out Vector2 vector)
Parameters
Type Name Description
String keyX
String keyY
Vector2 vector
Returns
Type Description
Boolean
| Improve this Doc View Source

TryReadXml(String, String, out XMLManager)

Seek xml from modding locations.

Declaration
public static bool TryReadXml(string directory, string name, out XMLManager xml)
Parameters
Type Name Description
String directory

Directory on disk (loose files only).

String name

Name of xml.

XMLManager xml

XMLManager instance from imported xml.

Returns
Type Description
Boolean

True if xml found and read.

| Improve this Doc View Source

XmlFileExists(String)

Loose files contain xml ?

Declaration
public static bool XmlFileExists(string path)
Parameters
Type Name Description
String path

Path to xml.

Returns
Type Description
Boolean

True if xml file exists.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX