In This Article

BarLayoutXmlSerializer Class

Serializes BarManager layouts to XML.

public class BarLayoutXmlSerializer
Inheritance:
object object

Properties

BarManager

The BarManager that is managing the layout.

public BarManager? BarManager { get; }

Property Value

BarManager

IsComplete

Indicates whether to load and/or save a complete layout.

public bool IsComplete { get; }

Property Value

bool:

true if a complete layout should be loaded and/or saved; otherwise, a differential layout should be loaded and/or saved.

Reader

The System.Xml.XmlTextReader to use for reading data.

public XmlTextReader? Reader { get; }

Property Value

XmlTextReader

Writer

The System.Xml.XmlTextWriter to use for writing data.

public XmlTextWriter? Writer { get; }

Property Value

XmlTextWriter

Methods

CreateException(string)

Creates a basic exception to be thrown by the caller.

public Exception CreateException(string message)
Parameter Type Description
message string

The message to include in the exception.

Returns

Exception

CreateUnrecognizedTagException(string)

Creates an exception when an unrecognized tag is located that should be thrown by the caller.

public Exception CreateUnrecognizedTagException(string parentTagName)
Parameter Type Description
parentTagName string

The name of the parent tag where the problem occurred.

Returns

Exception

GetImageFromString(string)

Returns an Image from a base-64 encoded string.

public Image GetImageFromString(string imageData)
Parameter Type Description
imageData string

The encoded string to examine.

Returns

Image

GetStringFromImage(Image)

Returns a base-64 encoded string representing an Image.

public string GetStringFromImage(Image image)
Parameter Type Description
image Image

The Image to encode.

Returns

string

ReadBooleanAttribute(string, string, bool)

Reads a node for a boolean attribute value.

public bool ReadBooleanAttribute(string tagName, string attributeName, bool defaultValue)
Parameter Type Description
tagName string

The name of the tag being examined.

attributeName string

The name of the attribute whose value is being returned.

defaultValue bool

The default value to return if the attribute is not specified.

Returns

bool

ReadDefaultableBooleanAttribute(string, string, DefaultableBoolean)

Reads a node for a DefaultableBoolean attribute value.

public DefaultableBoolean ReadDefaultableBooleanAttribute(string tagName, string attributeName, DefaultableBoolean defaultValue)
Parameter Type Description
tagName string

The name of the tag being examined.

attributeName string

The name of the attribute whose value is being returned.

defaultValue DefaultableBoolean

The default value to return if the attribute is not specified.

Returns

DefaultableBoolean

ReadIntegerAttribute(string, string, int)

Reads a node for an integer attribute value.

public int ReadIntegerAttribute(string tagName, string attributeName, int defaultValue)
Parameter Type Description
tagName string

The name of the tag being examined.

attributeName string

The name of the attribute whose value is being returned.

defaultValue int

The default value to return if the attribute is not specified.

Returns

int

ReadPointAttribute(string, string, Point)

Reads a node for a Point attribute value.

public Point ReadPointAttribute(string tagName, string attributeName, Point defaultValue)
Parameter Type Description
tagName string

The name of the tag being examined.

attributeName string

The name of the attribute whose value is being returned.

defaultValue Point

The default value to return if the attribute is not specified.

Returns

Point

ReadRectangleAttribute(string, string, Rectangle)

Reads a node for a Rectangle attribute value.

public Rectangle ReadRectangleAttribute(string tagName, string attributeName, Rectangle defaultValue)
Parameter Type Description
tagName string

The name of the tag being examined.

attributeName string

The name of the attribute whose value is being returned.

defaultValue Rectangle

The default value to return if the attribute is not specified.

Returns

Rectangle

ReadRequiredAttribute(string, string)

Reads a node for a required attribute and throws an exception if it doesn't exist.

public string ReadRequiredAttribute(string tagName, string attributeName)
Parameter Type Description
tagName string

The name of the tag being examined.

attributeName string

The name of the attribute whose value is being returned.

Returns

string

ReadSizeAttribute(string, string, Size)

Reads a node for a Size attribute value.

public Size ReadSizeAttribute(string tagName, string attributeName, Size defaultValue)
Parameter Type Description
tagName string

The name of the tag being examined.

attributeName string

The name of the attribute whose value is being returned.

defaultValue Size

The default value to return if the attribute is not specified.

Returns

Size

ReadStringAttribute(string, string, string?)

Reads a node for a string attribute value.

public string? ReadStringAttribute(string tagName, string attributeName, string? defaultValue)
Parameter Type Description
tagName string

The name of the tag being examined.

attributeName string

The name of the attribute whose value is being returned.

defaultValue string

The default value to return if the attribute is not specified.

Returns

string

Inherited Members

Extension Methods