Esempio n. 1
0
 public void SetMainAssembly(Assembly entryAssembly)
 {
     this.machine     = XmlMachine.Create();
     this.commandLine = Environment.CommandLine;
     if (entryAssembly != null)
     {
         this.entryAssemblyLocation = Path.GetFileName(entryAssembly.Location);
         this.entryAssemblyName     = entryAssembly.GetName().Name;
     }
 }
Esempio n. 2
0
        public static XmlMachine Create()
        {
            XmlMachine machine = new XmlMachine();

            machine.MachineName      = Environment.MachineName;
            machine.FrameworkVersion = Environment.Version.ToString();
            machine.OperatingSystem  = Environment.OSVersion.VersionString;

            foreach (System.Collections.DictionaryEntry de in Environment.GetEnvironmentVariables())
            {
                machine.EnvironmentVariables.Add(
                    new EnvironmentVariable(String.Format("{0}", de.Key), String.Format("{0}", de.Value))
                    );
            }

            return(machine);
        }