PreEmptive Analytics .NET API  1.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Properties | List of all members
PreEmptive.Analytics.Common.Tags.Tag Class Reference

Class for creating an XML Tag. More...

Inherited by PreEmptive.Analytics.Common.Message, PreEmptive.Analytics.Common.Tags.AppComponentTag, PreEmptive.Analytics.Common.Tags.ApplicationTag, PreEmptive.Analytics.Common.Tags.BinaryInfoTag, PreEmptive.Analytics.Common.Tags.CompanyTag, PreEmptive.Analytics.Common.Tags.ExceptionTag, PreEmptive.Analytics.Common.Tags.ExtendedKeyTag, PreEmptive.Analytics.Common.Tags.HostTag, PreEmptive.Analytics.Common.Tags.MessagesTag, PreEmptive.Analytics.Common.Tags.OSTag, PreEmptive.Analytics.Common.Tags.PerformanceProbeTags.CpuUseTag, PreEmptive.Analytics.Common.Tags.PerformanceProbeTags.MemoryUseTag, PreEmptive.Analytics.Common.Tags.StackTag, PreEmptive.Analytics.Common.Tags.SystemProfileTags.CpuInfoTag, PreEmptive.Analytics.Common.Tags.SystemProfileTags.DiskInfoTag, PreEmptive.Analytics.Common.Tags.SystemProfileTags.DomainInfoTag, PreEmptive.Analytics.Common.Tags.SystemProfileTags.MemoryInfoTag, PreEmptive.Analytics.Common.Tags.SystemProfileTags.ModemInfoTag, PreEmptive.Analytics.Common.Tags.SystemProfileTags.NetworkInfoTag, PreEmptive.Analytics.Common.Tags.SystemProfileTags.PageFileInfoTag, PreEmptive.Analytics.Common.Tags.SystemProfileTags.ScreenInfoTag, PreEmptive.Analytics.Common.Tags.SystemProfileTags.SoundInfoTag, PreEmptive.Analytics.Common.Tags.SystemProfileTags.TerminalServicesInfoTag, PreEmptive.Analytics.Common.Tags.SystemProfileTags.TimeInfoTag, PreEmptive.Analytics.Common.Tags.SystemProfileTags.VideoInfoTag, and PreEmptive.Analytics.Common.Tags.UserTag.

Public Member Functions

 Tag ()
 Constructor for creating a Tag. More...
 
 Tag (string tagName)
 Constructor for creating a Tag. More...
 
virtual string ToString (IAttributeLimiter limits)
 Converts the Tag object to an XML string. More...
 
override string ToString ()
 Converts the Tag object to an XML string. More...
 
virtual void AppendToStringBuilder (StringBuilder sb, IAttributeLimiter limits)
 Serializes the tag to a string appending directly onto the passed in StringBuilder More...
 
void AddAttribute (string name, string value)
 Adds an attribute to the current Tag. More...
 
void AddOptionalAttribute (string name, string value)
 Adds an optional attribute to the current Tag. If the value provided is null, then the attribute will not be added. More...
 

Static Public Member Functions

static Tag FromString (string str)
 Creates a Tag object from an XML string. More...
 
static Tag FromReader (TextReader reader)
 Creates (deserializes) a Tag object from an XML string provided by a TextReader More...
 

Public Attributes

AttributeList Attributes = new AttributeList()
 The list of attributes that will be added to the Tag. More...
 

Protected Member Functions

virtual void AppendSerializedInnerTags (StringBuilder sb, IAttributeLimiter limits)
 Will serialize the inner tags and return them as a string More...
 
string Escape (string s, int?maxLength=null)
 Escapes characters from the given string More...
 
void AddOptionalAttribute< T > (string name, T value)
 Add an optional attribute to the current tag. If the value provided is null, then the attribute will not be added. More...
 

Static Protected Member Functions

static void AppendEscape (StringBuilder sb, string s, int?maxLength=null)
 Esxapes the characters in the given string and appends the escaped text to the provided StringBuilder More...
 

Properties

virtual string TagName [get]
 The name of the tag. More...
 
virtual string TagDescription [get]
 A more descriptive tag name. More...
 
List< TagInnerTags [get, set]
 A list of tags that are nested within this tag. More...
 

Detailed Description

Class for creating an XML Tag.

Constructor & Destructor Documentation

PreEmptive.Analytics.Common.Tags.Tag.Tag ( )

Constructor for creating a Tag.

PreEmptive.Analytics.Common.Tags.Tag.Tag ( string  tagName)

Constructor for creating a Tag.

Parameters
tagNameThe name of the Tag.

Member Function Documentation

void PreEmptive.Analytics.Common.Tags.Tag.AddAttribute ( string  name,
string  value 
)

Adds an attribute to the current Tag.

Parameters
nameThe name of the attribute.
valueThe value of the attribute.
void PreEmptive.Analytics.Common.Tags.Tag.AddOptionalAttribute ( string  name,
string  value 
)

Adds an optional attribute to the current Tag. If the value provided is null, then the attribute will not be added.

Parameters
nameThe name of the attribute.
valueThe value of the attribute.
void PreEmptive.Analytics.Common.Tags.Tag.AddOptionalAttribute< T > ( string  name,
value 
)
protected

Add an optional attribute to the current tag. If the value provided is null, then the attribute will not be added.

Template Parameters
TThe type of the attribute's value.
Parameters
nameThe name of the attribute.
valueThe value of the attribute.
static void PreEmptive.Analytics.Common.Tags.Tag.AppendEscape ( StringBuilder  sb,
string  s,
int?  maxLength = null 
)
staticprotected

Esxapes the characters in the given string and appends the escaped text to the provided StringBuilder

Parameters
sbThe StringBuilder to append escaped text to
maxLengthMaximum amount of characters to append. (may not be exact!)
sThe source text that must be escaped
virtual void PreEmptive.Analytics.Common.Tags.Tag.AppendSerializedInnerTags ( StringBuilder  sb,
IAttributeLimiter  limits 
)
protectedvirtual

Will serialize the inner tags and return them as a string

Reimplemented in PreEmptive.Analytics.Common.Tags.MessagesTag.

virtual void PreEmptive.Analytics.Common.Tags.Tag.AppendToStringBuilder ( StringBuilder  sb,
IAttributeLimiter  limits 
)
virtual

Serializes the tag to a string appending directly onto the passed in StringBuilder

Parameters
sbThe StringBuilder to serialize to
limitsThe field size limits of the upsteam server

Reimplemented in PreEmptive.Analytics.Common.Message.

string PreEmptive.Analytics.Common.Tags.Tag.Escape ( string  s,
int?  maxLength = null 
)
protected

Escapes characters from the given string

Parameters
sThe string to escape.
maxLengthMaximum amount of characters to process (may not be exact!)
Returns
The escaped string.
static Tag PreEmptive.Analytics.Common.Tags.Tag.FromReader ( TextReader  reader)
static

Creates (deserializes) a Tag object from an XML string provided by a TextReader

Parameters
readerThe TextReader with the XML string content.
Returns
The tag object that was created, or null if there was an error
static Tag PreEmptive.Analytics.Common.Tags.Tag.FromString ( string  str)
static

Creates a Tag object from an XML string.

Parameters
strThe XML string that is converted into a Tag object.
Returns
The Tag object that was created from the provided XML string, or null if there was an error
virtual string PreEmptive.Analytics.Common.Tags.Tag.ToString ( IAttributeLimiter  limits)
virtual

Converts the Tag object to an XML string.

Parameters
limitsAttributeLimiter for limiting the size of attributes
Returns
The XML string representing the Tag object.

Reimplemented in PreEmptive.Analytics.Common.Message, and PreEmptive.Analytics.Common.Tags.MessagesTag.

override string PreEmptive.Analytics.Common.Tags.Tag.ToString ( )

Converts the Tag object to an XML string.

Returns
The XML string representing the Tag object.

Member Data Documentation

AttributeList PreEmptive.Analytics.Common.Tags.Tag.Attributes = new AttributeList()

The list of attributes that will be added to the Tag.

Property Documentation

List<Tag> PreEmptive.Analytics.Common.Tags.Tag.InnerTags
getset

A list of tags that are nested within this tag.

virtual string PreEmptive.Analytics.Common.Tags.Tag.TagDescription
get

A more descriptive tag name.

virtual string PreEmptive.Analytics.Common.Tags.Tag.TagName
get

The name of the tag.


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