private void InitializeTokens()
        {
            // Retrieve last access and refresh tokens from storage.
            var settings = new SettingsRetriever().Retrieve();

            _accessToken  = settings.AccessToken;
            _refreshToken = settings.RefreshToken;
        }
Exemple #2
0
        private string GenerateFileFolder(HttpPostedFile file)
        {
            var type        = Path.GetExtension(file.FileName).Substring(1);
            var firstLetter = Path.GetFileName(file.FileName)[0];

            var settings = new SettingsRetriever().GetFileStorageSettings();
            var path     = string.Format(CultureInfo.InvariantCulture, "{0}/{1}/{2}/", settings.StorageFolder, type, firstLetter);

            return(path);
        }
        // http://nodex.azurewebsites.net/customers/1/orders
        public IEnumerable <string> FindOrdersByCustomer(int customerId)
        {
            System.Diagnostics.Trace.TraceInformation($"Retrieving tokens ...");

            var settings = new SettingsRetriever().Retrieve();

            var summaries = new List <string> {
                settings.AccessToken,
                settings.RefreshToken,
            };

            return(summaries);
        }