public SolutionSettingsFile(Uri fullPath, SettingsFileNameManager manager) : base(fullPath, GetBasePath(fullPath), manager) { Contract.Requires(fullPath != null); Contract.Requires(fullPath.IsAbsoluteUri); Contract.Requires(fullPath.IsFile); Contract.Requires(manager != null); }
/// <summary> /// Constructs a new instance of the <see cref="SettingsFile"/> class. /// </summary> /// <param name="fullPath">The full path to this settings file.</param> /// <param name="basePath">The full path to the directory in which Visual Studio exports settings files.</param> /// <param name="manager">An object that generates unique names for settings files.</param> public SettingsFile(Uri fullPath, Uri basePath, SettingsFileNameManager manager) { Contract.Requires(fullPath != null); Contract.Requires(fullPath.IsAbsoluteUri); Contract.Requires(fullPath.IsFile); Contract.Requires(basePath != null); Contract.Requires(basePath.IsAbsoluteUri); Contract.Requires(basePath.IsFile); Contract.Requires(manager != null); this.fullPath = fullPath; this.relativePath = basePath.MakeRelativeUri(fullPath); this.manager = manager; Contract.Assume(!this.relativePath.IsAbsoluteUri); #if DEBUG Contract.Assume(this is SolutionSettingsFile || !manager.IsSealed); #endif manager.AddFile(this); }
/// <summary> /// Updates the value of <see cref="LastAccessed"/>. /// </summary> public void Accessed() { SettingsFileNameManager.SetLastAccessTime(fullPath); }