Table of Contents

Class MBObjectManager

Namespace
TaleWorlds.ObjectSystem
Assembly
TaleWorlds.ObjectSystem.dll
public sealed class MBObjectManager
Inheritance
MBObjectManager
Inherited Members

Properties

Instance

public static MBObjectManager Instance { get; }

Property Value

MBObjectManager

MaxRegisteredTypes

public int MaxRegisteredTypes { get; }

Property Value

int

NumRegisteredTypes

public int NumRegisteredTypes { get; }

Property Value

int

Methods

AddHandler(IObjectManagerHandler)

public void AddHandler(IObjectManagerHandler handler)

Parameters

handler IObjectManagerHandler

AfterLoad()

public void AfterLoad()

ApplyXslt(string, XmlDocument)

public static XmlDocument ApplyXslt(string xsltPath, XmlDocument baseDocument)

Parameters

xsltPath string
baseDocument XmlDocument

Returns

XmlDocument

ClearAllObjects()

public void ClearAllObjects()

ClearAllObjectsWithType(Type)

public void ClearAllObjectsWithType(Type type)

Parameters

type Type

ContainsObject<T>(string)

public bool ContainsObject<T>(string objectName) where T : MBObjectBase

Parameters

objectName string

Returns

bool

Type Parameters

T

CreateMergedXmlFile(List<Tuple<string, string>>, List<string>, bool)

public static XmlDocument CreateMergedXmlFile(List<Tuple<string, string>> toBeMerged, List<string> xsltList, bool skipValidation)

Parameters

toBeMerged List<Tuple<string, string>>
xsltList List<string>
skipValidation bool

Returns

XmlDocument

CreateObjectFromXmlNode(XmlNode)

public MBObjectBase CreateObjectFromXmlNode(XmlNode node)

Parameters

node XmlNode

Returns

MBObjectBase

CreateObjectTypeList(Type)

public IList<MBObjectBase> CreateObjectTypeList(Type objectClassType)

Parameters

objectClassType Type

Returns

IList<MBObjectBase>

CreateObjectWithoutDeserialize(XmlNode)

public MBObjectBase CreateObjectWithoutDeserialize(XmlNode node)

Parameters

node XmlNode

Returns

MBObjectBase

CreateObject<T>()

public T CreateObject<T>() where T : MBObjectBase, new()

Returns

T

Type Parameters

T

CreateObject<T>(string)

public T CreateObject<T>(string stringId) where T : MBObjectBase, new()

Parameters

stringId string

Returns

T

Type Parameters

T

DebugDump()

public string DebugDump()

Returns

string

DebugPrint(PrintOutputDelegate)

public void DebugPrint(PrintOutputDelegate printOutput)

Parameters

printOutput PrintOutputDelegate

Destroy()

public void Destroy()

FindRegisteredClassPrefix(Type)

public string FindRegisteredClassPrefix(Type type)

Parameters

type Type

Returns

string

FindRegisteredType(string)

public Type FindRegisteredType(string classPrefix)

Parameters

classPrefix string

Returns

Type

GetFirstObject<T>()

public T GetFirstObject<T>() where T : MBObjectBase

Returns

T

Type Parameters

T

GetMergedXmlForManaged(string, bool, bool, string)

public static XmlDocument GetMergedXmlForManaged(string id, bool skipValidation, bool ignoreGameTypeInclusionCheck = true, string gameType = "")

Parameters

id string
skipValidation bool
ignoreGameTypeInclusionCheck bool
gameType string

Returns

XmlDocument

GetMergedXmlForNative(string, out List<string>)

public static XmlDocument GetMergedXmlForNative(string id, out List<string> usedPaths)

Parameters

id string
usedPaths List<string>

Returns

XmlDocument

GetObject(string, string)

public MBObjectBase GetObject(string typeName, string objectName)

Parameters

typeName string
objectName string

Returns

MBObjectBase

GetObject(MBGUID)

public MBObjectBase GetObject(MBGUID objectId)

Parameters

objectId MBGUID

Returns

MBObjectBase

GetObjectTypeIds()

public string GetObjectTypeIds()

Returns

string

GetObjectTypeList<T>()

public MBReadOnlyList<T> GetObjectTypeList<T>() where T : MBObjectBase

Returns

MBReadOnlyList<T>

Type Parameters

T

GetObject<T>(Func<T, bool>)

public T GetObject<T>(Func<T, bool> predicate) where T : MBObjectBase

Parameters

predicate Func<T, bool>

Returns

T

Type Parameters

T

GetObject<T>(string)

public T GetObject<T>(string objectName) where T : MBObjectBase

Parameters

objectName string

Returns

T

Type Parameters

T

HasType(Type)

public bool HasType(Type type)

Parameters

type Type

Returns

bool

Init()

public static MBObjectManager Init()

Returns

MBObjectManager

LoadOneXmlFromFile(string, string, bool)

public void LoadOneXmlFromFile(string xmlPath, string xsdPath, bool skipValidation = false)

Parameters

xmlPath string
xsdPath string
skipValidation bool

LoadXML(string, bool, string, bool)

public void LoadXML(string id, bool isDevelopment, string gameType, bool skipXmlFilterForEditor = false)

Parameters

id string
isDevelopment bool
gameType string
skipXmlFilterForEditor bool

LoadXMLFromFileSkipValidation(string, string)

public XmlDocument LoadXMLFromFileSkipValidation(string xmlPath, string xsdPath)

Parameters

xmlPath string
xsdPath string

Returns

XmlDocument

LoadXml(XmlDocument, bool)

public void LoadXml(XmlDocument doc, bool isDevelopment = false)

Parameters

doc XmlDocument
isDevelopment bool

MergeTwoXmls(XmlDocument, XmlDocument)

public static XmlDocument MergeTwoXmls(XmlDocument xmlDocument1, XmlDocument xmlDocument2)

Parameters

xmlDocument1 XmlDocument
xmlDocument2 XmlDocument

Returns

XmlDocument

PreAfterLoad()

public void PreAfterLoad()

ReInitialize()

public void ReInitialize()

ReadObjectReferenceFromXml(string, Type, XmlNode)

public MBObjectBase ReadObjectReferenceFromXml(string attributeName, Type objectType, XmlNode node)

Parameters

attributeName string
objectType Type
node XmlNode

Returns

MBObjectBase

ReadObjectReferenceFromXml<T>(string, XmlNode)

public T ReadObjectReferenceFromXml<T>(string attributeName, XmlNode node) where T : MBObjectBase

Parameters

attributeName string
node XmlNode

Returns

T

Type Parameters

T

RegisterObject<T>(T)

public T RegisterObject<T>(T obj) where T : MBObjectBase

Parameters

obj T

Returns

T

Type Parameters

T

RegisterPresumedObject<T>(T)

public T RegisterPresumedObject<T>(T obj) where T : MBObjectBase

Parameters

obj T

Returns

T

Type Parameters

T

RegisterType<T>(string, string, uint, bool, bool)

public void RegisterType<T>(string classPrefix, string classListPrefix, uint typeId, bool autoCreateInstance = true, bool isTemporary = false) where T : MBObjectBase

Parameters

classPrefix string
classListPrefix string
typeId uint
autoCreateInstance bool
isTemporary bool

Type Parameters

T

RemoveHandler(IObjectManagerHandler)

public void RemoveHandler(IObjectManagerHandler handler)

Parameters

handler IObjectManagerHandler

RemoveTemporaryTypes()

public void RemoveTemporaryTypes()

ToXDocument(XmlDocument)

public static XDocument ToXDocument(XmlDocument xmlDocument)

Parameters

xmlDocument XmlDocument

Returns

XDocument

ToXmlDocument(XDocument)

public static XmlDocument ToXmlDocument(XDocument xDocument)

Parameters

xDocument XDocument

Returns

XmlDocument

UnregisterNonReadyObjects()

public void UnregisterNonReadyObjects()

UnregisterObject(MBObjectBase)

public void UnregisterObject(MBObjectBase obj)

Parameters

obj MBObjectBase

This page was last modified at 09/01/2024 16:12:00 +00:00 (UTC).