Back to top OpenSVG (c) Veridict AB, www.veridict.com
Edit this page

Class StringAttr

Represents an attribute for string values.

Inheritance
object
Attr<string>
StringAttr
Implements
IAttr
IEquatable<IAttr>
IEquatable<Attr<string>>
Inherited Members
Attr<string>.DefaultValue
Attr<string>.Name
Attr<string>.IsConstant
Attr<string>.ShouldBeSerialized
Attr<string>.SetBySerializer(string)
Attr<string>.ToXmlString()
Attr<string>.DefaultEquals(string)
Attr<string>.ValueEquals(string)
Attr<string>.Equals(Attr<string>)
Attr<string>.Set(string)
Attr<string>.Get()
Attr<string>.ToString()
Attr<string>.Equals(IAttr)
Attr<string>.GetHashCode()
Attr<string>.Equals(object)
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: OpenSvg.Attributes
Assembly: OpenSvg.dll
Syntax
public class StringAttr : Attr<string>, IAttr, IEquatable<IAttr>, IEquatable<Attr<string>>

Constructors

| Edit this page View Source

StringAttr(string, string, bool)

Constructs a new instance of StringAttr.

Declaration
public StringAttr(string name, string defaultValue, bool isConstant)
Parameters
Type Name Description
string name

The name of this attribute.

string defaultValue

The default value of this attribute.

bool isConstant

Set whether this attribute is constant or if the value can be changed.

Methods

| Edit this page View Source

Deserialize(string)

Deserializes an XML string to the value of the attribute.

Declaration
protected override string Deserialize(string xmlString)
Parameters
Type Name Description
string xmlString

The XML string to deserialize.

Returns
Type Description
string

The deserialized value.

Overrides
Attr<string>.Deserialize(string)
| Edit this page View Source

Serialize(string)

Serializes the value of the attribute to an XML string.

Declaration
protected override string Serialize(string value)
Parameters
Type Name Description
string value

The value to serialize.

Returns
Type Description
string

The XML string representation of the value.

Overrides
Attr<string>.Serialize(string)

Implements

IAttr
IEquatable<T>
IEquatable<T>