Example #1
0
        }//method

        #endregion

        #region the actual example

        public void Run()
        {
            GraphDSClient = new GraphDS_RemoteClient(new Uri("http://localhost:9970/rpc"));
            SecToken      = GraphDSClient.LogOn(new RemoteUserPasswordCredentials("test", "test"));
            TransToken    = GraphDSClient.BeginTransaction(SecToken);

            GraphDSClient.Clear <IRequestStatistics>(SecToken, TransToken, new RequestClear(), (Statistics, DeletedTypes) => Statistics);

            #region create types, create instances and additional work using the GraphDB API

            GraphDSClient.Clear <IRequestStatistics>(SecToken, TransToken, new RequestClear(), (Statistics, DeletedTypes) => Statistics);

            Console.WriteLine("Press enter to start example");
            Console.ReadLine();

            GraphDBRequests();

            #endregion

            //clear the DB (delete all created types) to create them again using the QueryLanguage
            GraphDSClient.Clear <IRequestStatistics>(SecToken, TransToken, new RequestClear(), (Statistics, DeletedTypes) => Statistics);

            #region create some types and insert values using the SonesQueryLanguage

            GraphQLQueries();

            #endregion

            #region make some SELECTS

            SELECTS();

            #endregion

            Console.WriteLine();
            Console.WriteLine("Finished Example. Type a key to finish!");
            Console.ReadKey();
        }
Example #2
0
        }//method
        #endregion

        #region the actual example

        public void Run()
        {
            
            GraphDSClient = new GraphDS_RemoteClient(new Uri("http://localhost:9970/rpc"));
            SecToken = GraphDSClient.LogOn(new RemoteUserPasswordCredentials("test", "test"));
            TransToken = GraphDSClient.BeginTransaction(SecToken);

            Tests();
            GraphDSClient.Clear<IRequestStatistics>(SecToken, TransToken, new RequestClear(), (Statistics, DeletedTypes) => Statistics);

            #region create types, create instances and additional work using the GraphDB API

            GraphDSClient.Clear<IRequestStatistics>(SecToken, TransToken, new RequestClear(), (Statistics, DeletedTypes) => Statistics);

            Console.WriteLine("Press enter to start example");
            Console.ReadLine();

            GraphDBRequests();

            #endregion

            //clear the DB (delete all created types) to create them again using the QueryLanguage
            GraphDSClient.Clear<IRequestStatistics>(SecToken, TransToken, new RequestClear(), (Statistics, DeletedTypes) => Statistics);

            #region create some types and insert values using the SonesQueryLanguage

            GraphQLQueries();

            #endregion

            #region make some SELECTS

            SELECTS();

            #endregion

            Console.WriteLine();
            Console.WriteLine("Finished Example. Type a key to finish!");
            Console.ReadKey();
        }