Class NodeCollection
A collection of Node objects.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Base.dll
Syntax
public class NodeCollection : CollectionEx, IList, ICollection, IEnumerable, ICloneable, ISerializable, IServiceReferenceHolder, IServiceReferenceProvider
Constructors
NodeCollection()
Initializes a new instance of the NodeCollection class.
Declaration
public NodeCollection()
NodeCollection(NodeCollection)
Initializes a new instance of the NodeCollection class.
Declaration
public NodeCollection(NodeCollection src)
Parameters
Type | Name | Description |
---|---|---|
NodeCollection | src | The node collection |
NodeCollection(NodeCollection, Boolean)
Initializes a new instance of the NodeCollection class.
Declaration
public NodeCollection(NodeCollection src, bool cloning)
Parameters
Type | Name | Description |
---|---|---|
NodeCollection | src | The node collection |
System.Boolean | cloning | Clone the collection. |
NodeCollection(Object)
Initializes a new instance of the NodeCollection class.
Declaration
public NodeCollection(object owner)
Parameters
Type | Name | Description |
---|---|---|
System.Object | owner | The owner. |
NodeCollection(SerializationInfo, StreamingContext)
Initializes a new instance of the NodeCollection class.
Declaration
public NodeCollection(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The info. |
System.Runtime.Serialization.StreamingContext | context | The context. |
Fields
c_strNODE
Name of the node.
Declaration
protected const string c_strNODE = "Node"
Field Value
Type |
---|
System.String |
Properties
Container
Gets or sets the container.
Declaration
public object Container { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The container. |
First
Gets or sets the first item in collection.
Declaration
public Node First { get; set; }
Property Value
Type | Description |
---|---|
Node | The first. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | If collection count less than 1. |
Item[Int32]
Gets or sets the Node at the specified index.
Declaration
public Node this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index. |
Property Value
Type | Description |
---|---|
Node | The node |
Item[String]
Gets or sets the Node with the specified node name.
Declaration
public Node this[string strNodeName] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.String | strNodeName | Node name. |
Property Value
Type | Description |
---|---|
Node | The node with the specified name. |
Last
Gets or sets the last item in collection.
Declaration
public Node Last { get; set; }
Property Value
Type | Description |
---|---|
Node | The last. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | If collection count less than 1. |
Methods
Add(Node)
Adds an node to the end of the NodeCollection.
Declaration
public int Add(Node node)
Parameters
Type | Name | Description |
---|---|---|
Node | node | The node to add. |
Returns
Type | Description |
---|---|
System.Int32 | The value |
Clone()
Creates a new object that is a copy of the current instance.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | A new object that is a copy of this instance. |
Overrides
Contains(Node)
Determines whether NodeCollection contains the specified node.
Declaration
public bool Contains(Node node)
Parameters
Type | Name | Description |
---|---|---|
Node | node | The node. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Contains(String)
Determines whether NodeCollection contains the node with specified name.
Declaration
public bool Contains(string strNodeName)
Parameters
Type | Name | Description |
---|---|---|
System.String | strNodeName | Name of the node. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CopyTo(Node[], Int32)
Copies the entire NodeCollection to a compatible one-dimensional System.Array, starting at the beginning of the target array.
Declaration
public void CopyTo(Node[] nodes, int index)
Parameters
Type | Name | Description |
---|---|---|
Node[] | nodes | The one-dimensional array that is the destination of the elements copied from NodeCollection. |
System.Int32 | index | is equal to or greater than the length of |
FindNodeByName(String)
Finds the node by unique name.
Declaration
public Node FindNodeByName(string strNodeName)
Parameters
Type | Name | Description |
---|---|---|
System.String | strNodeName | Name of the node. |
Returns
Type | Description |
---|---|
Node | The node. |
GenerateUniqueName(Node)
Generates the unique node name.
Declaration
protected string GenerateUniqueName(Node node)
Parameters
Type | Name | Description |
---|---|---|
Node | node | The node. |
Returns
Type | Description |
---|---|
System.String | The unique name. |
GetEnumerator()
Returns an enumerator that iterates through a collection.
Declaration
public override IEnumerator GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | An System.Collections.IEnumerator object that can be used to iterate through the collection. |
Overrides
IndexOf(Node)
Searches for the specified node and returns the zero-based index of the first occurrence within the entire NodeCollection.
Declaration
public int IndexOf(Node node)
Parameters
Type | Name | Description |
---|---|---|
Node | node | The node. |
Returns
Type | Description |
---|---|
System.Int32 | The zero-based index of the first occurrence of |
Insert(Int32, Node)
Inserts an element into the NodeCollection.
Declaration
public void Insert(int index, Node node)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based starting index of the search. |
Node | node | The node to locate in the NodeCollection. |
OnValidate(ICollection)
Validates given values.
Declaration
protected override void OnValidate(ICollection values)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.ICollection | values | The values to validate. |
Overrides
Exceptions
Type | Condition |
---|---|
System.InvalidCastException |
OnValidate(Object)
Validates given value.
Declaration
protected override void OnValidate(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | value to validate |
Overrides
Exceptions
Type | Condition |
---|---|
System.InvalidCastException |
RaiseChangesCompleteEvent(CollectionExEventArgs)
Raises ChangesComplete event.
Declaration
protected override void RaiseChangesCompleteEvent(CollectionExEventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
CollectionExEventArgs | evtArgs | event args |
Overrides
RaiseChangingEvent(CollectionExEventArgs)
Raise Changing event.
Declaration
protected override void RaiseChangingEvent(CollectionExEventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
CollectionExEventArgs | evtArgs | event args |
Overrides
Remove(Node)
Removes the first occurrence of a specific node from the NodeCollection.
Declaration
public bool Remove(Node node)
Parameters
Type | Name | Description |
---|---|---|
Node | node | The node. |
Returns
Type | Description |
---|---|
System.Boolean | true, if remove the node, false otherwise. |
Remove(NodeCollection)
Removes a range of elements from the NodeCollection.
Declaration
public void Remove(NodeCollection nodes)
Parameters
Type | Name | Description |
---|---|---|
NodeCollection | nodes | The nodes. |
UpdateServiceReferences(CollectionExEventArgs)
Updates the service references the collection members.
Declaration
protected override void UpdateServiceReferences(CollectionExEventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
CollectionExEventArgs | evtArgs | The CollectionExEventArgs instance containing the event data. |