<commit_before>﻿using Lime.Protocol;
using System;
using System.Threading.Tasks;

namespace Takenet.MessagingHub.Client.BasicSample
{
    class Program
    {
        static void Main(string[] args)
        {
            Init().Wait();
        }

        static async Task Init()
        {
            var client = new MessagingHubClient()
                            .UsingAccount("andreminelli", "123456")
                            .AddMessageReceiver(new PlainTextMessageReceiver(), forMimeType: MediaTypes.PlainText)
                            //Is possible use a Func to build a receiver
                            .AddNotificationReceiver(() => new PrintNotificationReceiver());
                            
            await client.StartAsync();

            //Send a get account command to server (Only sample)
            var command = new Command {
                Method = CommandMethod.Get,
                Uri = new LimeUri("/account")
            };

            var responseCommand = await client.CommandSender.SendCommandAsync(command);

            Console.WriteLine("Press any key to stop");
            await WaitKeyAsync();
            await client.StopAsync();
        }

        static Task<char> WaitKeyAsync()
        {
            var tcs = new TaskCompletionSource<char>();
            Task.Run(() =>
            {
                var key = Console.ReadKey(false);
                tcs.SetResult(key.KeyChar);
            });
            return tcs.Task;
        }
    }
}<commit_msg>Updated console example<commit_after>﻿using Lime.Messaging.Resources;
using Lime.Protocol;
using System;
using System.Text;
using System.Threading.Tasks;

namespace Takenet.MessagingHub.Client.BasicSample
{
    class Program
    {
        static void Main(string[] args)
        {
            Init().Wait();
        }

        static async Task Init()
        {
            var client = new MessagingHubClient()
                            .UsingAccount("andreminelli", "123456")
                            .AddMessageReceiver(new PlainTextMessageReceiver(), forMimeType: MediaTypes.PlainText)
                            //Is possible use a Func to build a receiver
                            .AddNotificationReceiver(() => new PrintNotificationReceiver());
                            
            await client.StartAsync();

            //Send a get account command to server (Only sample)
            var command = new Command {
                Method = CommandMethod.Get,
                Uri = new LimeUri("/account")
            };

            var responseCommand = await client.CommandSender.SendCommandAsync(command);
            var account = (Account)responseCommand.Resource;

            Console.WriteLine(GetAccountString(account));
            Console.WriteLine("Press any key to stop");
            await WaitKeyAsync();
            await client.StopAsync();
        }

        static string GetAccountString(Account account)
        {
            var builder = new StringBuilder();
            
            builder.AppendLine($"{nameof(account.FullName)}:{account.FullName}");
            builder.AppendLine($"{nameof(account.Email)}:{account.Email}");
            builder.AppendLine($"{nameof(account.PhoneNumber)}:{account.PhoneNumber}");
            builder.AppendLine($"{nameof(account.City)}:{account.City}");
            builder.AppendLine($"{nameof(account.Address)}:{account.Address}");

            return builder.ToString();
        }

        static Task<char> WaitKeyAsync()
        {
            var tcs = new TaskCompletionSource<char>();
            Task.Run(() =>
            {
                var key = Console.ReadKey(false);
                tcs.SetResult(key.KeyChar);
            });
            return tcs.Task;
        }
    }
}
{'fraction_non_alphanumeric': 0.1015604337476858, 'fraction_numerical': 0.003173763554615181, 'mean_word_length': 1.659634317862166, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3749429', 'n_tokens_mistral': 925, 'n_tokens_neox': 894, 'n_words': 201}