Main.cs 754 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
using System;
using Sample.UtilsTools;
using System.Runtime.InteropServices;
using TDengineDriver;
using Example;
using System.Collections.Generic;

namespace AsyncQueryExample
{
    public class EntryPoint
    {
        static void Main(string[] args)
        {
            IntPtr conn = UtilsTools.TDConnection();

            AsyncQuerySample asyncQuery = new AsyncQuerySample();
            asyncQuery.RunQueryAsync(conn,"query_async");
18 19 20 21
	    
	    SubscribeSample subscribeSample = new SubscribeSample();
            subscribeSample.RunSubscribeWithCallback(conn, "subscribe_with_callback");
            subscribeSample.RunSubscribeWithoutCallback(conn, "subscribe_without_callback");
22 23 24 25 26

            UtilsTools.CloseConnection(conn);
        }
    }
}