コード例 #1
0
        private async Task <OuthubResponse> GetResponseAsync()
        {
            if (this.Response == null)
            {
                var result = await LoadResponse().ConfigureAwait(false);

                this.Response = result;
            }
            return(this.Response);
        }
コード例 #2
0
        private async Task <OuthubResponse> LoadResponse()
        {
            OuthubResponse response;

            if (this.DownloadGrid)
            {
                response = await OuthubResponse.GetResponse().ConfigureAwait(false);

                await Task.Run(() => { OuthubResponse.SaveToFile(response, this.FilePath); });
            }
            else
            {
                response = await OuthubResponse.LoadFromFile(this.FilePath).ConfigureAwait(false);
            }
            return(response);
        }