/// <summary> /// Validate settings. /// </summary> /// <exception cref="System.InvalidOperationException">Failed to read/write same value from registry.</exception> public void Validate() { if (!Directory.Exists(PickupPath)) Directory.CreateDirectory(PickupPath); if (!Directory.Exists(AppDirectory)) Directory.CreateDirectory(AppDirectory); var config = new RegistryConfigAdapter(CompanyName, ApplicationName); config["ConfigTest"] = "hello"; if (config["ConfigTest"] != "hello") throw new InvalidOperationException("Failed to read/write same value from registry."); }
public void Validate() { if (!Directory.Exists(PickupPath)) { Directory.CreateDirectory(PickupPath); } if (!Directory.Exists(AppDirectory)) { Directory.CreateDirectory(AppDirectory); } var config = new RegistryConfigAdapter(CompanyName, ApplicationName); config["ConfigTest"] = "hello"; if (config["ConfigTest"] != "hello") { throw new InvalidOperationException("Failed to read/write same value from registry."); } }