コード例 #1
0
    public static void Main(string[] args)
    {
        StartConnectionAsync();

        _strategy.On("receiveMessage", (arguments) =>
        {
            Console.WriteLine($"{arguments[0]} said: {arguments[1]}");
        });

        Console.ReadLine();
        StopConnectionAsync();
    }
コード例 #2
0
        static void Main(string[] args)
        {
            StartConnectionAsync();

            _strategy.On("receiveMessage", (arguments) =>
            {
                Console.WriteLine($"{arguments[0]} said: {arguments[1]}");
            });

            Console.ReadLine();

            ConsoleKeyInfo key = Console.ReadKey();

            if (key.Key.Equals(ConsoleKey.Escape))
            {
                StopConnectionAsync();
            }
        }