Пример #1
0
 /// <summary>
 /// //Gets instance of CityGraph
 /// </summary>
 public SOAPService()
 {
     _graph = CityGraph.Instance;
 }
Пример #2
0
 private void GraphInit()
 {
     _graph = CityGraph.Instance;
     _graph.InsertVertex(
         "Tirana",
         "Nicosia",
         "Tórshavn",
         "Douglas",
         "Sarajevo",
         "Skopje",
         "Ljubljana",
         "Podgorica",
         "Sofia",
         "Tallinn"
     );
     _graph.ApplyDiscount("Tirana", "Sarajevo");
     _graph.RemoveEdges("Tirana", "Sarajevo");
     var result = _graph.FindCheapestPath("Tirana", "Nicosia");
     var result2 = _graph.FindCheapestPath("Tirana", "Sofia");
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the Internal_Server.TcpConnection class
 /// </summary>
 private TcpConnection()
 {
     _clients = new List<Socket>();
     _graph = CityGraph.Instance;
 }