Christian Specht avatar Christian Specht committed b645b4f

refer to injected stuff with "this."

Comments (0)

Files changed (3)

src/BitbucketBackup/BitbucketBackup.cs

 
                 bool enterConfig = false;
 
-                if (config.IsComplete())
+                if (this.config.IsComplete())
                 {
                     Console.WriteLine(Resources.SettingsPrompt, waitInputSeconds);
                     Console.WriteLine();
                     }
                 }
 
-                if (enterConfig || !config.IsComplete())
+                if (enterConfig || !this.config.IsComplete())
                 {
-                    config.Input();
+                    this.config.Input();
                     Console.WriteLine();
                 }
 
-                Console.WriteLine(Resources.IntroUser, config.UserName);
-                Console.WriteLine(Resources.IntroFolder, config.BackupFolder);
+                Console.WriteLine(Resources.IntroUser, this.config.UserName);
+                Console.WriteLine(Resources.IntroFolder, this.config.BackupFolder);
                 Console.WriteLine();
                 Thread.Sleep(waitSeconds * 1000);
 
-                string resource = "users/" + config.UserName;
-                string response = request.Execute(resource);
+                string resource = "users/" + this.config.UserName;
+                string response = this.request.Execute(resource);
 
                 if (response == string.Empty)
                 {
                     from r in json["repositories"].Children()
                     select new { RepoName = (string)r["slug"], HasWiki = (bool)r["has_wiki"], Scm = (string)r["scm"] };
 
-                var baseUri = new Uri("https://bitbucket.org/" + config.UserName + "/");
+                var baseUri = new Uri("https://bitbucket.org/" + this.config.UserName + "/");
 
                 foreach (var repo in repos.OrderBy(r => r.RepoName))
                 {
                     var repoUri = new Uri(baseUri, repo.RepoName);
-                    string repoPath = Path.Combine(config.BackupFolder, repo.RepoName);
+                    string repoPath = Path.Combine(this.config.BackupFolder, repo.RepoName);
 
-                    updater.Update(repo.Scm, repoUri, repoPath);
+                    this.updater.Update(repo.Scm, repoUri, repoPath);
 
                     if (repo.HasWiki)
                     {
                         var wikiUri = new Uri(baseUri, repo.RepoName + "/wiki");
-                        string wikiPath = Path.Combine(config.BackupFolder, repo.RepoName + "-wiki");
+                        string wikiPath = Path.Combine(this.config.BackupFolder, repo.RepoName + "-wiki");
 
-                        updater.Update(repo.Scm, wikiUri, wikiPath);
+                        this.updater.Update(repo.Scm, wikiUri, wikiPath);
                     }
                 }
 

src/BitbucketBackup/BitbucketRequest.cs

                     {
                         // if the Uri returns a 404, the username probably doesn't exist
                         // (there could be other reasons, but this one is the most likely)
-                        throw new ClientException(string.Format(Resources.InvalidUsername, config.UserName), ex);
+                        throw new ClientException(string.Format(Resources.InvalidUsername, this.config.UserName), ex);
                     }
                     else
                     {

src/BitbucketBackup/RepositoryUpdater.cs

         /// <returns>Uri with authentification</returns>
         private Uri BuildUriWithAuth(Uri uriWithoutAuth)
         {
-            return new Uri(uriWithoutAuth.ToString().Replace("://", string.Format("://{0}:{1}@", Uri.EscapeDataString(config.UserName), Uri.EscapeDataString(config.PassWord))));
+            return new Uri(uriWithoutAuth.ToString().Replace("://", string.Format("://{0}:{1}@", Uri.EscapeDataString(this.config.UserName), Uri.EscapeDataString(this.config.PassWord))));
         }
     }
 }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.