Пример #1
0
        public static XbimEnvironment GetData()
        {
            var xbimData = new XbimEnvironment();

            xbimData.Environment = string.Format("Running under [{0}] : 64bit OS: {2}\nProcess type:{1}",
                                                 Environment.OSVersion.VersionString,
                                                 Environment.Is64BitProcess ? "64-bit" : "32-bit",
                                                 Environment.Is64BitOperatingSystem);

            // Force Geometry engine to load if not already. Interop will load correct Managed C++ DLL
            var engine = new Xbim.Geometry.Engine.Interop.XbimGeometryEngine();

            var ignoreList     = new[] { "mscor", "system", "microsoft.", "vshost", "app_web" };
            var xBimAssemblies = AppDomain.CurrentDomain.GetAssemblies()
                                 .Where(asm => !ignoreList.Any(ignore => asm.GetName().Name.ToLowerInvariant().Contains(ignore)))
                                 .Where(asm => asm.IsDynamic == false)
                                 .OrderBy(asm => asm.GetName().Name);


            foreach (var assembly in xBimAssemblies)
            {
                GetData(xbimData, assembly);
            }
            return(xbimData);
        }
Пример #2
0
 private static void GetData(XbimEnvironment env, Assembly assembly)
 {
     var assemblyName = assembly.GetName();
     var fileVersion = GetFileVersion(assembly);
     env.Assemblies.Add(new XbimAsmVersion
         {
             Assembly= assemblyName.Name,
             Architecture = assemblyName.ProcessorArchitecture.ToString(),
             AssemblyVersion = assemblyName.Version.ToString(),
             FileVersion = fileVersion.FileVersion,
             ProductVersion = fileVersion.ProductVersion,
             CodeBase = assembly.CodeBase
         });
 }
Пример #3
0
        private static void GetData(XbimEnvironment env, Assembly assembly)
        {
            var assemblyName = assembly.GetName();
            var fileVersion  = GetFileVersion(assembly);

            env.Assemblies.Add(new XbimAsmVersion
            {
                Assembly        = assemblyName.Name,
                Architecture    = assemblyName.ProcessorArchitecture.ToString(),
                AssemblyVersion = assemblyName.Version.ToString(),
                FileVersion     = fileVersion.FileVersion,
                ProductVersion  = fileVersion.ProductVersion,
                CodeBase        = assembly.CodeBase
            });
        }
Пример #4
0
        public static XbimEnvironment GetData()
        {
            var xbimData = new XbimEnvironment();
            xbimData.Environment = string.Format("Running under [{0}] : 64bit OS: {2}\nProcess type:{1}",
                Environment.OSVersion.VersionString,
                Environment.Is64BitProcess ? "64-bit" : "32-bit",
                Environment.Is64BitOperatingSystem);

            // Force Geometry engine to load if not already. Interop will load correct Managed C++ DLL
            var engine = new Xbim.Geometry.Engine.Interop.XbimGeometryEngine();

            var ignoreList = new[] { "mscor", "system", "microsoft.", "vshost", "app_web" };
            var xBimAssemblies = AppDomain.CurrentDomain.GetAssemblies()
                .Where(asm => !ignoreList.Any(ignore => asm.GetName().Name.ToLowerInvariant().Contains(ignore)))
                .Where(asm => asm.IsDynamic==false)
                .OrderBy(asm => asm.GetName().Name);

            foreach (var assembly in xBimAssemblies)
            {
                GetData(xbimData, assembly);
            }
            return xbimData;
        }