예제 #1
0
        private void run()
        {
            GraphWalkerRestClient gwRestClient = new GraphWalkerRestClient();

            Type            smallModelType = typeof(SmallModel);
            ConstructorInfo ctor           = smallModelType.GetConstructor(System.Type.EmptyTypes);

            // As long as we have elemnts from GraphWalkers path generation
            // to fetch, we'll continue
            while (gwRestClient.hasNext())
            {
                // Get the next element name from GraphWalker.
                // The element might either be an edge or a vertex.
                string methodName = gwRestClient.getNext();

                // Invoke a method call on  the class SmallModel, using the methodName
                object     instance   = ctor.Invoke(null);
                MethodInfo methodInfo = smallModelType.GetMethod(methodName);
                methodInfo.Invoke(instance, new object[] {});

                // If any data, write it to the terminal.
                Console.WriteLine(gwRestClient.getData());
            }

            // Get the statistics from the test
            Console.WriteLine(gwRestClient.getStatistics());
        }
예제 #2
0
        private void run()
        {
            GraphWalkerRestClient gwRestClient = new GraphWalkerRestClient ();

            Type smallModelType = typeof(SmallModel);
            ConstructorInfo ctor = smallModelType.GetConstructor(System.Type.EmptyTypes);

            // As long as we have elemnts from GraphWalkers path generation
            // to fetch, we'll continue
            while (gwRestClient.hasNext())
            {

                // Get the next element name from GraphWalker.
                // The element might either be an edge or a vertex.
                string methodName = gwRestClient.getNext();

                // Invoke a method call on  the class SmallModel, using the methodName
                object instance = ctor.Invoke(null);
                MethodInfo methodInfo = smallModelType.GetMethod(methodName);
                methodInfo.Invoke(instance, new object[]{});

                // If any data, write it to the terminal.
                Console.WriteLine (gwRestClient.getData ());
            }

            // Get the statistics from the test
            Console.WriteLine (gwRestClient.getStatistics() );
        }