IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
NUnit.Framework.Interfaces.TNode Class Reference

TNode represents a single node in the XML representation of a Test or TestResult. It replaces System.Xml.XmlNode and System.Xml.Linq.XElement, providing a minimal set of methods for operating on the XML in a platform-independent manner. More...

Classes

class  NodeFilter
 

Public Member Functions

 TNode (string name)
 Constructs a new instance of TNode More...
 
 TNode (string name, string value)
 Constructs a new instance of TNode with a value More...
 
 TNode (string name, string value, bool valueIsCDATA)
 Constructs a new instance of TNode with a value More...
 
TNode AddElement (string name)
 Adds a new element as a child of the current node and returns it. More...
 
TNode AddElement (string name, string value)
 Adds a new element with a value as a child of the current node and returns it. More...
 
TNode AddElementWithCDATA (string name, string value)
 Adds a new element with a value as a child of the current node and returns it. The value will be output using a CDATA section. More...
 
void AddAttribute (string name, string value)
 Adds an attribute with a specified name and value to the XmlNode. More...
 
TNode SelectSingleNode (string xpath)
 Finds a single descendant of this node matching an xpath specification. The format of the specification is limited to what is needed by NUnit and its tests. More...
 
NodeList SelectNodes (string xpath)
 Finds all descendants of this node matching an xpath specification. The format of the specification is limited to what is needed by NUnit and its tests. More...
 
void WriteTo (XmlWriter writer)
 Writes the XML representation of the node to an XmlWriter More...
 

Static Public Member Functions

static TNode FromXml (string xmlText)
 Create a TNode from it's XML text representation More...
 

Properties

string Name [get, private set]
 Gets the name of the node More...
 
string Value [get, set]
 Gets the value of the node More...
 
bool ValueIsCDATA [get, private set]
 Gets a flag indicating whether the value should be output using CDATA. More...
 
AttributeDictionary Attributes [get, private set]
 Gets the dictionary of attributes More...
 
NodeList ChildNodes [get, private set]
 Gets a list of child nodes More...
 
TNode FirstChild [get]
 Gets the first ChildNode More...
 
string OuterXml [get]
 Gets the XML representation of this node. More...
 

Private Member Functions

void WriteCDataTo (XmlWriter writer)
 

Static Private Member Functions

static TNode FromXml (XmlNode xmlNode)
 
static NodeList ApplySelection (NodeList nodeList, string xpath)
 
static string EscapeInvalidXmlCharacters (string str)
 
static string CharToUnicodeSequence (char symbol)
 

Detailed Description

TNode represents a single node in the XML representation of a Test or TestResult. It replaces System.Xml.XmlNode and System.Xml.Linq.XElement, providing a minimal set of methods for operating on the XML in a platform-independent manner.

Constructor & Destructor Documentation

NUnit.Framework.Interfaces.TNode.TNode ( string  name)
inline

Constructs a new instance of TNode

Parameters
nameThe name of the node
NUnit.Framework.Interfaces.TNode.TNode ( string  name,
string  value 
)
inline

Constructs a new instance of TNode with a value

Parameters
nameThe name of the node
valueThe text content of the node
NUnit.Framework.Interfaces.TNode.TNode ( string  name,
string  value,
bool  valueIsCDATA 
)
inline

Constructs a new instance of TNode with a value

Parameters
nameThe name of the node
valueThe text content of the node
valueIsCDATAFlag indicating whether to use CDATA when writing the text

Member Function Documentation

TNode NUnit.Framework.Interfaces.TNode.AddElement ( string  name,
string  value 
)
inline

Adds a new element with a value as a child of the current node and returns it.

Parameters
nameThe element name
valueThe text content of the new element
Returns
The newly created child element
TNode NUnit.Framework.Interfaces.TNode.AddElementWithCDATA ( string  name,
string  value 
)
inline

Adds a new element with a value as a child of the current node and returns it. The value will be output using a CDATA section.

Parameters
nameThe element name
valueThe text content of the new element
Returns
The newly created child element

Referenced by NUnit.Framework.Internal.TestResult.AddFailureElement(), NUnit.Framework.Internal.TestResult.AddOutputElement(), and NUnit.Framework.Internal.TestResult.AddReasonElement().

void NUnit.Framework.Interfaces.TNode.WriteTo ( XmlWriter  writer)
inline
static TNode NUnit.Framework.Interfaces.TNode.FromXml ( XmlNode  xmlNode)
inlinestaticprivate
static NodeList NUnit.Framework.Interfaces.TNode.ApplySelection ( NodeList  nodeList,
string  xpath 
)
inlinestaticprivate
static string NUnit.Framework.Interfaces.TNode.EscapeInvalidXmlCharacters ( string  str)
inlinestaticprivate
static string NUnit.Framework.Interfaces.TNode.CharToUnicodeSequence ( char  symbol)
inlinestaticprivate
void NUnit.Framework.Interfaces.TNode.WriteCDataTo ( XmlWriter  writer)
inlineprivate

Property Documentation

bool NUnit.Framework.Interfaces.TNode.ValueIsCDATA
getprivate set

Gets a flag indicating whether the value should be output using CDATA.

AttributeDictionary NUnit.Framework.Interfaces.TNode.Attributes
getprivate set
TNode NUnit.Framework.Interfaces.TNode.FirstChild
get

Gets the first ChildNode

Referenced by NUnit.Framework.Internal.TestFilter.FromXml().


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