NanoXLSX.Core 3.0.0-rc.3
Loading...
Searching...
No Matches
NanoXLSX.Utils.Xml.XmlAttribute Struct Reference

Struct representing an internally used XML attribute. More...

Public Member Functions

override bool Equals (object obj)
 Returns whether two instances are the same.
override int GetHashCode ()
 Gets the hash code of the attribute.

Static Public Member Functions

static XmlAttribute CreateAttribute (string name, string value, string prefix="")
 Method to create an attribute instance.
static XmlAttribute CreateEmptyAttribute (string name, string prefix="")
 Method to create an empty attribute instance.
static ? XmlAttribute FindAttribute (string name, HashSet< XmlAttribute > attributes)
 Method to find an attribute in a given list by attribute name. It is assumed that there are no duplicates (attribute name).

Properties

string Name [get]
 Name of the attribute (without prefix).
string Value [get]
 Attribute value as string.
bool HasPrefix [get]
 True if a prefix for the attribute was defined.
string Prefix [get]
 Prefix of the attribute. If not defined, the prefix will be an empty string.

Detailed Description

Struct representing an internally used XML attribute.

Definition at line 16 of file XmlAttribute.cs.

Member Function Documentation

◆ CreateAttribute()

XmlAttribute NanoXLSX.Utils.Xml.XmlAttribute.CreateAttribute ( string name,
string value,
string prefix = "" )
static

Method to create an attribute instance.

Parameters
nameAttribute name
valueAttribute value
prefixOptional attribute prefix
Returns
Attribute instance

Definition at line 57 of file XmlAttribute.cs.

◆ CreateEmptyAttribute()

XmlAttribute NanoXLSX.Utils.Xml.XmlAttribute.CreateEmptyAttribute ( string name,
string prefix = "" )
static

Method to create an empty attribute instance.

Parameters
nameAttribute name
prefixOptional attribute prefix
Returns
Attribute instance

Definition at line 68 of file XmlAttribute.cs.

◆ Equals()

override bool NanoXLSX.Utils.Xml.XmlAttribute.Equals ( object obj)

Returns whether two instances are the same.

Parameters
objObject to compare
Returns
True if this instance and the other are the same

Definition at line 97 of file XmlAttribute.cs.

◆ FindAttribute()

? XmlAttribute NanoXLSX.Utils.Xml.XmlAttribute.FindAttribute ( string name,
HashSet< XmlAttribute > attributes )
static

Method to find an attribute in a given list by attribute name. It is assumed that there are no duplicates (attribute name).

Parameters
nameAttribute name
attributesList of attributes
Returns
Attribute that matches the name, or null if no attribute was found

Definition at line 79 of file XmlAttribute.cs.

◆ GetHashCode()

override int NanoXLSX.Utils.Xml.XmlAttribute.GetHashCode ( )

Gets the hash code of the attribute.

Returns
Hash code of the attribute

Definition at line 109 of file XmlAttribute.cs.

Property Documentation

◆ HasPrefix

bool NanoXLSX.Utils.Xml.XmlAttribute.HasPrefix
get

True if a prefix for the attribute was defined.

Definition at line 29 of file XmlAttribute.cs.

◆ Name

string NanoXLSX.Utils.Xml.XmlAttribute.Name
get

Name of the attribute (without prefix).

Definition at line 21 of file XmlAttribute.cs.

◆ Prefix

string NanoXLSX.Utils.Xml.XmlAttribute.Prefix
get

Prefix of the attribute. If not defined, the prefix will be an empty string.

Definition at line 33 of file XmlAttribute.cs.

◆ Value

string NanoXLSX.Utils.Xml.XmlAttribute.Value
get

Attribute value as string.

Definition at line 25 of file XmlAttribute.cs.


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