Show / Hide Table of Contents

Class ElementManager

Class that manages MTAElement functionality and

Inheritance
Object
ElementManager
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Slipe.Shared.Elements
Assembly: SlipeShared.dll
Syntax
public class ElementManager

Constructors

| Improve this Doc View Source

ElementManager()

Creates the ElementManager given an IElementHelper class that maps MTA elements to classes

Declaration
public ElementManager()

Properties

| Improve this Doc View Source

Instance

Get the singleton instance of this class

Declaration
public static ElementManager Instance { get; }
Property Value
Type Description
ElementManager
| Improve this Doc View Source

Root

Returns the root MTA element

Declaration
public Element Root { get; }
Property Value
Type Description
Element

Methods

| Improve this Doc View Source

AddEventHandler(Element, String, Boolean, String)

Declaration
protected void AddEventHandler(Element element, string eventName, bool propagated = true, string priorty = "normal")
Parameters
Type Name Description
Element element
String eventName
Boolean propagated
String priorty
| Improve this Doc View Source

CastArray<T>(MtaElement[])

Cast an array of MTAElements to a desired type

Declaration
public T[] CastArray<T>(MtaElement[] elements)
    where T : Element
Parameters
Type Name Description
Slipe.MtaDefinitions.MtaElement[] elements
Returns
Type Description
T[]
Type Parameters
Name Description
T
| Improve this Doc View Source

GetByType<T>()

Get a list of all classes of a specific element

Declaration
public List<T> GetByType<T>()
    where T : Element
Returns
Type Description
List<T>
Type Parameters
Name Description
T
| Improve this Doc View Source

GetByType<T>(Element, Boolean)

Get a list of all classes of a specific element

Declaration
public List<T> GetByType<T>(Element startAt, bool streamedIn = false)
    where T : Element
Parameters
Type Name Description
Element startAt
Boolean streamedIn
Returns
Type Description
List<T>
Type Parameters
Name Description
T
| Improve this Doc View Source

GetElement(MtaElement)

Get an Element given a certain MTA element

Declaration
public Element GetElement(MtaElement element)
Parameters
Type Name Description
Slipe.MtaDefinitions.MtaElement element
Returns
Type Description
Element
| Improve this Doc View Source

GetElement<T>(MtaElement)

Gets a generic type class instance given a certain MTA element

Declaration
public T GetElement<T>(MtaElement element)
    where T : Element
Parameters
Type Name Description
Slipe.MtaDefinitions.MtaElement element
Returns
Type Description
T
Type Parameters
Name Description
T
| Improve this Doc View Source

GetTypeName(Type)

Get the string representation of an element type

Declaration
public string GetTypeName(Type type)
Parameters
Type Name Description
Type type

The Slipe class of the element

Returns
Type Description
String

A string describing the MTA element type

| Improve this Doc View Source

HandleEvent(String, MtaElement, Object, Object, Object, Object, Object, Object, Object, Object)

Handles an event when it's triggered on a specific MTA element

Declaration
public static void HandleEvent(string eventString, MtaElement source, object p1, object p2, object p3, object p4, object p5, object p6, object p7, object p8)
Parameters
Type Name Description
String eventString
Slipe.MtaDefinitions.MtaElement source
Object p1
Object p2
Object p3
Object p4
Object p5
Object p6
Object p7
Object p8
| Improve this Doc View Source

RegisterElement(Element)

Registers an element class

Declaration
public void RegisterElement(Element element)
Parameters
Type Name Description
Element element
  • Improve this Doc
  • View Source
Back to top Generated by DocFX