Barotrauma Client
Loading...
Searching...
No Matches
Barotrauma.ContentXElement Class Referencesealed

Public Member Functions

 ContentXElement (ContentPackage? contentPackage, XElement element)
 
Identifier NameAsIdentifier ()
 
ContentXElementFirstElement ()
 
bool IsOverride ()
 
bool ComesAfter (ContentXElement other)
 
ContentXElementGetChildElement (string name)
 
IEnumerable< ContentXElementElements ()
 
IEnumerable< ContentXElementElementsBeforeSelf ()
 
IEnumerable< ContentXElementDescendants ()
 
IEnumerable< ContentXElementGetChildElements (string name)
 
XAttribute? GetAttribute (string name)
 
IEnumerable< XAttribute > Attributes ()
 
IEnumerable< XAttribute > Attributes (string name)
 
string ElementInnerText ()
 
Identifier GetAttributeIdentifier (string key, string def)
 
Identifier GetAttributeIdentifier (string key, Identifier def)
 
Identifier[] GetAttributeIdentifierArray (Identifier[] def, params string[] keys)
 
Identifier[] GetAttributeIdentifierArray (string key, Identifier[] def, bool trim=true)
 
ImmutableHashSet< Identifier > GetAttributeIdentifierImmutableHashSet (string key, ImmutableHashSet< Identifier >? def, bool trim=true)
 
string? GetAttributeString (string key, string? def)
 
string GetAttributeStringUnrestricted (string key, string def)
 
string?[] GetAttributeStringArray (string key, string[]? def, bool convertToLowerInvariant=false)
 
ContentPathGetAttributeContentPath (string key)
 
int GetAttributeInt (string key, int def)
 
ushort GetAttributeUInt16 (string key, ushort def)
 
int?[] GetAttributeIntArray (string key, int[]? def)
 
ushort?[] GetAttributeUshortArray (string key, ushort[]? def)
 
float GetAttributeFloat (string key, float def)
 
float?[] GetAttributeFloatArray (string key, float[]? def)
 
float GetAttributeFloat (float def, params string[] keys)
 
bool GetAttributeBool (string key, bool def)
 
Point GetAttributePoint (string key, in Point def)
 
Vector2 GetAttributeVector2 (string key, in Vector2 def)
 
Vector4 GetAttributeVector4 (string key, in Vector4 def)
 
Color GetAttributeColor (string key, in Color def)
 
Color? GetAttributeColor (string key)
 
Color?[] GetAttributeColorArray (string key, Color[]? def)
 
Rectangle GetAttributeRect (string key, in Rectangle def)
 
Version GetAttributeVersion (string key, Version def)
 
GetAttributeEnum< T > (string key, in T def)
 
T2 GetAttributeTuple< T1, T2 > (string key, in(T1, T2) def)
 
T2[] GetAttributeTupleArray< T1, T2 > (string key, in(T1, T2)[] def)
 
Range< int > GetAttributeRange (string key, in Range< int > def)
 
Identifier VariantOf ()
 
bool DoesAttributeReferenceFileNameAlone (string key)
 
string ParseContentPathFromUri ()
 
void SetAttributeValue (string key, string val)
 
void Add (ContentXElement elem)
 
void AddFirst (ContentXElement elem)
 
void AddAfterSelf (ContentXElement elem)
 
void Remove ()
 
override bool Equals (object? obj)
 
override int GetHashCode ()
 

Static Public Member Functions

static implicit operator XElement? (ContentXElement? cxe)
 
static bool operator== (in ContentXElement? a, in ContentXElement? b)
 
static bool operator!= (in ContentXElement? a, in ContentXElement? b)
 

Public Attributes

readonly XElement Element
 
 T1
 

Properties

ContentPackageContentPackage [get]
 
XName Name [get]
 
string BaseUri [get]
 
XDocument? Document [get]
 
ContentXElementParent [get]
 
bool HasElements [get]
 

Constructor & Destructor Documentation

◆ ContentXElement()

Barotrauma.ContentXElement.ContentXElement ( ContentPackage? contentPackage,
XElement element )

Member Function Documentation

◆ Add()

void Barotrauma.ContentXElement.Add ( ContentXElement elem)

◆ AddAfterSelf()

void Barotrauma.ContentXElement.AddAfterSelf ( ContentXElement elem)

◆ AddFirst()

void Barotrauma.ContentXElement.AddFirst ( ContentXElement elem)

◆ Attributes() [1/2]

IEnumerable< XAttribute > Barotrauma.ContentXElement.Attributes ( )

◆ Attributes() [2/2]

IEnumerable< XAttribute > Barotrauma.ContentXElement.Attributes ( string name)

◆ ComesAfter()

bool Barotrauma.ContentXElement.ComesAfter ( ContentXElement other)

◆ Descendants()

IEnumerable< ContentXElement > Barotrauma.ContentXElement.Descendants ( )

◆ DoesAttributeReferenceFileNameAlone()

bool Barotrauma.ContentXElement.DoesAttributeReferenceFileNameAlone ( string key)

◆ ElementInnerText()

string Barotrauma.ContentXElement.ElementInnerText ( )

◆ Elements()

IEnumerable< ContentXElement > Barotrauma.ContentXElement.Elements ( )

◆ ElementsBeforeSelf()

IEnumerable< ContentXElement > Barotrauma.ContentXElement.ElementsBeforeSelf ( )

◆ Equals()

override bool Barotrauma.ContentXElement.Equals ( object? obj)

◆ FirstElement()

ContentXElement? Barotrauma.ContentXElement.FirstElement ( )

◆ GetAttribute()

XAttribute? Barotrauma.ContentXElement.GetAttribute ( string name)

◆ GetAttributeBool()

bool Barotrauma.ContentXElement.GetAttributeBool ( string key,
bool def )

◆ GetAttributeColor() [1/2]

Color? Barotrauma.ContentXElement.GetAttributeColor ( string key)

◆ GetAttributeColor() [2/2]

Color Barotrauma.ContentXElement.GetAttributeColor ( string key,
in Color def )

◆ GetAttributeColorArray()

Color?[] Barotrauma.ContentXElement.GetAttributeColorArray ( string key,
Color?[] def )

◆ GetAttributeContentPath()

ContentPath? Barotrauma.ContentXElement.GetAttributeContentPath ( string key)

◆ GetAttributeEnum< T >()

T Barotrauma.ContentXElement.GetAttributeEnum< T > ( string key,
in T def )
Type Constraints
T :struct 
T :Enum 

◆ GetAttributeFloat() [1/2]

float Barotrauma.ContentXElement.GetAttributeFloat ( float def,
params string[] keys )

◆ GetAttributeFloat() [2/2]

float Barotrauma.ContentXElement.GetAttributeFloat ( string key,
float def )

◆ GetAttributeFloatArray()

float?[] Barotrauma.ContentXElement.GetAttributeFloatArray ( string key,
float?[] def )

◆ GetAttributeIdentifier() [1/2]

Identifier Barotrauma.ContentXElement.GetAttributeIdentifier ( string key,
Identifier def )

◆ GetAttributeIdentifier() [2/2]

Identifier Barotrauma.ContentXElement.GetAttributeIdentifier ( string key,
string def )

◆ GetAttributeIdentifierArray() [1/2]

Identifier[] Barotrauma.ContentXElement.GetAttributeIdentifierArray ( Identifier[] def,
params string[] keys )

◆ GetAttributeIdentifierArray() [2/2]

Identifier[] Barotrauma.ContentXElement.GetAttributeIdentifierArray ( string key,
Identifier[] def,
bool trim = true )

◆ GetAttributeIdentifierImmutableHashSet()

ImmutableHashSet< Identifier > Barotrauma.ContentXElement.GetAttributeIdentifierImmutableHashSet ( string key,
ImmutableHashSet< Identifier >? def,
bool trim = true )

◆ GetAttributeInt()

int Barotrauma.ContentXElement.GetAttributeInt ( string key,
int def )

◆ GetAttributeIntArray()

int?[] Barotrauma.ContentXElement.GetAttributeIntArray ( string key,
int?[] def )

◆ GetAttributePoint()

Point Barotrauma.ContentXElement.GetAttributePoint ( string key,
in Point def )

◆ GetAttributeRange()

Range< int > Barotrauma.ContentXElement.GetAttributeRange ( string key,
in Range< int > def )

◆ GetAttributeRect()

Rectangle Barotrauma.ContentXElement.GetAttributeRect ( string key,
in Rectangle def )

◆ GetAttributeString()

string? Barotrauma.ContentXElement.GetAttributeString ( string key,
string? def )

◆ GetAttributeStringArray()

string?[] Barotrauma.ContentXElement.GetAttributeStringArray ( string key,
string?[] def,
bool convertToLowerInvariant = false )

◆ GetAttributeStringUnrestricted()

string Barotrauma.ContentXElement.GetAttributeStringUnrestricted ( string key,
string def )

◆ GetAttributeTuple< T1, T2 >()

T2 Barotrauma.ContentXElement.GetAttributeTuple< T1, T2 > ( string key,
in(T1, T2) def )

◆ GetAttributeTupleArray< T1, T2 >()

T2[] Barotrauma.ContentXElement.GetAttributeTupleArray< T1, T2 > ( string key,
in(T1, T2)[] def )

◆ GetAttributeUInt16()

ushort Barotrauma.ContentXElement.GetAttributeUInt16 ( string key,
ushort def )

◆ GetAttributeUshortArray()

ushort?[] Barotrauma.ContentXElement.GetAttributeUshortArray ( string key,
ushort?[] def )

◆ GetAttributeVector2()

Vector2 Barotrauma.ContentXElement.GetAttributeVector2 ( string key,
in Vector2 def )

◆ GetAttributeVector4()

Vector4 Barotrauma.ContentXElement.GetAttributeVector4 ( string key,
in Vector4 def )

◆ GetAttributeVersion()

Version Barotrauma.ContentXElement.GetAttributeVersion ( string key,
Version def )

◆ GetChildElement()

ContentXElement? Barotrauma.ContentXElement.GetChildElement ( string name)

◆ GetChildElements()

IEnumerable< ContentXElement > Barotrauma.ContentXElement.GetChildElements ( string name)

◆ GetHashCode()

override int Barotrauma.ContentXElement.GetHashCode ( )

◆ IsOverride()

bool Barotrauma.ContentXElement.IsOverride ( )

◆ NameAsIdentifier()

Identifier Barotrauma.ContentXElement.NameAsIdentifier ( )

◆ operator XElement?()

static implicit Barotrauma.ContentXElement.operator XElement? ( ContentXElement? cxe)
static

◆ operator!=()

static bool Barotrauma.ContentXElement.operator!= ( in ContentXElement? a,
in ContentXElement? b )
static

◆ operator==()

static bool Barotrauma.ContentXElement.operator== ( in ContentXElement? a,
in ContentXElement? b )
static

◆ ParseContentPathFromUri()

string Barotrauma.ContentXElement.ParseContentPathFromUri ( )

◆ Remove()

void Barotrauma.ContentXElement.Remove ( )

◆ SetAttributeValue()

void Barotrauma.ContentXElement.SetAttributeValue ( string key,
string val )

◆ VariantOf()

Identifier Barotrauma.ContentXElement.VariantOf ( )

Member Data Documentation

◆ Element

readonly XElement Barotrauma.ContentXElement.Element

◆ T1

Barotrauma.ContentXElement.T1

Property Documentation

◆ BaseUri

string Barotrauma.ContentXElement.BaseUri
get

◆ ContentPackage

ContentPackage? Barotrauma.ContentXElement.ContentPackage
get

◆ Document

XDocument? Barotrauma.ContentXElement.Document
get

◆ HasElements

bool Barotrauma.ContentXElement.HasElements
get

◆ Name

XName Barotrauma.ContentXElement.Name
get

◆ Parent

ContentXElement? Barotrauma.ContentXElement.Parent
get

The documentation for this class was generated from the following file: