Exemplo n.º 1
0
        public Task<VersionLoginClient> GetWithCachedVersionAsync(LoginClient client)
        {
            if (this._version == null)
            {
                return client.WithAutomaticVersionAsync().Then(task =>
                {
                    this._version = task.Result.Version;
                    return task;
                }).ToSafeTask();
            }

            var tcs = new TaskCompletionSource<VersionLoginClient>();
            tcs.SetResult(client.WithVersion(this._version.Value));
            return tcs.Task;
        }
Exemplo n.º 2
0
 public VersionLoginClient GetWithCachedVersion(LoginClient client)
 {
     return(this.GetWithCachedVersionAsync(client).GetResultEx());
 }
Exemplo n.º 3
0
 public VersionLoginClient GetWithCachedVersion(LoginClient client)
 {
     return this.GetWithCachedVersionAsync(client).GetResultEx();
 }
Exemplo n.º 4
0
 internal VersionLoginClient(LoginClient loginClient, int version)
 {
     this._loginClient = loginClient;
     this.Version      = version;
 }