ClassiAttribute
This class represents a markup attribute (foo="bar"). The iAttribute object contains a starting 'i' to distinguish it from System.Attribute.
Definition
Namespace:ArtOfTest.WebAii.ObjectModel
Assembly:ArtOfTest.WebAii.dll
Syntax:
public class iAttribute : INotifyPropertyChanged, IiAttribute
Inheritance: objectiAttribute
Implements:
Constructors
iAttribute(string, string)
Create a new attribute.
Properties
AttributeType
Gets the attribute type (i.e. Style/Event/Other).
Declaration
public AttributeType AttributeType { get; }
Property Value
BeginQuote
Gets/Sets the begin quote type of the attribute.
Declaration
[Browsable(false)]
public Quote BeginQuote { get; set; }
Property Value
DecodedValue
The value of the attribute after converting any HTML entities to normal characters e.g. & -> &
EndQuote
Gets/Sets the end quote type of the attribute
Declaration
[Browsable(false)]
public Quote EndQuote { get; set; }
Property Value
IsSingular
Gets/Sets whether the attribute is singluar.
The nowrap attribute is a singluar attribute in <foo id="myfoo" nowrap /> .
Declaration
[Browsable(false)]
public bool IsSingular { get; set; }
Property Value
Name
Gets/Sets the name of this attribute.
RawValue
The raw value of the attribute including any quotes.
Styles
The Styles collection if AttributeType = Style.
The following element <foo style="height:1px;width:2px;" /> , will contain a NameValueCollection that consists of two items:
The first : name=height,value=1px The second : name=width,value=2px
Declaration
[Browsable(false)]
public NameValueCollection Styles { get; }
Property Value
Methods
ContainsPartialAttributeValue(iAttribute, StringComparison)
Determines whether a partial attribute value is contained in this attribute value Also makes sure the attribute name is correct.
Declaration
public bool ContainsPartialAttributeValue(iAttribute partialAttributeToCompare, StringComparison comparison)
Parameters
partialAttributeToCompare
The partial attribute to compare.
comparison
Type of comparison to perform.
Returns
True/False whether this attribute contains the parital attribute value passed in.
Equals(iAttribute, StringComparison, bool)
Determines equality between two attributes
Declaration
public bool Equals(iAttribute obj, StringComparison comparison, bool matchQuotes)
Parameters
obj
The object to compare.
comparison
The type of comparsion to perform.
matchQuotes
Whether to match the begin/end quotes or just the value.
Returns
True/False whether they are the same.
GetAttributeList(params string[])
Quick shortcut to get a list of attributes. Pass in the name/value pairs as a semi-colon delimited list.
Note: Any string that don't contain a pair will be ignored. Don't include an type of quotes.
Declaration
public static Collection<iAttribute> GetAttributeList(params string[] nameValuePairs)
Parameters
nameValuePairs
string[]
The name value pairs.
Returns
The list of attributes.
ToString()
A string representation of the attribute.
Declaration
public override string ToString()
Returns
The string representation.
Overrides
Events
PropertyChanged
Occurs when a property changes on this iAttribute object.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Value
Implements