Esempio n. 1
0
        /// <summary>
        /// Constructor for AssemblyInfo object
        /// </summary>
        /// <param name="assembly"></param>
        public AssemblyInfo(Assembly assembly)
        {
            this.Assembly = assembly;
            //this.AssemblyNameShort = assembly.GetName().Name;
            this.AssemblyNameShort = AssemblyProvider.GetAssemblyName(assembly);
            this.AssemblyNameFull  = assembly.FullName;

            this.AssemblyPath = AssemblyProvider.GetAssemblyPath(assembly);
            this.AssemblyPack = AssemblyProvider.GetAssemblyPack(assembly);

            // verify:
            //this.AssemblyNamespace = assembly.GetName().Name;
            this.AssemblyNamespace = AssemblyProvider.GetAssemblyName(assembly);
            this.AssemblyComponent = this.AssemblyNamespace + ";component";

            AssemblyTitle         = assembly.GetAssemblyAttribute(AssemblyAttributes.Title);
            AssemblyProduct       = assembly.GetAssemblyAttribute(AssemblyAttributes.Product);
            AssemblyDescription   = assembly.GetAssemblyAttribute(AssemblyAttributes.Description);
            AssemblyConfiguration = assembly.GetAssemblyAttribute(AssemblyAttributes.Configuration);
            AssemblyCompany       = assembly.GetAssemblyAttribute(AssemblyAttributes.Company);
            AssemblyCopyright     = assembly.GetAssemblyAttribute(AssemblyAttributes.Copyright);
            AssemblyTrademark     = assembly.GetAssemblyAttribute(AssemblyAttributes.Trademark);
            AssemblyCulture       = assembly.GetAssemblyAttribute(AssemblyAttributes.Culture);
            AssemblyVersion       = assembly.GetAssemblyAttribute(AssemblyAttributes.Version);
        }
        public AppClickOnceManager(Assembly applicationAssembly)
        {
            var ai             = AssemblyProvider.GetAssemblyInfo(applicationAssembly);
            var productCompany = ai.AssemblyCompany;
            var productName    = ai.AssemblyProduct + " " + ai.AssemblyVersion;

            RegisterApplication(productCompany, productName);
        }