/// <summary /> /// <remarks /> public virtual void RemoveKeyType(KeyType o) { this.List.Remove(o); }
/// <summary> /// Serializes the filtered graph g to xml /// </summary> /// <param name="writer">xml writer</param> /// <param name="baseGraph">"base" graph of g</param> /// <param name="g">graph to serialize</param> /// <exception cref="ArgumentNullException">writer or g are null</exception> /// <exception cref="ArgumentException">g vertex or edge does not /// implement <see cref="QuickGraph.Concepts.Serialization.IGraphSerializable"/>. /// </exception> public void Serialize( XmlWriter writer, ISerializableVertexAndEdgeListGraph baseGraph, IVertexAndEdgeListGraph g ) { GraphMltype graphml = new GraphMltype(); KeyType graphTypeKey = new KeyType(); graphTypeKey.ID = graphTypeKeyName; graphml.Key.AddKeyType(graphTypeKey); KeyType vertexProviderTypeKey = new KeyType(); vertexProviderTypeKey.ID = vertexProviderTypeKeyName; graphml.Key.AddKeyType(vertexProviderTypeKey); KeyType edgeProviderTypeKey = new KeyType(); edgeProviderTypeKey.ID = edgeProviderTypeKeyName; graphml.Key.AddKeyType(edgeProviderTypeKey); KeyType allowParralelEdgeKey = new KeyType(); allowParralelEdgeKey.ID = allowParallelEdgesKeyName; graphml.Key.AddKeyType(allowParralelEdgeKey); KeyType nameKey = new KeyType(); nameKey.ID = @"name"; graphml.Key.AddKeyType(nameKey); GraphType graph = SerializeGraph(baseGraph,g); graphml.Items.AddGraph(graph); // add dtd // <!DOCTYPE graphml PUBLIC "-GraphML DTD" "http://graphml.graphdrawing.org/dtds/1.0rc/graphml.dtd"> //writer.WriteDocType("graphml","-GraphML DTD",this.dtdPath,null); // serialize XmlSerializer ser = new XmlSerializer(typeof(GraphMltype)); ser.Serialize(writer,graphml); }
/// <summary /> /// <remarks /> public virtual bool ContainsKeyType(KeyType o) { return this.List.Contains(o); }
/// <summary /> /// <remarks /> public virtual void AddKeyType(KeyType o) { this.List.Add(o); }
/// <summary /> /// <remarks /> public virtual bool ContainsKeyType(KeyType o) { return(this.List.Contains(o)); }