Beispiel #1
0
        public CollectResponseType Collect(OrderResponseType order)
        {
            using (var client = new RpServicePortTypeClient())
            {
                Console.WriteLine("{0}Start the BankID application and sign in", Environment.NewLine);

                CollectResponseType result = null;

                // Wait for the client to sign in
                do
                {
                    // ...collect the response
                    result = client.Collect(order.orderRef);

                    Console.WriteLine(result.progressStatus);
                    System.Threading.Thread.Sleep(1000);
                } while (result.progressStatus != ProgressStatusType.COMPLETE);


                do
                {
                    return(result);
                } while (Console.ReadKey(true).Key != ConsoleKey.Escape);
            }
        }
Beispiel #2
0
        private static void Collect(OrderResponseType order)
        {
            using (var client = new RpServicePortTypeClient())
            {
                Console.WriteLine("{0}Start the BankID application and sign in", Environment.NewLine);

                CollectResponseType result = null;

                // Wait for the client to sign in
                do
                {
                    // ...collect the response
                    result = client.Collect(order.orderRef);

                    Console.WriteLine(result.progressStatus);
                    System.Threading.Thread.Sleep(1000);
                } while (result.progressStatus != ProgressStatusType.COMPLETE);


                do
                {
                    Console.WriteLine("Hi {0}, please press [ESC] to exit", result.userInfo.givenName);
                } while (Console.ReadKey(true).Key != ConsoleKey.Escape);
            }
        }