/// <summary> /// This function build a valid registry path in dependecy to the /// assembly information /// </summary> /// <returns></returns> private String BuildRegistryPath() { NetSparkleAssemblyAccessor accessor = new NetSparkleAssemblyAccessor(ReferenceAssembly, UseReflectionBasedAssemblyAccessor); if (string.IsNullOrEmpty(accessor.AssemblyCompany) || string.IsNullOrEmpty(accessor.AssemblyProduct)) { throw new NetSparkleException("STOP: Sparkle is missing the company or productname tag in " + ReferenceAssembly); } return("Software\\" + accessor.AssemblyCompany + "\\" + accessor.AssemblyProduct + "\\AutoUpdate"); }
/// <summary> /// Constructor /// </summary> /// <param name="referenceAssembly">the name of hte reference assembly</param> /// <param name="isReflectionBasedAssemblyAccessorUsed"><c>true</c> if reflection is used to access the assembly.</param> protected NetSparkleConfiguration(string referenceAssembly, bool isReflectionBasedAssemblyAccessorUsed) { // set the value this.UseReflectionBasedAssemblyAccessor = isReflectionBasedAssemblyAccessorUsed; // save the reference assembly this.ReferenceAssembly = referenceAssembly; // set default values InitWithDefaultValues(); try { // set some value from the binary NetSparkleAssemblyAccessor accessor = new NetSparkleAssemblyAccessor(referenceAssembly, this.UseReflectionBasedAssemblyAccessor); ApplicationName = accessor.AssemblyProduct; InstalledVersion = accessor.AssemblyVersion; } catch { this.CheckForUpdate = false; throw; } }
/// <summary> /// This function build a valid registry path in dependecy to the /// assembly information /// </summary> /// <returns></returns> private String BuildRegistryPath() { NetSparkleAssemblyAccessor accessor = new NetSparkleAssemblyAccessor(ReferenceAssembly, UseReflectionBasedAssemblyAccessor); if (string.IsNullOrEmpty(accessor.AssemblyCompany) || string.IsNullOrEmpty(accessor.AssemblyProduct)) throw new NetSparkleException("STOP: Sparkle is missing the company or productname tag in " + ReferenceAssembly); return "Software\\" + accessor.AssemblyCompany + "\\" + accessor.AssemblyProduct + "\\AutoUpdate"; }