C# Class Open.Core.TreeNode

Represents a node within a tree data-structure.
Inheritance: ModelBase, ITreeNode, IDisposable
Mostrar archivo Open project: philcockfield/Open.TestHarness.SL

Private Properties

Property Type Description
FireAddingChild void
FireChildAdded void
FireChildRemoved void
FireChildSelectionChanged void
FireChildrenChanged void
FireClick void
FireRemovingChild void
FireSelectionChanged void
FromDictionary TreeNode
GetRoot ITreeNode
IsDescendent bool
OnChildSelectionChanged void
SetParent void
ToDictionary System.Collections.Dictionary

Public Methods

Method Description
AddChild ( ITreeNode node ) : void
ChildAt ( int index ) : ITreeNode
ClearChildren ( ) : void
Contains ( ITreeNode node ) : bool
ContainsDescendent ( ITreeNode node ) : bool
FromJson ( string json, TreeNodeFactory factory ) : TreeNode

Creates a new instance of the node from JSON.

InsertChild ( int index, ITreeNode node ) : void
RemoveChild ( ITreeNode node ) : void
ToJson ( ) : string
ToString ( ) : string

Protected Methods

Method Description
OnDisposed ( ) : void
OnIsSelectedChanged ( ) : void

Invoked after the 'IsSelected' property changes.

SerializingJson ( System.Collections.Dictionary node ) : void

Allows deriving classes to suppliment the dictionary used for JSON serialization.

Use this to add custom properties only. Do not worry about the Children collection.

Private Methods

Method Description
FireAddingChild ( TreeNodeEventArgs e ) : void
FireChildAdded ( TreeNodeEventArgs e ) : void
FireChildRemoved ( TreeNodeEventArgs e ) : void
FireChildSelectionChanged ( ) : void
FireChildrenChanged ( ) : void
FireClick ( ) : void
FireRemovingChild ( TreeNodeEventArgs e ) : void
FireSelectionChanged ( ) : void
FromDictionary ( System.Collections.Dictionary dic, TreeNodeFactory factory ) : TreeNode
GetRoot ( ) : ITreeNode
IsDescendent ( ITreeNode parent, ITreeNode node ) : bool
OnChildSelectionChanged ( object sender, EventArgs e ) : void
SetParent ( ITreeNode node, ITreeNode value ) : void
ToDictionary ( ) : System.Collections.Dictionary

Method Details

AddChild() public method

public AddChild ( ITreeNode node ) : void
node ITreeNode
return void

ChildAt() public method

public ChildAt ( int index ) : ITreeNode
index int
return ITreeNode

ClearChildren() public method

public ClearChildren ( ) : void
return void

Contains() public method

public Contains ( ITreeNode node ) : bool
node ITreeNode
return bool

ContainsDescendent() public method

public ContainsDescendent ( ITreeNode node ) : bool
node ITreeNode
return bool

FromJson() public static method

Creates a new instance of the node from JSON.
public static FromJson ( string json, TreeNodeFactory factory ) : TreeNode
json string The JSON string to parse.
factory TreeNodeFactory The factory method for creating new nodes.
return TreeNode

InsertChild() public method

public InsertChild ( int index, ITreeNode node ) : void
index int
node ITreeNode
return void

OnDisposed() protected method

protected OnDisposed ( ) : void
return void

OnIsSelectedChanged() protected method

Invoked after the 'IsSelected' property changes.
protected OnIsSelectedChanged ( ) : void
return void

RemoveChild() public method

public RemoveChild ( ITreeNode node ) : void
node ITreeNode
return void

SerializingJson() protected method

Allows deriving classes to suppliment the dictionary used for JSON serialization.
Use this to add custom properties only. Do not worry about the Children collection.
protected SerializingJson ( System.Collections.Dictionary node ) : void
node System.Collections.Dictionary The dictionary representing the node to process.
return void

ToJson() public method

public ToJson ( ) : string
return string

ToString() public method

public ToString ( ) : string
return string