private NetworkNode_line_class[] Get_new_nodes_with_indexes_above_max_index(Add_node_line_class[] add_nodes) { int add_index = Get_max_nw_index(); add_nodes = Add_node_line_class.Order_by_standard_way(add_nodes); Add_node_line_class add_node_line; int add_nodes_length = add_nodes.Length; List <NetworkNode_line_class> new_nodes = new List <NetworkNode_line_class>(); NetworkNode_line_class new_node_line; for (int indexN = 0; indexN < add_nodes_length; indexN++) { add_node_line = add_nodes[indexN]; if ((indexN == 0) || (!add_node_line.Equal_in_standard_way(add_nodes[indexN - 1]))) { add_index++; new_node_line = new NetworkNode_line_class(); new_node_line.Id = (string)add_node_line.Id.Clone(); new_node_line.Name = (string)add_node_line.Name.Clone(); new_node_line.NW_index = add_index; new_nodes.Add(new_node_line); } else { throw new Exception(); } } return(new_nodes.ToArray()); }
public bool Equal_in_standard_way(Add_node_line_class other) { bool equal = ((this.Id.Equals(other.Id)) && (this.Name.Equals(other.Name)) && (this.Ontology_type.Equals(other.Ontology_type)) && (this.Ontology_namespace.Equals(other.Ontology_namespace))); return(equal); }