コード例 #1
0
ファイル: Program.cs プロジェクト: biostar-dev/g-sdk
        public static void Main(string[] args)
        {
            try {
                var grpcClient = new GrpcClient();
                grpcClient.Connect(CA_FILE, SERVER_ADDR, SERVER_PORT);

                var quickStart = new QuickStart(grpcClient);

                var devID = quickStart.TestConnect();

                quickStart.TestDevice(devID);

                new FingerTest(quickStart.fingerSvc).Test(devID);
                new CardTest(quickStart.cardSvc).Test(devID);

                new UserTest(quickStart.userSvc, quickStart.fingerSvc).Test(devID);

                new EventTest(quickStart.eventSvc).Test(devID);

                uint[] deviceIDs = { devID };
                quickStart.connectSvc.Disconnect(deviceIDs);
                grpcClient.Close();
            } catch (RpcException e) {
                Console.WriteLine("gRPC Error: {0}", e);
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: biostar-dev/g-sdk
        public static void Main(string[] args)
        {
            var grpcClient = new GrpcClient();

            grpcClient.Connect(CA_FILE, SERVER_ADDR, SERVER_PORT);

            var connectTest = new ConnectTest(grpcClient);

            var tokenSource = connectTest.SubscribeDeviceStatus();

            MainMenu mainMenu = new MainMenu(connectTest.GetConnectSvc());

            mainMenu.Show();

            tokenSource.Cancel();
            grpcClient.Close();
        }