private static DSXmlHelper CallService(string serviceName, DSXmlHelper request) { string Server; //if (Diagnostic.DebugMode && Diagnostic.Options.UseInsideGlobalConfigurationServer) // Server = Diagnostic.Options.InsideGlobalConfigurationServer; //else Server = "quality"; if (Connection == null) { try { Connection = new DSConnection(Server, "anonymous", ""); } catch (Exception) { //ExceptionReport report = new ExceptionReport(); //report.AddType(typeof(HttpWebResponse), true); //report.AddType(typeof(HttpWebRequest), true); Console.WriteLine("嘗試連線到組態儲存主機失敗({0})。", Server); //Console.WriteLine(report.Transform(ex)); throw; } } return(Connection.SendRequest(serviceName, request)); }
private static DSXmlHelper CallService(string serviceName, DSXmlHelper request) { string Server; //if (Diagnostic.DebugMode && Diagnostic.Options.UseInsideGlobalConfigurationServer) // Server = Diagnostic.Options.InsideGlobalConfigurationServer; //else Server = "quality"; if (Connection == null) { try { Connection = new DSConnection(Server, "anonymous", ""); Connection.Connect(); } catch (Exception ex) { ExceptionReport report = new ExceptionReport(); report.AddType(typeof(HttpWebResponse), true); report.AddType(typeof(HttpWebRequest), true); Console.WriteLine("嘗試連線到組態儲存主機失敗({0})。", Server); Console.WriteLine(report.Transform(ex)); throw; } } return Connection.SendRequest(serviceName, request); }
public void createConnection() { DSConnection newConnection = new DSConnection(selectedInPoint, selectedOutPoint, this); DSConnection oldConnection = _connections.Find(x => x.outPoint == newConnection.outPoint); if (oldConnection != null) { _connections.Remove(oldConnection); } _connections.Add(newConnection); }
private DSA() { try { Connection conn = new Connection(); conn.EnableSession = false; conn.Connect(PRODUCTION_ACCESSPOINT, "", "anonymous", ""); _conn = new DSConnection(conn); } catch (Exception) { //CurrentUser.ReportError(ex); MsgBox.Show("使用者回饋機制發生連線錯誤。"); } }
public void simulate() { DSNode currentNode = _nodes.Find(x => x.title.Equals("Start")); while (currentNode != null) { currentNode.execute(); DSConnection next = null; if (currentNode.isSelectionNode) { DSSelectionNode currentSelectionNode = (DSSelectionNode)currentNode; if (currentSelectionNode.result && currentSelectionNode.trueOutPoint != null) { next = _connections.Find(x => x.outPoint == currentSelectionNode.trueOutPoint); } else if (!currentSelectionNode.result && currentSelectionNode.falseOutPoint != null) { next = _connections.Find(x => x.outPoint == currentSelectionNode.falseOutPoint); } else { break; } } else { if (currentNode.outPoint == null) { break; } next = _connections.Find(x => x.outPoint == currentNode.outPoint); } if (next == null) { break; } currentNode = _nodes.Find(x => x.id == next.inPoint.nodeID); } }
public ConfigProvider_Global() { Connection = null; }
public void removeConnection(DSConnection connection) { _connections.Remove(connection); }