Class
ElementNode

Represents an element node in the Element Explorer

Definition

Namespace:ArtOfTest.Common.Design.ProjectModel

Assembly:ArtOfTest.WebAii.Design.dll

Syntax:

cs-api-definition
public class ElementNode

Inheritance: objectElementNode

Constructors

ElementNode(INodeData, ElementDescriptor)

Create a new ElementNode.

Declaration

cs-api-definition
public ElementNode(INodeData node, ElementDescriptor descriptor)

Parameters

node

INodeData

The node data.

descriptor

ElementDescriptor

Fields

MAX_FRIENDLYNAME_LENGTH

Max length for a friendly name

Declaration

cs-api-definition
public const int MAX_FRIENDLYNAME_LENGTH = 30

Field Value

int

Properties

AssociatedDescriptor

Gets the associated descriptor

Declaration

cs-api-definition
public ElementDescriptor AssociatedDescriptor { get; }

Property Value

ElementDescriptor

Children

Gets the list of children.

Declaration

cs-api-definition
public ElementNodeCollection Children { get; }

Property Value

ElementNodeCollection

Container

Declaration

cs-api-definition
public object Container { get; set; }

Property Value

object

Depth

Gets or sets the depth of this node.

Declaration

cs-api-definition
public int Depth { get; set; }

Property Value

int

ErrorDetails

Declaration

cs-api-definition
public string ErrorDetails { get; set; }

Property Value

string

InError

Declaration

cs-api-definition
public bool InError { get; set; }

Property Value

bool

IsDirty

Declaration

cs-api-definition
public bool IsDirty { get; set; }

Property Value

bool

Name

Gets or sets the Friendly Name of this node.

Declaration

cs-api-definition
public string Name { get; set; }

Property Value

string

NodeData

Gets the node data of this node.

Declaration

cs-api-definition
public INodeData NodeData { get; }

Property Value

INodeData

NodeType

Declaration

cs-api-definition
public Type NodeType { get; set; }

Property Value

Type

Parent

Gets the parent.

Declaration

cs-api-definition
public ElementNode Parent { get; }

Property Value

ElementNode

Shadows

The shadow node data represented by this node.

Declaration

cs-api-definition
public Dictionary<ElementDescriptor, INodeData> Shadows { get; }

Property Value

Dictionary<ElementDescriptor, INodeData>

VariableReference

Declaration

cs-api-definition
[Browsable(false)]
public CodeExpression VariableReference { get; set; }

Property Value

CodeExpression

Methods

AddChild(ElementNode)

Add a child to this node.

Declaration

cs-api-definition
public ElementNode AddChild(ElementNode node)

Parameters

node

ElementNode

The child node

Returns

ElementNode

The child node added

AddShadow(INodeData, ElementDescriptor)

Adds a Shadow node to this node.

Declaration

cs-api-definition
public void AddShadow(INodeData node, ElementDescriptor descriptor)

Parameters

node

INodeData

descriptor

ElementDescriptor

Attach()

Attach any events we are connected to.

Declaration

cs-api-definition
public void Attach()

Clone()

Clone this node.

Declaration

cs-api-definition
public ElementNode Clone()

Returns

ElementNode

The cloned node

Detach()

Detach any events we are connected to.

Declaration

cs-api-definition
public void Detach()

Equals(object)

Determines if two ElementNode objects are equal.

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

The object to compare

Returns

bool

True/False whether they match

Overrides object.Equals(object)

GetElementDescriptor()

Get the element descriptor of this node. This method will always create a new ElementDescriptor object

Declaration

cs-api-definition
public ElementDescriptor GetElementDescriptor()

Returns

ElementDescriptor

GetHashCode()

Returns the hashcode for this object.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

Overrides object.GetHashCode()

GetParentElementOfKind<T>(int)

Gets the parent page Uri, else null

Declaration

cs-api-definition
public ElementNode GetParentElementOfKind<T>(int kind)

Parameters

kind

int

Returns

ElementNode

GetParentOfKind<T>(int)

Gets the parent page Uri, else null

Declaration

cs-api-definition
public T GetParentOfKind<T>(int kind)

Parameters

kind

int

Returns

T

InsertChild(int, ElementNode)

Add a child to this node.

Declaration

cs-api-definition
public ElementNode InsertChild(int index, ElementNode node)

Parameters

index

int

Insertion index

node

ElementNode

The child node

Returns

ElementNode

The child node added

OnReplaceNode(object, ElementNodeEventArgs)

Declaration

cs-api-definition
public void OnReplaceNode(object sender, ElementNodeEventArgs args)

Parameters

sender

object

args

ElementNodeEventArgs

RemoveByDescriptor(ElementDescriptor)

Remove the elements associated with the passed in descriptor instance.

Declaration

cs-api-definition
public void RemoveByDescriptor(ElementDescriptor descriptor)

Parameters

descriptor

ElementDescriptor

RemoveSelfIfNeeded()

Remove the element node itself

Declaration

cs-api-definition
public void RemoveSelfIfNeeded()

SetIndependent(ElementDescriptor)

Declaration

cs-api-definition
public void SetIndependent(ElementDescriptor descriptor)

Parameters

descriptor

ElementDescriptor

SetParent(ElementNode)

Set the parent of this node.

Declaration

cs-api-definition
public void SetParent(ElementNode parent)

Parameters

parent

ElementNode

The parent node

ToString()

Declaration

cs-api-definition
public override string ToString()

Returns

string

Overrides object.ToString()

Events

ReplaceNode

Declaration

cs-api-definition
public event EventHandler<ElementNodeEventArgs> ReplaceNode

Event Value

EventHandler<ElementNodeEventArgs>

Extension Methods