Exemplo n.º 1
0
            public Asm(Assembly asm)
            {
                Name = asm.FullName;
                if (!AssemblyUtilities.IsDynamic(asm))
                {
                    try
                    {
                        Location = asm.Location;
                    }
                    catch
                    {
                        // do nothing
                    }
                }

                if (string.IsNullOrEmpty(Location))
                {
                    Location = " ";
                }
                AssemblyFileVersionAttribute vatt = AssemblyUtilities.GetAttribute <AssemblyFileVersionAttribute>(asm);

                if (vatt != null)
                {
                    Version = vatt.Version;
                }
                else
                {
                    AssemblyVersionAttribute att = AssemblyUtilities.GetAttribute <AssemblyVersionAttribute>(asm);
                    if (att != null)
                    {
                        Version = att.Version;
                    }
                }
                InformationalVersion = AssemblyUtilities.GetInformationalVersion(asm);
                if (string.IsNullOrEmpty(Version))
                {
                    Version = InformationalVersion;
                }
                CompileDate = AssemblyUtilities.GetLinkerTimestamp(asm);
            }