public static bool LoadFromFile(string fileName, out segment obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); }
/// <summary> /// Deserializes xml markup from file into an segment object /// </summary> /// <param name="fileName">string xml file to load and deserialize</param> /// <param name="obj">Output segment object</param> /// <param name="exception">output Exception value if deserialize failed</param> /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns> public static bool LoadFromFile(string fileName, out segment obj, out System.Exception exception) { exception = null; obj = default(segment); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } }
/// <summary> /// Deserializes workflow markup into an segment object /// </summary> /// <param name="xml">string workflow markup to deserialize</param> /// <param name="obj">Output segment object</param> /// <param name="exception">output Exception value if deserialize failed</param> /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns> public static bool Deserialize(string xml, out segment obj, out System.Exception exception) { exception = null; obj = default(segment); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } }
public static bool Deserialize(string xml, out segment obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); }
private void visit(Port obj, Eagle.net net_obj) { if (!(obj.Parent.Impl is Tonka.TestComponent)) { // create a segment for this object var segment_obj = new Eagle.segment(); CreateWireSegment(obj, segment_obj); // simple routing CreatePinRef(obj, segment_obj); // destination pin net_obj.segment.Add(segment_obj); } PortNetMap[obj] = net_obj; // add to map var allPorts = (from conn in obj.DstConnections select conn.DstPort).Union (from conn in obj.SrcConnections select conn.SrcPort); foreach (var port in allPorts) // visit sources { if (!PortNetMap.ContainsKey(port)) this.visit(port, net_obj); } }