GenerateProfileDirectoryName() private static method

Generates a random directory name for the profile.
private static GenerateProfileDirectoryName ( ) : string
return string
コード例 #1
0
 public void WriteToDisk()
 {
     this.profileDir = FirefoxProfile.GenerateProfileDirectoryName();
     if (!string.IsNullOrEmpty(this.sourceProfileDir))
     {
         FileUtilities.CopyDirectory(this.sourceProfileDir, this.profileDir);
     }
     else
     {
         Directory.CreateDirectory(this.profileDir);
     }
     this.InstallExtensions();
     this.DeleteLockFiles();
     this.DeleteExtensionsCache();
     this.UpdateUserPreferences();
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FirefoxProfile"/> class.
 /// </summary>
 public FirefoxProfile()
     : this(Directory.CreateDirectory(FirefoxProfile.GenerateProfileDirectoryName()).FullName)
 {
 }