Exemplo n.º 1
0
 private static string GetEntryProduct(Assembly assembly)
 {
     return assembly.GetAttribute<AssemblyProductAttribute>().Product;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Method used to filter out Microsoft .NET framework assemblies.
        /// </summary>
        /// <param name="assembly">Assembly to check</param>
        /// <returns>true if it's not a .NET assemby; otherwise false.</returns>
        public static bool ExcludeDotNet(Assembly assembly)
        {
            var company = assembly.GetAttribute<AssemblyCompanyAttribute>(false);
            if (company != null && company.Company.ToLower().Contains("microsoft"))
                return false;
            if (assembly.GetName().Check(name => name.Name.ToLower().StartsWith("system") || name.Name.Contains("microsoft")))
                return false;
            if (assembly.Location.ToLower().Contains("mscorlib"))
                return false;

            return true;
        }
 public void LoadValues(Assembly a)
 {
     if (string.IsNullOrEmpty(Name)) Name = a.GetAttribute<AssemblyTitleAttribute>().Title;
     if (string.IsNullOrEmpty(Author)) Author = a.GetAttribute<AssemblyCompanyAttribute>().Company;
     if (string.IsNullOrEmpty(Version)) Version = a.GetAttribute<AssemblyVersionAttribute>().Version;
 }