Show / Hide Table of Contents

Class Element

Represents an XML element in an AML structure. This element could be an Item, property, result tag, or something else

Inheritance
System.Object
Element
Item
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Innovator.Client
Assembly: Innovator.Client.dll
Syntax
public abstract class Element : IElement, IReadOnlyElement, IAmlNode, ILinkedElement, ILink<ILinkedElement>

Constructors

| Improve this Doc View Source

Element()

Initializes a new instance of the Element class.

Declaration
public Element()

Fields

| Improve this Doc View Source

_attr

Field containing a reference to the element attributes

Declaration
protected ElementAttributes _attr
Field Value
Type Description
ElementAttributes
| Improve this Doc View Source

_content

Field containing the element content (either a child IElement or the value)

Declaration
protected object _content
Field Value
Type Description
System.Object

Properties

| Improve this Doc View Source

AmlContext

Retrieve the context used for rendering primitive values

Declaration
public virtual ElementFactory AmlContext { get; }
Property Value
Type Description
ElementFactory
Implements
IReadOnlyElement.AmlContext
| Improve this Doc View Source

Exists

Returns true if this element actually exists in the underlying AML, otherwise, returns false to indicate that the element is just a null placeholder put in place to reduce unnecessary null reference checks

Declaration
public virtual bool Exists { get; }
Property Value
Type Description
System.Boolean
Implements
IReadOnlyElement.Exists
| Improve this Doc View Source

Name

Local XML name of the element

Declaration
public abstract string Name { get; }
Property Value
Type Description
System.String
Implements
IReadOnlyElement.Name
ILink<T>.Name
| Improve this Doc View Source

Next

The next sibling AML element (if any)

Declaration
public abstract ILinkedElement Next { get; set; }
Property Value
Type Description
ILinkedElement
Implements
ILink<T>.Next
| Improve this Doc View Source

Parent

Retrieve the parent element

Declaration
public abstract IElement Parent { get; set; }
Property Value
Type Description
IElement
Implements
IElement.Parent
| Improve this Doc View Source

ReadOnly

Indicates if the element is read only

Declaration
public bool ReadOnly { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Value

String value of the element

Declaration
public virtual string Value { get; set; }
Property Value
Type Description
System.String
Implements
IReadOnlyElement.Value

Methods

| Improve this Doc View Source

Add(Object)

Add new content to the element

Declaration
public virtual IElement Add(object content)
Parameters
Type Name Description
System.Object content
Returns
Type Description
IElement
Implements
IElement.Add(Object)
| Improve this Doc View Source

AssertModifiable()

Asserts that the element is modifiable modifiable.

Declaration
protected void AssertModifiable()
Exceptions
Type Condition
System.InvalidOperationException

If the user attempts to modify a read only element

| Improve this Doc View Source

Attribute(String)

Retrieve the attribute with the specified name

Declaration
public IAttribute Attribute(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
IAttribute
Implements
IElement.Attribute(String)
| Improve this Doc View Source

Attributes()

Retrieve all attributes specified for the element

Declaration
public IEnumerable<IAttribute> Attributes()
Returns
Type Description
System.Collections.Generic.IEnumerable<IAttribute>
Implements
IElement.Attributes()
| Improve this Doc View Source

Clone(IElement)

Clones the element, specifying a new parent.

Declaration
protected virtual Element Clone(IElement newParent)
Parameters
Type Name Description
IElement newParent

The new parent.

Returns
Type Description
Element

A copy of the element

| Improve this Doc View Source

CopyData(IReadOnlyElement)

Copies data from elem into this instance.

Declaration
protected void CopyData(IReadOnlyElement elem)
Parameters
Type Name Description
IReadOnlyElement elem

The elem to copy from.

| Improve this Doc View Source

Elements()

Retrieve all child elements

Declaration
public virtual IEnumerable<IElement> Elements()
Returns
Type Description
System.Collections.Generic.IEnumerable<IElement>
Implements
IElement.Elements()
| Improve this Doc View Source

Remove()

Remove the element from its parent

Declaration
public void Remove()
Implements
IElement.Remove()
| Improve this Doc View Source

RemoveAttributes()

Remove attributes from the element

Declaration
public void RemoveAttributes()
Implements
IElement.RemoveAttributes()
| Improve this Doc View Source

RemoveNodes()

Remove child nodes from the element

Declaration
public void RemoveNodes()
Implements
IElement.RemoveNodes()
| Improve this Doc View Source

ToAml(XmlWriter, AmlWriterSettings)

Write the node to the specified System.Xml.XmlWriter

Declaration
public void ToAml(XmlWriter writer, AmlWriterSettings settings)
Parameters
Type Name Description
System.Xml.XmlWriter writer

System.Xml.XmlWriter to write the node to

AmlWriterSettings settings

Settings controlling how the node is written

Implements
IAmlNode.ToAml(XmlWriter, AmlWriterSettings)
| Improve this Doc View Source

ToString()

Returns a System.String that has the AML of the element.

Declaration
public override string ToString()
Returns
Type Description
System.String

A System.String that has the AML of the element.

Overrides
System.Object.ToString()

Explicit Interface Implementations

| Improve this Doc View Source

ILinkedElement.Parent

Retrieve the parent element

Declaration
IReadOnlyElement ILinkedElement.Parent { get; set; }
Returns
Type Description
IReadOnlyElement
Implements
ILinkedElement.Parent
| Improve this Doc View Source

IReadOnlyElement.Attribute(String)

Declaration
IReadOnlyAttribute IReadOnlyElement.Attribute(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
IReadOnlyAttribute
Implements
IReadOnlyElement.Attribute(String)
| Improve this Doc View Source

IReadOnlyElement.Attributes()

Declaration
IEnumerable<IReadOnlyAttribute> IReadOnlyElement.Attributes()
Returns
Type Description
System.Collections.Generic.IEnumerable<IReadOnlyAttribute>
Implements
IReadOnlyElement.Attributes()
| Improve this Doc View Source

IReadOnlyElement.Elements()

Declaration
IEnumerable<IReadOnlyElement> IReadOnlyElement.Elements()
Returns
Type Description
System.Collections.Generic.IEnumerable<IReadOnlyElement>
Implements
IReadOnlyElement.Elements()
| Improve this Doc View Source

IReadOnlyElement.Parent

Retrieve the parent element

Declaration
IReadOnlyElement IReadOnlyElement.Parent { get; }
Returns
Type Description
IReadOnlyElement
Implements
IReadOnlyElement.Parent

Extension Methods

ItemExtensions.ToAml(IAmlNode, AmlWriterSettings)
ItemExtensions.ToAml(IAmlNode, XmlWriter)
ItemExtensions.Element(IReadOnlyElement, String)
ItemExtensions.Add(IElement, Object[])
ItemExtensions.ToXml(IAmlNode)
ItemExtensions.CreateReader(IReadOnlyElement)
ItemExtensions.Parents(IReadOnlyElement)
ItemExtensions.ParentsAndSelf(IReadOnlyElement)
ItemExtensions.InnerText(IReadOnlyElement)
  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX