예제 #1
0
        public void TestDataflow_Http_to_List()
        {
            Graph g_html = new Graph();
            HttpSource <Datensatz_Http> httpSource = new HttpSource <Datensatz_Http>("https://www.dreckstool.de/hitlist");

            httpSource.DataMappingMethod = (token) =>
            {
                var Datensatz_Http = new Datensatz_Http();
                Datensatz_Http.token = token;
                return(Datensatz_Http);
            };
            ListDestination <Datensatz_Http> Listdestination_html = new ListDestination <Datensatz_Http>();

            g_html.GetVertex(0, httpSource);
            g_html.GetVertex(1, Listdestination_html);
            g_html.AddEdge(0, 1);
            DataFlowTask <Datensatz_Http> .Execute("http df task", 10000, 1, g_html);
        }
예제 #2
0
        public void TestDataflow_MySql_to_List()
        {
            string ServerName = "";

            if (string.IsNullOrEmpty(ServerName))
            {
                return;
            }
            MySqlConnectionManager MyTestDb = new MySqlConnectionManager(ServerName, "TestDB", "", "");


            using (MyTestDb)
            {
                MySqlSource <Datensatz_MySql_to_List> MySqlDBSource = new MySqlSource <Datensatz_MySql_to_List>(MyTestDb.getNewMySqlConnection()
                                                                                                                , "SELECT Tag, Monat FROM test"
                                                                                                                );
                MySqlDBSource.DataMappingMethod = ReaderAdapter_MySql_to_List.Read;

                ListDestination <Datensatz> destination = new ListDestination <Datensatz>();

                Graph g = new Graph();

                g.GetVertex(0, MySqlDBSource);
                g.GetVertex(1, new RowTransformation <Datensatz_MySql_to_List>(RowTransformationDB));
                g.GetVertex(2, new RowTransformation <Datensatz_MySql_to_List>(RowTransformationDB2));
                g.GetVertex(3, destination);

                g.AddEdge(0, 1); // connect 0 to 1
                g.AddEdge(1, 2); // connect 1 to 2
                g.AddEdge(2, 3); // connect 2 to 3



                DataFlowTask <Datensatz> .Execute("Test dataflow task", 10000, 1, g);

                //TestHelper.VisualizeGraph(g);

                //Assert.AreEqual(4, new ExecuteSQLTask(MyTestDb.MySqlConnection).ExecuteScalar(string.Format("select count(*) from {0}", destObject)));
            }
        }
예제 #3
0
        static void Main(string[] args)
        {
            var x = t1();



            Graph g_html = new Graph();
            HttpSource <Datensatz_Http> httpSource = new HttpSource <Datensatz_Http>("https://www.boerse-frankfurt.de/index/dax/kurshistorie/tickdaten");

            httpSource.DataMappingMethod = (token) =>
            {
                var Datensatz_Http = new Datensatz_Http();
                Datensatz_Http.token = token;
                return(Datensatz_Http);
            };
            ListDestination <Datensatz_Http> Listdestination_html = new ListDestination <Datensatz_Http>();

            g_html.GetVertex(0, httpSource);
            g_html.GetVertex(1, Listdestination_html);
            g_html.AddEdge(0, 1);
            DataFlowTask <Datensatz_Http> .Execute("http df task", 10000, 1, g_html);
        }