public virtual Task <LoginResult> LoginAsync(LoginConfig config)
        {
            var tcs = new TaskCompletionSource <LoginResult>();

            config.OnResult = x => tcs.TrySetResult(x);
            this.Login(config);
            return(tcs.Task);
        }
 public abstract void Login(LoginConfig config);