Esempio n. 1
0
 public static IGraphs GetCopy(this IGraphs copyGraph)
 {
     return(new Graphs
     {
         GNodes = copyGraph.GNodes,
         GEdges = copyGraph.GEdges
     });
 }
Esempio n. 2
0
        private static void Main(string[] args)
        {
            Graphs g = new Graphs();

            for (int i = 1; i <= 4; i++)
            {
                g.GNodes.Add(new Node(i));
            }
            Edge edge  = new Edge(g.GNodes[0], g.GNodes[1]);
            Edge edge2 = new Edge(g.GNodes[0], g.GNodes[3]);

            g.GEdges.Add(edge);
            g.GEdges.Add(edge2);

            IGraphs oG = g.GetCopy();

            g.DelegateCreation(Delegates);

            bool diff = ReferenceEquals(g, oG);

            Console.ReadLine();
        }
Esempio n. 3
0
 public static IGraphs GetFullGraph(this IGraphs graph)
 {
     return(new Graphs());
 }
Esempio n. 4
0
 public static void DelegateCreation(this IGraphs g, Action <IGraphs> delegates)
 {
     delegates(g);
 }
Esempio n. 5
0
 private static void Delegates(IGraphs obj)
 {
     throw new NotImplementedException();
 }